• Stars
    star
    137
  • Rank 259,939 (Top 6 %)
  • Language
    Fortran
  • Created about 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

pure Fortran VTK (XML) API

VTKFortran GitHub tag

Join the chat at https://gitter.im/szaghi/VTKFortran

License License License License

Status CI Status Coverage Status

VTKFortran, pure Fortran VTK (XML) API

A KISS pure Fortran Library to parse and emit files conforming VTK (XML) standard

  • VTKFortran is a pure Fortran library to parse and emit VTK files, VTK standard;
  • VTKFortran is Fortran 2003+ standard compliant;
  • VTKFortran supports parallel architectures, it being threads-safe;
  • VTKFortran supports ascii, binary (Base64 encoding) and raw file formats;
  • VTKFortran is a Free, Open Source Project.

Issues

GitHub issues

Compiler Support

Compiler Compiler Compiler Compiler Compiler Compiler


Main features | Copyrights | Documentation | A Taste of VTKFortran


Main features

VTK features

Exporters

Legacy standard
  • Structured Points;
  • Structured Grid;
  • Unstructured Grid;
  • Polydata;
  • Rectilinear Grid;
  • Field;
XML standard
  • serial dataset:
    • Image Data;
    • Polydata;
    • Rectilinear Grid;
    • Structured Grid;
    • Unstructured Grid;
  • parallel (partitioned) dataset:
    • Image Data;
    • Polydata;
    • Rectilinear Grid;
    • Structured Grid;
    • Unstructured Grid;
  • composite dataset:
    • vtkMultiBlockDataSet.

Importers

The importers are under developing.

Parallel Support

VTKFortran can be safely used in parallel environments, handling multiple concurrent files: it is thread/processor-safe, meaning that it can be safely used into parallel architectures using OpenMP and/or MPI paradigms.

Copyrights

VTKFortran is an open source project, it is distributed under a multi-licensing system:

Anyone is interest to use, to develop or to contribute to VTKFortran is welcome, feel free to select the license that best matches your soul!

More details can be found on wiki.

Go to Top

Documentation

Besides this README file the VTKFortran documentation is contained into its own wiki. Detailed documentation of the API is contained into the GitHub Pages that can also be created locally by means of ford tool.

Go to Top

A taste of VTKFortran

Let us assume our aim being to save our pure Fortran data into a VTK structured grid file in binary XML form. This is simple as

use vtk_fortran, only : vtk_file

type(vtk_file)     :: a_vtk_file                             ! A VTK file.
integer, parameter :: nx1=0_I4P                              ! X lower bound extent.
integer, parameter :: nx2=9_I4P                              ! X upper bound extent.
integer, parameter :: ny1=0_I4P                              ! Y lower bound extent.
integer, parameter :: ny2=5_I4P                              ! Y upper bound extent.
integer, parameter :: nz1=0_I4P                              ! Z lower bound extent.
integer, parameter :: nz2=5_I4P                              ! Z upper bound extent.
integer, parameter :: nn=(nx2-nx1+1)*(ny2-ny1+1)*(nz2-nz1+1) ! Number of elements.
real               :: x(nx1:nx2,ny1:ny2,nz1:nz2)             ! X coordinates.
real               :: y(nx1:nx2,ny1:ny2,nz1:nz2)             ! Y coordinates.
real               :: z(nx1:nx2,ny1:ny2,nz1:nz2)             ! Z coordinates.
real               :: v(nx1:nx2,ny1:ny2,nz1:nz2)             ! Variable at coordinates.
integer            :: error                                  ! Error status.

! initialize the data...

error = a_vtk_file%initialize(format='binary', filename='XML_STRG-binary.vts', &
                              mesh_topology='StructuredGrid',                  &
                              nx1=nx1, nx2=nx2, ny1=ny1, ny2=ny2, nz1=nz1, nz2=nz2)
error = a_vtk_file%xml_writer%write_piece(nx1=nx1, nx2=nx2, ny1=ny1, ny2=ny2, nz1=nz1, nz2=nz2)
error = a_vtk_file%xml_writer%write_geo(n=nn, x=x, y=y, z=z)
error = a_vtk_file%xml_writer%write_dataarray(location='node', action='open')
error = a_vtk_file%xml_writer%write_dataarray(data_name='float64_scalar', x=v, one_component=.true.)
error = a_vtk_file%xml_writer%write_dataarray(location='node', action='close')
error = a_vtk_file%xml_writer%write_piece()
error = a_vtk_file%finalize()

Note that all VTKFortran functions return an error code that can be used for sophisticated error trapping algorithms.

More Repositories

1

FLAP

Fortran command Line Arguments Parser for poor people
Fortran
141
star
2

FoBiS

FoBiS.py, Fortran projects Building System for poor people
Python
130
star
3

OFF

OFF, Open source Finite volume Fluid dynamics code
Fortran
126
star
4

StringiFor

Strings Fortran Manipulator with steroids
Fortran
83
star
5

MaTiSSe

Markdown To Impressive Scientific Slides
Python
45
star
6

PENF

Portability Environment for Fortran poor people
Fortran
38
star
7

FACE

Fortran Ansi Colors (and Styles) Environment
Fortran
37
star
8

FiNeR

Fortran INI ParseR and generator
Fortran
36
star
9

forbear

Fortran (progress) B(e)ar envinronment
Fortran
36
star
10

zen-of-fortran

an opinionated coding guidelines for Fortran poor people
31
star
11

VecFor

Vector algebra class for Fortran poor people
Fortran
29
star
12

FURY

Fortran Units (environment) for Reliable phYsical math
Fortran
29
star
13

PreForM

PreForM.py, Preprocessor for Fortran poor Men
Python
24
star
14

zen-of-fortran-talk

a path to discover Modern Fortran, a poor, informal talk for newbies Fortraners
Fortran
19
star
15

ZOO

ZOO, Zaghi fOrtran cOllection, where my wild Fortran pets will survive
Fortran
19
star
16

BeFoR64

BeFoR64, Base64 encoding/decoding library for FoRtran poor men
Fortran
18
star
17

FITTER

Fortran tIc Toc Timer
Fortran
14
star
18

FOSSIL

FOSSIL, FOrtran Stereo (si) Litography parser
Fortran
14
star
19

HASTY

HASh Table fortran container exploting coarraY
Fortran
13
star
20

DEFY

DEmystify Fortran mYths
Fortran
12
star
21

fmake

Small script for easy creation of makefile for Fortran (standard 90 or higher) projects
Racket
11
star
22

FLOw

Fortran fLuid Object
Fortran
11
star
23

FORESEER

FOrtran RiEmann SolveErs EnviRonment
Fortran
10
star
24

MORTIF

MORTon Indexer (Z-order) Fortran environment
Fortran
10
star
25

FriVolous

Finite Volume block-structured Fortran abstract class
Fortran
8
star
26

FUNDAL

Fortran UNified Device Acceleration Library
Fortran
8
star
27

leaks_hunter

hunter of Fortran Compilers memory leaks
Fortran
7
star
28

single-linked-list

Fortran
7
star
29

forget

FORtran Git Template
Fortran
6
star
30

dotfiles

my dotfiles...me!
Perl
5
star
31

dmoz-fortran-archive

an unofficial of DMOZ Fortran archive
HTML
5
star
32

Shu-Osher-shock-tube-problem

Regression-test results of Shu-Osher shock tube problem
Fortran
4
star
33

NTNU-BTs-CNR-INSEAN

CNR-INSEAN CFD simulations of NTNU Blind Tests, Horizontal Axis Wind Turbines experiments
Shell
3
star
34

DCS

Driven-Cavity Simulator
Fortran
3
star
35

cfdshipiowa_gridgen_to_xnavis

a Fortran Environment to handle CFDShip-Iowa Gridgen files and optionally emit Xnavis ones
Fortran
3
star
36

LoadBalance

Load balancing for Xnavis code
Fortran
1
star
37

ATENA-talk-2016-03-09

a talk for ATENA workshop
CSS
1
star