class_scalar_field Module

Define and manipulate scalar-field values associated with a field-parent mesh Class


Uses

  • module~~class_scalar_field~~UsesGraph module~class_scalar_field class_scalar_field module~class_field class_field module~class_scalar_field->module~class_field module~class_bc class_bc module~class_scalar_field->module~class_bc module~class_dimensions class_dimensions module~class_scalar_field->module~class_dimensions module~class_material class_material module~class_scalar_field->module~class_material module~class_psblas class_psblas module~class_scalar_field->module~class_psblas module~class_mesh class_mesh module~class_scalar_field->module~class_mesh module~class_field->module~class_bc module~class_field->module~class_dimensions module~class_field->module~class_material module~class_field->module~class_psblas module~class_field->module~class_mesh module~grid_interface grid_interface module~class_field->module~grid_interface module~class_bc->module~class_psblas module~class_motion class_motion module~class_bc->module~class_motion module~class_bc_math class_bc_math module~class_bc->module~class_bc_math module~class_bc_wall class_bc_wall module~class_bc->module~class_bc_wall module~class_dimensions->module~class_psblas module~class_material->module~class_psblas matlib matlib module~class_material->matlib module~class_stopwatch class_stopwatch module~class_psblas->module~class_stopwatch module~tools_psblas tools_psblas module~class_psblas->module~tools_psblas module~class_mesh->module~class_psblas module~class_cell class_cell module~class_mesh->module~class_cell module~class_keytable class_keytable module~class_mesh->module~class_keytable module~class_vector class_vector module~class_mesh->module~class_vector module~class_surface class_surface module~class_mesh->module~class_surface module~class_connectivity class_connectivity module~class_mesh->module~class_connectivity module~class_least_squares class_least_squares module~class_mesh->module~class_least_squares psb_base_mod psb_base_mod module~class_mesh->psb_base_mod module~class_vertex class_vertex module~class_mesh->module~class_vertex module~class_mesh->module~grid_interface module~class_face class_face module~class_mesh->module~class_face module~class_motion->module~class_psblas module~class_motion->module~class_vector module~class_stopwatch->module~tools_psblas module~class_stopwatch->psb_base_mod module~tools_psblas->psb_base_mod psb_krylov_mod psb_krylov_mod module~tools_psblas->psb_krylov_mod psb_prec_mod psb_prec_mod module~tools_psblas->psb_prec_mod module~class_cell->module~class_psblas module~class_bc_math->module~class_psblas module~class_vector->module~class_psblas module~class_surface->module~class_connectivity module~class_cylinder class_cylinder module~class_surface->module~class_cylinder module~class_plane class_plane module~class_surface->module~class_plane module~class_connectivity->module~class_psblas module~class_least_squares->module~class_psblas module~class_least_squares->module~class_connectivity module~class_bc_wall->module~class_dimensions module~class_bc_wall->module~class_material module~class_bc_wall->module~class_psblas module~class_bc_wall->module~class_mesh module~class_bc_wall->module~class_bc_math module~class_bc_wall->module~class_vector module~class_vertex->module~class_psblas module~class_vertex->module~class_vector module~units_interface units_interface module~grid_interface->module~units_interface module~object_interface object_interface module~grid_interface->module~object_interface module~class_face->module~class_psblas module~class_cylinder->module~class_psblas module~class_cylinder->module~class_vector module~class_cylinder->module~class_vertex module~units_interface->module~object_interface module~class_plane->module~class_psblas module~class_plane->module~class_vector

Used by

  • module~~class_scalar_field~~UsedByGraph module~class_scalar_field class_scalar_field module~tools_nemo tools_nemo module~tools_nemo->module~class_scalar_field module~op_grad op_grad module~tools_nemo->module~op_grad module~class_output class_output module~tools_nemo->module~class_output module~op_field op_field module~tools_nemo->module~op_field module~op_ddt op_ddt module~tools_nemo->module~op_ddt module~tools_mesh_check tools_mesh_check module~tools_nemo->module~tools_mesh_check module~op_d2dt2 op_d2dt2 module~tools_nemo->module~op_d2dt2 module~class_scalar_pde class_scalar_pde module~tools_nemo->module~class_scalar_pde module~op_div op_div module~tools_nemo->module~op_div module~op_laplacian op_laplacian module~tools_nemo->module~op_laplacian module~tools_output tools_output module~tools_nemo->module~tools_output module~op_source op_source module~tools_nemo->module~op_source proc~rhie_chow rhie_chow proc~rhie_chow->module~class_scalar_field proc~vector_pde_d2dt2 vector_pde_d2dt2 proc~vector_pde_d2dt2->module~class_scalar_field proc~vector_pde_grad vector_pde_grad proc~vector_pde_grad->module~class_scalar_field module~op_grad->module~class_scalar_field module~class_output->module~class_scalar_field proc~vector_pde_ddt vector_pde_ddt proc~vector_pde_ddt->module~class_scalar_field module~op_field->module~class_scalar_field proc~get_scalar_field get_scalar_field proc~get_scalar_field->module~class_scalar_field proc~get_scalar_field->module~class_output module~class_vtk_output class_vtk_output module~class_vtk_output->module~class_scalar_field module~class_vtk_output->module~class_output module~op_ddt->module~class_scalar_field module~op_ddt->module~class_scalar_pde module~tools_mesh_check->module~class_scalar_field module~op_d2dt2->module~class_scalar_field module~op_d2dt2->module~class_scalar_pde module~class_scalar_pde->module~class_scalar_field module~op_div->module~class_scalar_field module~op_div->module~class_scalar_pde proc~vector_pde_laplacian vector_pde_laplacian proc~vector_pde_laplacian->module~class_scalar_field proc~vector_pde_laplacian->module~op_grad proc~vector_field_flux vector_field_flux proc~vector_field_flux->module~class_scalar_field module~op_laplacian->module~class_scalar_field module~op_laplacian->module~class_scalar_pde module~tools_output->module~class_scalar_field module~tools_output->module~class_output module~op_source->module~class_scalar_field module~op_source->module~class_scalar_pde proc~check_mesh_quality check_mesh_quality proc~check_mesh_quality->module~class_scalar_field proc~check_mesh_quality->module~tools_mesh_check module~class_exodus_procedures class_exodus_procedures module~class_exodus_procedures->module~class_scalar_field module~class_exodus_procedures->module~class_output module~class_exodus class_exodus module~class_exodus_procedures->module~class_exodus proc~scalar_vector_fld_mul scalar_vector_fld_mul proc~scalar_vector_fld_mul->module~class_scalar_field proc~scalar_fld_vector_mul scalar_fld_vector_mul proc~scalar_fld_vector_mul->module~class_scalar_field proc~scalar_field_grad scalar_field_grad proc~scalar_field_grad->module~class_scalar_field proc~get_vector_field get_vector_field proc~get_vector_field->module~class_scalar_field proc~get_vector_field->module~class_output module~class_exodus->module~class_scalar_field module~class_exodus->module~class_output proc~solve_scalar_pde solve_scalar_pde proc~solve_scalar_pde->module~class_scalar_field module~class_scalar_field_procedures class_scalar_field_procedures module~class_scalar_field_procedures->module~class_scalar_field proc~write_vtk_mesh write_vtk_mesh proc~write_vtk_mesh->module~class_output module~vector_pde_laplacian_implementation vector_pde_laplacian_implementation module~vector_pde_laplacian_implementation->module~op_laplacian module~tools_mesh_check_tet tools_mesh_check_tet module~tools_mesh_check_tet->module~tools_mesh_check module~class_output_procedures class_output_procedures module~class_output_procedures->module~class_output module~scalar_pde_d2dt2_implementation scalar_pde_d2dt2_implementation module~scalar_pde_d2dt2_implementation->module~op_d2dt2 module~write_mesh_implementation write_mesh_implementation module~write_mesh_implementation->module~tools_output module~vector_pde_ddt_implementation vector_pde_ddt_implementation module~vector_pde_ddt_implementation->module~op_ddt module~flux_pde_div_implementation flux_pde_div_implementation module~flux_pde_div_implementation->module~op_div proc~vector_pde_source vector_pde_source proc~vector_pde_source->module~class_scalar_pde proc~create_output create_output proc~create_output->module~class_vtk_output module~class_vtk_output_procedures class_vtk_output_procedures module~class_vtk_output_procedures->module~class_vtk_output module~op_d2dt2_procedures op_d2dt2_procedures module~op_d2dt2_procedures->module~op_d2dt2 module~op_ddt_procedures op_ddt_procedures module~op_ddt_procedures->module~op_ddt module~scalar_vector_fld_mul_implementation scalar_vector_fld_mul_implementation module~scalar_vector_fld_mul_implementation->module~op_field proc~smooth_mesh smooth_mesh proc~smooth_mesh->module~tools_mesh_check proc~check_right_handed check_right_handed proc~check_right_handed->module~tools_mesh_check module~rhie_chow_implementation rhie_chow_implementation module~rhie_chow_implementation->module~op_field module~scalar_pde_laplacian_implementation scalar_pde_laplacian_implementation module~scalar_pde_laplacian_implementation->module~op_laplacian proc~smooth_surf_vtx smooth_surf_vtx proc~smooth_surf_vtx->module~tools_mesh_check module~write_vector_field_implementation write_vector_field_implementation module~write_vector_field_implementation->module~tools_output module~vector_pde_div_implementation vector_pde_div_implementation module~vector_pde_div_implementation->module~op_div module~scalar_field_grad_implementation scalar_field_grad_implementation module~scalar_field_grad_implementation->module~op_grad module~op_laplacian_procedures op_laplacian_procedures module~op_laplacian_procedures->module~op_laplacian module~tools_mesh_check_vertex tools_mesh_check_vertex module~tools_mesh_check_vertex->module~tools_mesh_check module~write_scalar_field_implementation write_scalar_field_implementation module~write_scalar_field_implementation->module~tools_output proc~write_vector_field write_vector_field proc~write_vector_field->module~class_output proc~write_mesh write_mesh proc~write_mesh->module~class_output module~scalar_pde_div_implementation scalar_pde_div_implementation module~scalar_pde_div_implementation->module~op_div module~vector_field_flux_implementation vector_field_flux_implementation module~vector_field_flux_implementation->module~op_field module~check_mesh_quality_implementation check_mesh_quality_implementation module~check_mesh_quality_implementation->module~tools_mesh_check module~scalar_pde_source_implementation scalar_pde_source_implementation module~scalar_pde_source_implementation->module~op_source module~vector_pde_d2dt2_implementation vector_pde_d2dt2_implementation module~vector_pde_d2dt2_implementation->module~op_d2dt2 module~vector_field_grad_implementation vector_field_grad_implementation module~vector_field_grad_implementation->module~op_grad module~class_scalar_pde_procedures class_scalar_pde_procedures module~class_scalar_pde_procedures->module~class_scalar_pde proc~scalar_pde_laplacian scalar_pde_laplacian proc~scalar_pde_laplacian->module~op_grad proc~smooth_interior_vtx smooth_interior_vtx proc~smooth_interior_vtx->module~tools_mesh_check module~scalar_pde_ddt_implementation scalar_pde_ddt_implementation module~scalar_pde_ddt_implementation->module~op_ddt module~scalar_fld_vector_mul_implementation scalar_fld_vector_mul_implementation module~scalar_fld_vector_mul_implementation->module~op_field module~vector_pde_grad_implementation vector_pde_grad_implementation module~vector_pde_grad_implementation->module~op_grad

Contents


Interfaces

public interface scalar_field

  • public function scalar_field_(base, x, bx)

    Result is new scalar_field from parent field

    Arguments

    Type IntentOptional AttributesName
    type(field), intent(in) :: base
    real(kind=psb_dpk_), intent(in) :: x(:)
    real(kind=psb_dpk_), intent(in) :: bx(:)

    Return Value type(scalar_field)

interface

----- Algebra Operations -----

  • private module subroutine assign_scalar_field_s(f, x)

    Set the left-hand-side scalar_field values to the provided constant

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(inout) :: f
    real(kind=psb_dpk_), intent(in) :: x

interface

----- Algebra Operations -----

  • private module subroutine assign_scalar_field_v(f, x)

    Set the left-hand-side scalar_field values to the provided values

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(inout) :: f
    real(kind=psb_dpk_), intent(in) :: x(:)

interface

----- Algebra Operations -----

  • private module subroutine check_mesh_consistency_sf(f1, f2, where)

    Abort iff the scalar_field arguments are not associated with the same mesh

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: f1
    type(scalar_field), intent(in) :: f2
    character(len=*), intent(in) :: where

interface

----- Algebra Operations -----

  • private module subroutine create_scalar_field(fld, msh, dim, bc, mats, on_faces, x0, name)

    Define scalar_field from mesh, dimensions, boundary conditions, materials, face-centeredness, and values

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(out) :: fld
    type(mesh), intent(in), target:: msh
    type(dimensions), intent(in), optional :: dim
    type(bc_poly), intent(in), optional target:: bc(:)
    type(matptr), intent(in), optional target:: mats(:)
    logical, intent(in), optional :: on_faces
    real(kind=psb_dpk_), intent(in), optional :: x0
    character(len=*), intent(in), optional :: name

interface

----- Algebra Operations -----

  • private module subroutine free_field(fld)

    Deallocate scalar_field components: field parent and component arrays

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(inout) :: fld

interface

----- Algebra Operations -----

  • private module subroutine get_base(fld, base)

    Get parent field

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld
    type(field), intent(out) :: base

interface

----- Algebra Operations -----

  • private module subroutine get_scalar_field_bx(fld, bx)

    get scalar_field boundary values

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld
    real(kind=psb_dpk_), intent(out), allocatable:: bx(:)

interface

----- Algebra Operations -----

  • private module subroutine get_scalar_field_element(fld, x, i)

    get one scalar_field value

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld
    real(kind=psb_dpk_), intent(out) :: x
    integer, intent(in) :: i

interface

----- Algebra Operations -----

  • private module subroutine get_scalar_field_element_prev(fld, xp, i)

    get one scalar_field previous value

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld
    real(kind=psb_dpk_), intent(out) :: xp
    integer, intent(in) :: i

interface

----- Algebra Operations -----

  • private module function get_scalar_field_mat_id(fld, i)

    Result is scalar_field material identifier

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld
    integer, intent(in) :: i

    Return Value integer

interface

----- Algebra Operations -----

  • private module subroutine get_scalar_field_x(fld, x)

    get all scalar_field values

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld
    real(kind=psb_dpk_), intent(out), allocatable:: x(:)

interface

----- Algebra Operations -----

  • private module subroutine get_scalar_field_xp(fld, xp)

    Get all scalar_field previous values

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld
    real(kind=psb_dpk_), intent(out), allocatable:: xp(:)

interface

----- Algebra Operations -----

  • private module function interp_on_faces_s(fld) result(r)

    Result contains scalar_field cell values interpolated onto cell faces

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld

    Return Value type(scalar_field)

interface

----- Algebra Operations -----

  • private module function nemo_scalar_field_norm1(fld) result(norm)

    Result is L1 norm of scalar_field

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld

    Return Value real(kind=psb_dpk_)

interface

----- Algebra Operations -----

  • private module function nemo_scalar_field_normi(fld) result(norm)

    Result is infinity-norm of scalar_field

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld

    Return Value real(kind=psb_dpk_)

interface

----- Algebra Operations -----

  • private module function nemo_sizeof(fld)

    Result is the scalar_field size

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: fld

    Return Value integer(kind=nemo_int_long_)

interface

----- Algebra Operations -----

  • private module function scalar_field_dif(f1, f2) result(r)

    Result is the arithmetic difference of the two scalar_field operands

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: f1
    type(scalar_field), intent(in) :: f2

    Return Value type(scalar_field)

interface

----- Algebra Operations -----

  • private module function scalar_field_dif_s(f1, f2) result(r)

    Result is the arithmetic difference of the scalar_field operand and the constant operand

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: f1
    real(kind=psb_dpk_), intent(in) :: f2

    Return Value type(scalar_field)

interface

----- Algebra Operations -----

  • private module function scalar_field_div(f1, f2) result(r)

    Result is the ratio of the left-hand-side numerator and right-hand-side denominator scalar_field objects

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: f1
    type(scalar_field), intent(in) :: f2

    Return Value type(scalar_field)

interface

----- Algebra Operations -----

  • private module function scalar_field_mul(f1, f2) result(r)

    REsult is the arithmetic product of two scalar_field objects

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: f1
    type(scalar_field), intent(in) :: f2

    Return Value type(scalar_field)

interface

----- Algebra Operations -----

  • private module function scalar_field_scal(a, f) result(r)

    Rescale the scalar_field argument by the provided multiplicative constant

    Arguments

    Type IntentOptional AttributesName
    real(kind=psb_dpk_), intent(in) :: a
    class(scalar_field), intent(in) :: f

    Return Value type(scalar_field)

interface

----- Algebra Operations -----

  • private module function scalar_field_sum(f1, f2) result(r)

    Result is the arithmetic sum of the two scalar_field operands

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(in) :: f1
    type(scalar_field), intent(in) :: f2

    Return Value type(scalar_field)

interface

----- Algebra Operations -----

  • private module subroutine set_scalar_field_element(f, i, x)

    Set one scalar_field value

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(inout) :: f
    integer, intent(in) :: i

    element number to set

    real(kind=psb_dpk_), intent(in) :: x

    value

interface

----- Algebra Operations -----

  • private module subroutine set_scalar_field_group(f, ig, x)

    Set a group of scalar field values

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(inout) :: f
    integer, intent(in) :: ig
    real(kind=psb_dpk_), intent(in) :: x

interface

----- Algebra Operations -----

  • private module subroutine update_scalar_field(fld, mats, temp)

    Set all scalar_field values

    Arguments

    Type IntentOptional AttributesName
    class(scalar_field), intent(inout) :: fld
    type(matptr), intent(in), pointer:: mats(:)
    type(scalar_field), intent(in), optional :: temp

    temperature


Derived Types

type, public, extends(field) :: scalar_field

Encapsulate scalar-field state and operations, storing a mesh association in the parent field

Components

TypeVisibility AttributesNameInitial
integer, private, allocatable:: bmat(:)
real(kind=psb_dpk_), private, allocatable:: bx(:)

face values

integer, private, allocatable:: mat(:)
real(kind=psb_dpk_), private, allocatable:: x(:)

field nodal values

real(kind=psb_dpk_), private, allocatable:: xp(:)

previous nodal values

Constructor

public function scalar_field_(base, x, bx)

Result is new scalar_field from parent field

Type-Bound Procedures

generic, public :: assignment(=) => assign_scalar_field_s, assign_scalar_field_v

User-defined assignment

procedure, public :: bc_
procedure, public :: check_field_operands
generic, public :: check_mesh_consistency => check_mesh_consistency_bf, check_mesh_consistency_sf
procedure, public :: create_field
procedure, public :: create_scalar_field

Constructor

generic, public :: dim_ => get_field_dim
generic, public :: field_norm1 => nemo_scalar_field_norm1
generic, public :: field_normi => nemo_scalar_field_normi
generic, public :: fld_size => get_field_size
procedure, public :: free_field

Destructor

procedure, public :: get_base
generic, public :: get_bx => get_scalar_field_bx
generic, public :: get_material => get_field_mat_sub
procedure, public :: get_mesh
procedure, public :: get_scalar_field_mat_id
procedure, public :: get_units
generic, public :: get_x => get_scalar_field_x, get_scalar_field_element
generic, public :: get_xp => get_scalar_field_xp, get_scalar_field_element_prev
generic, public :: interp_on_faces => interp_on_faces_s
procedure, public :: mark_as_defined
procedure, public :: mat_
procedure, public :: msh_
procedure, public :: name_
procedure, public :: nemo_sizeof
procedure, public :: on_faces_

Getters

generic, public :: operator(*) => scalar_field_scal, scalar_field_mul

Algebra operations

generic, public :: operator(+) => scalar_field_sum
generic, public :: operator(-) => scalar_field_dif, scalar_field_dif_s
generic, public :: operator(/) => scalar_field_div
procedure, public :: set_field_dim
generic, public :: set_field_element => set_scalar_field_element
generic, public :: set_field_group => set_scalar_field_group
procedure, public :: set_field_on_faces

Setters

procedure, public :: set_units
generic, public :: update_field => update_scalar_field
procedure, public :: user_defined
procedure, private :: assign_scalar_field_s
procedure, private :: assign_scalar_field_v
procedure, private :: check_mesh_consistency_sf
procedure, private :: get_scalar_field_bx
procedure, private :: get_scalar_field_element
procedure, private :: get_scalar_field_element_prev
procedure, private :: get_scalar_field_x
procedure, private :: get_scalar_field_xp
procedure, private :: interp_on_faces_s
procedure, private :: nemo_scalar_field_norm1
procedure, private :: nemo_scalar_field_normi
procedure, private :: scalar_field_dif
procedure, private :: scalar_field_dif_s
procedure, private :: scalar_field_div
procedure, private :: scalar_field_mul
procedure, private, pass(f) :: scalar_field_scal
procedure, private :: scalar_field_sum
procedure, private :: set_scalar_field_element
procedure, private :: set_scalar_field_group
procedure, private :: update_scalar_field