Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
mma::mma_t Type Reference

MMA type. More...

Collaboration diagram for mma::mma_t:

Public Member Functions

generic, public init init_from_json
 Interface for initializing the MMA object.
 
generic, public init init_from_components
 Interface for initializing the MMA object.
 
procedure, pass(this), public init_from_json (this, x, n, m, json, scale, auto_scale)
 Device KKT check for convergence.
 
procedure, pass(this), public init_from_components (this, x, n, m, a0, a, c, d, xmin, xmax, max_iter, epsimin, asyinit, asyincr, asydecr, bcknd, subsolver)
 Initialize the mma object based on the attributes from the json file.
 
procedure, pass(this), public free (this)
 Deallocate mma object.
 
procedure, pass(this), public get_n (this)
 Get the number of design variables (nloc)
 
procedure, pass(this), public get_m (this)
 Get the number of constriants.
 
procedure, pass(this), public get_residumax (this)
 Get L^{inf} norm (Max Norm) of the KKT conditions.
 
procedure, pass(this), public get_residunorm (this)
 Get L^{2} norm (Euclidean Norm) of the KKT conditions.
 
procedure, pass(this), public get_max_iter (this)
 Get the maximum number of iterations for the mma_subsolve inner loop.
 
procedure, pass(this), public get_backend_and_subsolver (this)
 Get the maximum number of iterations for the mma_subsolve inner loop.
 
generic, public update update_vector
 
generic, public update update_cpu
 
generic, public update update_device
 
procedure, pass(thisupdate_vector (this, iter, x, df0dx, fval, dfdx)
 Call the update function based on the backend.
 
procedure, pass(thisupdate_cpu mma_update_cpu
 
procedure, pass(thisupdate_device mma_update_device
 
generic, public kkt kkt_vector
 
generic, public kkt kkt_cpu
 
generic, public kkt kkt_device
 
procedure, pass(thiskkt_vector (this, x, df0dx, fval, dfdx)
 Call the KKT ckeck function based on the backend.
 
procedure, pass(thiskkt_cpu mma_kkt_cpu
 
procedure, pass(thiskkt_device mma_kkt_device
 
procedure, pass(thissave_checkpoint (this, filename, overwrite)
 Save the mma checkpoint to a file based on file suffix.
 
procedure, pass(thisload_checkpoint (this, filename)
 Load the mma checkpoint from a file based on file suffix.
 
procedure, pass(thiscopy_from (this, direction, sync)
 Sync device memory to host for all internal vectors/matrices.
 

Public Attributes

integer m
 
integer n_global
 
integer max_iter
 
real(kind=rp) a0
 
real(kind=rp) asyinit
 
real(kind=rp) asyincr
 
real(kind=rp) asydecr
 
real(kind=rp) epsimin
 
real(kind=rp) residumax
 
real(kind=rp) residunorm
 
type(vector_t) xold1
 
type(vector_t) xold2
 
type(vector_t) low
 
type(vector_t) upp
 
type(vector_t) alpha
 
type(vector_t) beta
 
type(vector_t) a
 
type(vector_t) c
 
type(vector_t) d
 
type(vector_t) xmax
 
type(vector_t) xmin
 
logical is_initialized = .false.
 
logical is_updated = .false.
 
character(len=:), allocatable subsolver
 
character(len=:), allocatable bcknd
 
type(vector_t) p0j
 
type(vector_t) q0j
 
type(matrix_t) pij
 
type(matrix_t) qij
 
type(vector_t) bi
 
real(kind=rp) z
 
real(kind=rp) zeta
 
type(vector_t) y
 
type(vector_t) lambda
 
type(vector_t) s
 
type(vector_t) mu
 
type(vector_t) xsi
 
type(vector_t) eta
 

Detailed Description

Definition at line 89 of file mma.f90.

Member Function/Subroutine Documentation

◆ copy_from()

procedure, pass(this) mma::mma_t::copy_from ( class(mma_t), intent(inout this,
integer, intent(in direction,
logical, intent(in sync 
)

Definition at line 137 of file mma.f90.

◆ free()

procedure, pass(this), public mma::mma_t::free ( class(mma_t), intent(inout this)

Definition at line 114 of file mma.f90.

◆ get_backend_and_subsolver()

procedure, pass(this), public mma::mma_t::get_backend_and_subsolver ( class(mma_t), intent(in this)

Definition at line 120 of file mma.f90.

◆ get_m()

procedure, pass(this), public mma::mma_t::get_m ( class(mma_t), intent(in this)

Definition at line 116 of file mma.f90.

◆ get_max_iter()

procedure, pass(this), public mma::mma_t::get_max_iter ( class(mma_t), intent(in this)

Definition at line 119 of file mma.f90.

◆ get_n()

procedure, pass(this), public mma::mma_t::get_n ( class(mma_t), intent(in this)

Definition at line 115 of file mma.f90.

◆ get_residumax()

procedure, pass(this), public mma::mma_t::get_residumax ( class(mma_t), intent(in this)

Definition at line 117 of file mma.f90.

◆ get_residunorm()

procedure, pass(this), public mma::mma_t::get_residunorm ( class(mma_t), intent(in this)

Definition at line 118 of file mma.f90.

◆ init() [1/2]

generic, public mma::mma_t::init

Definition at line 110 of file mma.f90.

◆ init() [2/2]

generic, public mma::mma_t::init

Definition at line 110 of file mma.f90.

◆ init_from_components()

procedure, pass(this), public mma::mma_t::init_from_components ( class(mma_t), intent(inout this,
type(vector_t), intent(in x,
integer, intent(in n,
integer, intent(in m,
real(kind=rp), intent(in a0,
real(kind=rp), dimension(m), intent(in a,
real(kind=rp), dimension(m), intent(in c,
real(kind=rp), dimension(m), intent(in d,
real(kind=rp), dimension(n), intent(in xmin,
real(kind=rp), dimension(n), intent(in xmax,
integer, intent(in), optional  max_iter,
real(kind=rp), intent(in), optional  epsimin,
real(kind=rp), intent(in), optional  asyinit,
real(kind=rp), intent(in), optional  asyincr,
real(kind=rp), intent(in), optional  asydecr,
character(len=*), intent(in), optional  bcknd,
character(len=*), intent(in), optional  subsolver 
)

Definition at line 112 of file mma.f90.

◆ init_from_json()

procedure, pass(this), public mma::mma_t::init_from_json ( class(mma_t), intent(inout this,
type(vector_t), intent(in x,
integer, intent(in n,
integer, intent(in m,
type(json_file), intent(inout json,
real(kind=rp), intent(out scale,
logical, intent(out auto_scale 
)

Read attributes from the case file, and calling the init function

Definition at line 111 of file mma.f90.

◆ kkt() [1/3]

generic, public mma::mma_t::kkt

Definition at line 128 of file mma.f90.

◆ kkt() [2/3]

generic, public mma::mma_t::kkt

Definition at line 128 of file mma.f90.

◆ kkt() [3/3]

generic, public mma::mma_t::kkt

Definition at line 128 of file mma.f90.

◆ kkt_cpu()

procedure, pass(this) mma::mma_t::kkt_cpu

Definition at line 130 of file mma.f90.

◆ kkt_device()

procedure, pass(this) mma::mma_t::kkt_device

Definition at line 131 of file mma.f90.

◆ kkt_vector()

procedure, pass(this) mma::mma_t::kkt_vector ( class(mma_t), intent(inout this,
type(vector_t), intent(inout x,
type(vector_t), intent(inout df0dx,
type(vector_t), intent(inout fval,
type(matrix_t), intent(inout dfdx 
)

Definition at line 129 of file mma.f90.

◆ load_checkpoint()

procedure, pass(this) mma::mma_t::load_checkpoint ( class(mma_t), intent(inout this,
character(len=*), intent(in filename 
)
Parameters
thisThe mma object.
filenameThe name of the file to load the checkpoint from.

Definition at line 134 of file mma.f90.

◆ save_checkpoint()

procedure, pass(this) mma::mma_t::save_checkpoint ( class(mma_t), intent(inout this,
character(len=*), intent(in filename,
logical, intent(in), optional  overwrite 
)
Parameters
thisThe mma object.
filenameThe name of the file to save the checkpoint.
overwriteWhether to overwrite the file if it exists.

Definition at line 133 of file mma.f90.

◆ update() [1/3]

generic, public mma::mma_t::update

Definition at line 123 of file mma.f90.

◆ update() [2/3]

generic, public mma::mma_t::update

Definition at line 123 of file mma.f90.

◆ update() [3/3]

generic, public mma::mma_t::update

Definition at line 123 of file mma.f90.

◆ update_cpu()

procedure, pass(this) mma::mma_t::update_cpu

Definition at line 125 of file mma.f90.

◆ update_device()

procedure, pass(this) mma::mma_t::update_device

Definition at line 126 of file mma.f90.

◆ update_vector()

procedure, pass(this) mma::mma_t::update_vector ( class(mma_t), intent(inout this,
integer, intent(in iter,
type(vector_t), intent(inout x,
type(vector_t), intent(inout df0dx,
type(vector_t), intent(inout fval,
type(matrix_t), intent(inout dfdx 
)

Definition at line 124 of file mma.f90.

Member Data Documentation

◆ a

type(vector_t) mma::mma_t::a

Definition at line 94 of file mma.f90.

◆ a0

real(kind=rp) mma::mma_t::a0

Definition at line 92 of file mma.f90.

◆ alpha

type(vector_t) mma::mma_t::alpha

Definition at line 94 of file mma.f90.

◆ asydecr

real(kind=rp) mma::mma_t::asydecr

Definition at line 92 of file mma.f90.

◆ asyincr

real(kind=rp) mma::mma_t::asyincr

Definition at line 92 of file mma.f90.

◆ asyinit

real(kind=rp) mma::mma_t::asyinit

Definition at line 92 of file mma.f90.

◆ bcknd

character(len=:), allocatable mma::mma_t::bcknd

Definition at line 97 of file mma.f90.

◆ beta

type(vector_t) mma::mma_t::beta

Definition at line 94 of file mma.f90.

◆ bi

type(vector_t) mma::mma_t::bi

Definition at line 102 of file mma.f90.

◆ c

type(vector_t) mma::mma_t::c

Definition at line 94 of file mma.f90.

◆ d

type(vector_t) mma::mma_t::d

Definition at line 94 of file mma.f90.

◆ epsimin

real(kind=rp) mma::mma_t::epsimin

Definition at line 92 of file mma.f90.

◆ eta

type(vector_t) mma::mma_t::eta

Definition at line 107 of file mma.f90.

◆ is_initialized

logical mma::mma_t::is_initialized = .false.

Definition at line 95 of file mma.f90.

◆ is_updated

logical mma::mma_t::is_updated = .false.

Definition at line 96 of file mma.f90.

◆ lambda

type(vector_t) mma::mma_t::lambda

Definition at line 106 of file mma.f90.

◆ low

type(vector_t) mma::mma_t::low

Definition at line 94 of file mma.f90.

◆ m

integer mma::mma_t::m

Definition at line 91 of file mma.f90.

◆ max_iter

integer mma::mma_t::max_iter

Definition at line 91 of file mma.f90.

◆ mu

type(vector_t) mma::mma_t::mu

Definition at line 106 of file mma.f90.

◆ n_global

integer mma::mma_t::n_global

Definition at line 91 of file mma.f90.

◆ p0j

type(vector_t) mma::mma_t::p0j

Definition at line 100 of file mma.f90.

◆ pij

type(matrix_t) mma::mma_t::pij

Definition at line 101 of file mma.f90.

◆ q0j

type(vector_t) mma::mma_t::q0j

Definition at line 100 of file mma.f90.

◆ qij

type(matrix_t) mma::mma_t::qij

Definition at line 101 of file mma.f90.

◆ residumax

real(kind=rp) mma::mma_t::residumax

Definition at line 92 of file mma.f90.

◆ residunorm

real(kind=rp) mma::mma_t::residunorm

Definition at line 92 of file mma.f90.

◆ s

type(vector_t) mma::mma_t::s

Definition at line 106 of file mma.f90.

◆ subsolver

character(len=:), allocatable mma::mma_t::subsolver

Definition at line 97 of file mma.f90.

◆ upp

type(vector_t) mma::mma_t::upp

Definition at line 94 of file mma.f90.

◆ xmax

type(vector_t) mma::mma_t::xmax

Definition at line 94 of file mma.f90.

◆ xmin

type(vector_t) mma::mma_t::xmin

Definition at line 94 of file mma.f90.

◆ xold1

type(vector_t) mma::mma_t::xold1

Definition at line 94 of file mma.f90.

◆ xold2

type(vector_t) mma::mma_t::xold2

Definition at line 94 of file mma.f90.

◆ xsi

type(vector_t) mma::mma_t::xsi

Definition at line 107 of file mma.f90.

◆ y

type(vector_t) mma::mma_t::y

Definition at line 106 of file mma.f90.

◆ z

real(kind=rp) mma::mma_t::z

Definition at line 105 of file mma.f90.

◆ zeta

real(kind=rp) mma::mma_t::zeta

Definition at line 105 of file mma.f90.


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