Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(vtm_file), | intent(inout) | :: | self | |||
character, | intent(in) | :: | filename | |||
integer(kind=I4P), | intent(in), | optional | :: | scratch_units_number |
function initialize(self, filename, scratch_units_number) result(error)
!< Initialize file (writer).
class(vtm_file), intent(inout) :: self !< VTM file.
character(*), intent(in) :: filename !< File name of output VTM file.
integer(I4P), intent(in), optional :: scratch_units_number !< Number of scratch units for very large list of named blocks.
integer(I4P) :: scratch_units_number_ !< Number of scratch units for very large list of named blocks.
integer(I4P) :: error !< Error status.
if (.not.is_initialized) call penf_init
if (.not.is_b64_initialized) call b64_init
scratch_units_number_ = 0_I4P ; if (present(scratch_units_number)) scratch_units_number_ = scratch_units_number
error = self%finalize()
if (allocated(self%xml_writer)) deallocate(self%xml_writer)
allocate(xml_writer_ascii_local :: self%xml_writer)
error = self%xml_writer%initialize(format='ascii', filename=filename, mesh_topology='vtkMultiBlockDataSet')
if (scratch_units_number_>0_I4P) allocate(self%scratch_unit(scratch_units_number_))
endfunction initialize