$ function f(unknowns,vertices)
$
$ use class_vector
$
$ real(kind(1.0d0)) :: f
$ real(kind(1.0d0)),intent(in) :: unknowns(6)
$ type(vertex) ,intent(in) :: vertices(:)
$
$ ! Local variables
$ type(vector) :: center
$ type(vector) :: axis
$ real(kind(1.0d0)) :: radius,alpha,beta
$ real(kind(1.0d0)) :: ax,ay,az
$
$ center = vector_(unknowns(1),unknowns(2),unknowns(3))
$ alpha = unknowns(4)
$ beta = unknowns(5)
$ radius = unknowns(6)
$
$ ax = sin(beta)
$ ay = -sin(alpha)cos(beta)
$ az = cos(alpha) cos(beta)
$
$ axis = vector_(ax,ay,az)
$
$ f = calc_error(center,axis,radius,vertices)
$
$ end function f
Uses
module~~class_cylinder_procedures~~UsesGraph
module~class_cylinder_procedures
class_cylinder_procedures
module~class_vertex
class_vertex
module~class_cylinder_procedures->module~class_vertex
module~class_vector
class_vector
module~class_cylinder_procedures->module~class_vector
module~class_psblas
class_psblas
module~class_cylinder_procedures->module~class_psblas
module~class_cylinder
class_cylinder
module~class_cylinder_procedures->module~class_cylinder
module~class_vertex->module~class_vector
module~class_vertex->module~class_psblas
module~class_vector->module~class_psblas
module~class_stopwatch
class_stopwatch
module~class_psblas->module~class_stopwatch
module~tools_psblas
tools_psblas
module~class_psblas->module~tools_psblas
module~class_cylinder->module~class_vertex
module~class_cylinder->module~class_vector
module~class_cylinder->module~class_psblas
module~class_stopwatch->module~tools_psblas
psb_base_mod
psb_base_mod
module~class_stopwatch->psb_base_mod
psb_prec_mod
psb_prec_mod
module~tools_psblas->psb_prec_mod
module~tools_psblas->psb_base_mod
psb_krylov_mod
psb_krylov_mod
module~tools_psblas->psb_krylov_mod
Nodes of different colours represent the following:
Graph Key
Module
Module
Submodule
Submodule
Subroutine
Subroutine
Function
Function
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Functions
function calc_error (center, axis, radius, vertices)
Arguments
Type
Intent Optional
Attributes Name
type(vector ),
intent(in)
::
center
type(vector ),
intent(in)
::
axis
real(kind=psb_dpk_),
intent(in)
::
radius
type(vertex ),
intent(in)
::
vertices (:)
Return Value real(kind=psb_dpk_)
Arguments
Type
Intent Optional
Attributes Name
type(vector ),
intent(in)
::
center
type(vector ),
intent(in)
::
axis
real(kind=psb_dpk_),
intent(in)
::
radius
type(vertex ),
intent(in)
::
vertices (:)
Return Value real(kind=psb_dpk_)
Subroutines
subroutine fcn (iflag, nverts, nunknowns, unknowns, err, fjac, ldfjac)
This is the function of merit to be optimized
Arguments
Type
Intent Optional
Attributes Name
integer,
intent(in)
::
iflag
integer,
intent(in)
::
nverts
integer,
intent(in)
::
nunknowns
real(kind=psb_dpk_),
intent(in)
::
unknowns (6)
real(kind=psb_dpk_),
intent(out)
::
err (nverts)
real(kind=psb_dpk_),
intent(in)
::
fjac (1,1)
integer,
intent(in)
::
ldfjac
Module Procedures
Arguments
Type
Intent Optional
Attributes Name
type(vertex ),
intent(in)
::
vertices (:)
type(cylinder ),
pointer ::
this_cylinder
Arguments
Type
Intent Optional
Attributes Name
type(cylinder ),
pointer ::
this_cylinder
Arguments
Type
Intent Optional
Attributes Name
class(cylinder ),
intent(in)
::
this_cylinder
type(vector ),
intent(in)
::
this_point
Return Value type(vector )
Arguments
Type
Intent Optional
Attributes Name
class(cylinder ),
intent(in)
::
this_cylinder
Return Value real(kind=psb_dpk_)
Arguments
Type
Intent Optional
Attributes Name
class(cylinder ),
intent(in)
::
this_cylinder
type(vector ),
intent(in)
::
point
Return Value type(vector )
Arguments
Type
Intent Optional
Attributes Name
class(cylinder ),
intent(in)
::
cyl
Return Value integer(kind=nemo_int_long_)
Arguments
Type
Intent Optional
Attributes Name
class(cylinder ),
intent(inout)
::
this_cylinder
type(vector ),
intent(in)
::
offset