MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
petscvectormodule::petscvectortype Type Referenceabstract
Inheritance diagram for petscvectormodule::petscvectortype:
Inheritance graph
Collaboration diagram for petscvectormodule::petscvectortype:
Collaboration graph

Public Member Functions

procedure create_mm (this, n, name, mem_path)
 Create a PETSc vector, with memory.
procedure create (this, n)
 Create a PETSc vector, with memory.
procedure destroy (this)
 Clean up.
procedure get_array (this)
 Get a pointer to the underlying data array.
procedure get_ownership_range (this, start, end)
procedure get_size (this)
procedure get_value_local (this, idx)
 Gets a value from the vector at the local index.
procedure zero_entries (this)
 set all elements to zero
procedure set_value_local (this, idx, val)
 Set vector value at local index.
procedure axpy (this, alpha, vec_x)
 Calculate AXPY: y = a*x + y.
procedure norm2 (this)
 Calculate this vector's (global) 2-norm.
procedure print (this)
procedure(create_mm_if), deferred create_mm (this, n, name, mem_path)
procedure(destroy_if), deferred destroy (this)
procedure(get_array_if), deferred get_array (this)
procedure(get_ownership_range_if), deferred get_ownership_range (this, start, end)
procedure(get_size_if), deferred get_size (this)
procedure(get_value_local_if), deferred get_value_local (this, idx)
procedure(zero_entries_if), deferred zero_entries (this)
procedure(set_value_local_if), deferred set_value_local (this, idx, val)
procedure(axpy_if), deferred axpy (this, alpha, vec_x)
procedure(norm2_if), deferred norm2 (this)
procedure(print_if), deferred print (this)

Public Attributes

real(dp), dimension(:), pointer, contiguous array => null()
type(tvec) vec_impl
logical(lgp) is_mem_managed

Detailed Description

Definition at line 12 of file PetscVector.F90.

Member Function/Subroutine Documentation

◆ axpy() [1/2]

procedure petscvectormodule::petscvectortype::axpy ( class(petscvectortype) this,
real(dp) alpha,
class(vectorbasetype), pointer vec_x )
Parameters
thisthis vector
alphathe factor
vec_xthe vector to add

Definition at line 26 of file PetscVector.F90.

◆ axpy() [2/2]

procedure(axpy_if), deferred vectorbasemodule::vectorbasetype::axpy ( class(vectorbasetype) this,
real(dp) alpha,
class(vectorbasetype), pointer vec_x )
pure virtualinherited
Parameters
thisthis vector y => alpha*x + y
alphathe factor
vec_xthe vector to add

Definition at line 17 of file VectorBase.f90.

◆ create()

procedure petscvectormodule::petscvectortype::create ( class(petscvectortype) this,
integer(i4b) n )
Parameters
thisthis vector
nthe nr. of elements in the vector

Definition at line 18 of file PetscVector.F90.

◆ create_mm() [1/2]

procedure petscvectormodule::petscvectortype::create_mm ( class(petscvectortype) this,
integer(i4b) n,
character(len=*) name,
character(len=*) mem_path )
Parameters
thisthis vector
nthe nr. of elements in the vector
namethe variable name (for access through memory manager)
mem_pathmemory path for storing the underlying memory items

Definition at line 17 of file PetscVector.F90.

◆ create_mm() [2/2]

procedure(create_mm_if), deferred vectorbasemodule::vectorbasetype::create_mm ( class(vectorbasetype) this,
integer(i4b) n,
character(len=*) name,
character(len=*) mem_path )
pure virtualinherited
Parameters
thisthis vector
nthe nr. of elements in the (local) vector
namethe variable name (for access through memory manager)
mem_pathmemory path for storing the underlying memory items

Definition at line 9 of file VectorBase.f90.

◆ destroy() [1/2]

procedure petscvectormodule::petscvectortype::destroy ( class(petscvectortype) this)
Parameters
thisthis vector

Definition at line 19 of file PetscVector.F90.

◆ destroy() [2/2]

procedure(destroy_if), deferred vectorbasemodule::vectorbasetype::destroy ( class(vectorbasetype) this)
pure virtualinherited
Parameters
thisthis vector

Definition at line 10 of file VectorBase.f90.

◆ get_array() [1/2]

procedure petscvectormodule::petscvectortype::get_array ( class(petscvectortype) this)
Parameters
thisthis vector
Returns
the underlying data array for this vector

Definition at line 20 of file PetscVector.F90.

◆ get_array() [2/2]

procedure(get_array_if), deferred vectorbasemodule::vectorbasetype::get_array ( class(vectorbasetype) this)
pure virtualinherited
Parameters
thisthis vector

Definition at line 11 of file VectorBase.f90.

◆ get_ownership_range() [1/2]

procedure petscvectormodule::petscvectortype::get_ownership_range ( class(petscvectortype) this,
integer(i4b) start,
integer(i4b) end )
Parameters
thisthis vector
startthe index of the first element (owned by this process) in the global vector
endthe index of the last element (owned by this process) in the global vector

Definition at line 21 of file PetscVector.F90.

◆ get_ownership_range() [2/2]

procedure(get_ownership_range_if), deferred vectorbasemodule::vectorbasetype::get_ownership_range ( class(vectorbasetype) this,
integer(i4b) start,
integer(i4b) end )
pure virtualinherited
Parameters
thisthis vector
endlocal range in global numbering

Definition at line 12 of file VectorBase.f90.

◆ get_size() [1/2]

procedure petscvectormodule::petscvectortype::get_size ( class(petscvectortype) this)
Parameters
thisthis vector
Returns
the (global) vector size

Definition at line 22 of file PetscVector.F90.

◆ get_size() [2/2]

procedure(get_size_if), deferred vectorbasemodule::vectorbasetype::get_size ( class(vectorbasetype) this)
pure virtualinherited
Parameters
thisthis vector

Definition at line 13 of file VectorBase.f90.

◆ get_value_local() [1/2]

procedure petscvectormodule::petscvectortype::get_value_local ( class(petscvectortype) this,
integer(i4b) idx )
Parameters
thisthis vector
idxthe index in local numbering
Returns
the value

Definition at line 23 of file PetscVector.F90.

◆ get_value_local() [2/2]

procedure(get_value_local_if), deferred vectorbasemodule::vectorbasetype::get_value_local ( class(vectorbasetype) this,
integer(i4b) idx )
pure virtualinherited
Parameters
thisthis vector
idxindex in local numbering

Definition at line 14 of file VectorBase.f90.

◆ norm2() [1/2]

procedure petscvectormodule::petscvectortype::norm2 ( class(petscvectortype) this)
Parameters
thisthis vector
Returns
the calculated 2-norm

Definition at line 27 of file PetscVector.F90.

◆ norm2() [2/2]

procedure(norm2_if), deferred vectorbasemodule::vectorbasetype::norm2 ( class(vectorbasetype) this)
pure virtualinherited
Parameters
thisthis vector

Definition at line 18 of file VectorBase.f90.

◆ print() [1/2]

procedure petscvectormodule::petscvectortype::print ( class(petscvectortype) this)
Parameters
thisthis vector

Definition at line 28 of file PetscVector.F90.

◆ print() [2/2]

procedure(print_if), deferred vectorbasemodule::vectorbasetype::print ( class(vectorbasetype) this)
pure virtualinherited

Definition at line 19 of file VectorBase.f90.

◆ set_value_local() [1/2]

procedure petscvectormodule::petscvectortype::set_value_local ( class(petscvectortype) this,
integer(i4b) idx,
real(dp) val )
Parameters
thisthis vector
idxthe index in local numbering
valthe value to set

Definition at line 25 of file PetscVector.F90.

◆ set_value_local() [2/2]

procedure(set_value_local_if), deferred vectorbasemodule::vectorbasetype::set_value_local ( class(vectorbasetype) this,
integer(i4b) idx,
real(dp) val )
pure virtualinherited
Parameters
thisthis vector
idxindex in local numbering
valthe value to set

Definition at line 16 of file VectorBase.f90.

◆ zero_entries() [1/2]

procedure petscvectormodule::petscvectortype::zero_entries ( class(petscvectortype) this)
Parameters
thisthis vector

Definition at line 24 of file PetscVector.F90.

◆ zero_entries() [2/2]

procedure(zero_entries_if), deferred vectorbasemodule::vectorbasetype::zero_entries ( class(vectorbasetype) this)
pure virtualinherited

Definition at line 15 of file VectorBase.f90.

Member Data Documentation

◆ array

real(dp), dimension(:), pointer, contiguous petscvectormodule::petscvectortype::array => null()

Definition at line 13 of file PetscVector.F90.

◆ is_mem_managed

logical(lgp) vectorbasemodule::vectorbasetype::is_mem_managed
inherited

Definition at line 7 of file VectorBase.f90.

7 logical(LGP) :: is_mem_managed

◆ vec_impl

type(tvec) petscvectormodule::petscvectortype::vec_impl

Definition at line 14 of file PetscVector.F90.

14 vec :: vec_impl

The documentation for this type was generated from the following file: