initialize Function

private function initialize(self, format, filename, mesh_topology, nx1, nx2, ny1, ny2, nz1, nz2, is_volatile, mesh_kind) result(error)

Type Bound

xml_writer_ascii_local

Arguments

Type IntentOptional Attributes Name
class(xml_writer_ascii_local), intent(inout) :: self
character(len=*), intent(in) :: format
character(len=*), intent(in) :: filename
character(len=*), intent(in) :: mesh_topology
integer(kind=I4P), intent(in), optional :: nx1
integer(kind=I4P), intent(in), optional :: nx2
integer(kind=I4P), intent(in), optional :: ny1
integer(kind=I4P), intent(in), optional :: ny2
integer(kind=I4P), intent(in), optional :: nz1
integer(kind=I4P), intent(in), optional :: nz2
logical, intent(in), optional :: is_volatile
character(len=*), intent(in), optional :: mesh_kind

Return Value integer(kind=I4P)


Calls

proc~~initialize~6~~CallsGraph proc~initialize~6 xml_writer_ascii_local%initialize proc~lower string%lower proc~initialize~6->proc~lower proc~open_xml_file xml_writer_abstract%open_xml_file proc~initialize~6->proc~open_xml_file proc~write_header_tag xml_writer_abstract%write_header_tag proc~initialize~6->proc~write_header_tag proc~write_topology_tag xml_writer_abstract%write_topology_tag proc~initialize~6->proc~write_topology_tag interface~str str proc~write_topology_tag->interface~str proc~chars string%chars proc~write_topology_tag->proc~chars proc~write_end_tag xml_writer_abstract%write_end_tag proc~write_topology_tag->proc~write_end_tag proc~write_self_closing_tag xml_writer_abstract%write_self_closing_tag proc~write_topology_tag->proc~write_self_closing_tag proc~write_start_tag xml_writer_abstract%write_start_tag proc~write_topology_tag->proc~write_start_tag proc~str_a_i1p str_a_I1P interface~str->proc~str_a_i1p proc~str_a_i2p str_a_I2P interface~str->proc~str_a_i2p proc~str_a_i4p str_a_I4P interface~str->proc~str_a_i4p proc~str_a_i8p str_a_I8P interface~str->proc~str_a_i8p proc~str_a_r4p str_a_R4P interface~str->proc~str_a_r4p proc~str_a_r8p str_a_R8P interface~str->proc~str_a_r8p proc~str_bol str_bol interface~str->proc~str_bol proc~str_i1p str_I1P interface~str->proc~str_i1p proc~str_i2p str_I2P interface~str->proc~str_i2p proc~str_i4p str_I4P interface~str->proc~str_i4p proc~str_i8p str_I8P interface~str->proc~str_i8p proc~str_r4p str_R4P interface~str->proc~str_r4p proc~str_r8p str_R8P interface~str->proc~str_r8p proc~strf_i1p strf_I1P interface~str->proc~strf_i1p proc~strf_i2p strf_I2P interface~str->proc~strf_i2p proc~strf_i4p strf_I4P interface~str->proc~strf_i4p proc~strf_i8p strf_I8P interface~str->proc~strf_i8p proc~strf_r4p strf_R4P interface~str->proc~strf_r4p proc~strf_r8p strf_R8P interface~str->proc~strf_r8p proc~stringify xml_tag%stringify proc~write_end_tag->proc~stringify proc~write_self_closing_tag->proc~stringify proc~write_start_tag->proc~stringify proc~str_a_i1p->proc~str_i1p proc~str_a_i2p->proc~str_i2p proc~str_a_i4p->proc~str_i4p proc~str_a_i8p->proc~str_i8p proc~str_a_r4p->proc~str_r4p proc~str_a_r8p->proc~str_r8p proc~compact_real_string compact_real_string proc~str_r4p->proc~compact_real_string proc~str_r8p->proc~compact_real_string proc~stringify->proc~chars proc~end_tag xml_tag%end_tag proc~stringify->proc~end_tag proc~is_allocated string%is_allocated proc~stringify->proc~is_allocated proc~self_closing_tag xml_tag%self_closing_tag proc~stringify->proc~self_closing_tag proc~start_tag xml_tag%start_tag proc~stringify->proc~start_tag proc~attributes xml_tag%attributes proc~self_closing_tag->proc~attributes proc~start_tag->proc~attributes

Source Code

  function initialize(self, format, filename, mesh_topology, nx1, nx2, ny1, ny2, nz1, nz2, &
                      is_volatile, mesh_kind) result(error)
  !< Initialize writer.
  class(xml_writer_ascii_local), intent(inout)        :: self          !< Writer.
  character(*),                  intent(in)           :: format        !< File format: ASCII.
  character(*),                  intent(in)           :: filename      !< File name.
  character(*),                  intent(in)           :: mesh_topology !< Mesh topology.
  integer(I4P),                  intent(in), optional :: nx1           !< Initial node of x axis.
  integer(I4P),                  intent(in), optional :: nx2           !< Final node of x axis.
  integer(I4P),                  intent(in), optional :: ny1           !< Initial node of y axis.
  integer(I4P),                  intent(in), optional :: ny2           !< Final node of y axis.
  integer(I4P),                  intent(in), optional :: nz1           !< Initial node of z axis.
  integer(I4P),                  intent(in), optional :: nz2           !< Final node of z axis.
  character(*),                  intent(in), optional :: mesh_kind     !< Kind of mesh data: Float64, Float32, ecc.
  logical,                       intent(in), optional :: is_volatile   !< Flag to check volatile writer.
  integer(I4P)                                        :: error         !< Error status.

  self%topology = trim(adjustl(mesh_topology))
  self%format_ch = format
  self%format_ch = self%format_ch%lower()
  call self%open_xml_file(filename=filename)
  call self%write_header_tag
  call self%write_topology_tag(nx1=nx1, nx2=nx2, ny1=ny1, ny2=ny2, nz1=nz1, nz2=nz2, mesh_kind=mesh_kind)
  error = self%error
  endfunction initialize