initialize Function

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

Arguments

TypeIntentOptionalAttributesName
class(xml_writer_binary_local), intent(inout) :: self
character, intent(in) :: format
character, intent(in) :: filename
character, 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, intent(in), optional :: mesh_kind

Return Value integer(kind=I4P)


Contents

Source Code


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_binary_local), intent(inout)        :: self          !< Writer.
   character(*),                   intent(in)           :: format        !< File format: binary.
   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%is_volatile = .false. ; if (present(is_volatile)) self%is_volatile = is_volatile
   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