Skip to content

Lib_VTK_IO_DAT_VAR

DAT and VAR interface definitions for Lib_VTK_IO.

Source: src/third_party/VTKFortran/references/legacy/Lib_VTK_IO_DAT_VAR.f90

Dependencies

Contents

Interfaces

VTK_VAR

Procedure for saving data variable(s) in VTK-legacy standard.

VTK_VAR is an interface to 8 different functions, there are 3 functions for scalar variables, 3 functions for vectorial variables and 2 functions texture variables: scalar and vectorial data can be R8P, R4P and I4P data while texture variables can be only R8P or R4P. This function saves the data variables related to geometric mesh. @note The inputs that must be passed change depending on the data variables type.

Examples of usage

Scalar data calling

fortran
 integer(I4P):: NN
 real(R4P)::    var(1:NN)
 ...
 E_IO=VTK_VAR(NN,'Sca',var)
 ...

Vectorial data calling

fortran
 integer(I4P):: NN
 real(R4P)::    varX(1:NN),varY(1:NN),varZ(1:NN)
 ...
 E_IO=VTK_VAR('vect',NN,'Vec',varX,varY,varZ)
 ...

Module procedures: VTK_VAR_SCAL_R8, VTK_VAR_SCAL_R4, VTK_VAR_SCAL_I4, VTK_VAR_VECT_R8, VTK_VAR_VECT_R4, VTK_VAR_VECT_I4, VTK_VAR_TEXT_R8, VTK_VAR_TEXT_R4

Functions

VTK_DAT

Function for initializing/finalizing the saving of data associated to the mesh.

Function that must be called before saving the data related to geometric mesh, this function initializes the saving of data variables indicating the type (node or cell centered) of variables that will be saved. @note A single file can contain both cell and node centered variables. In this case the VTK_DAT function must be called two times, before saving cell-centered variables and before saving node-centered variables.

Examples of usage

Saving node data

fortran
 E_IO=VTK_DAT_XML(50,'node')

Saving cell data

fortran
 E_IO=VTK_DAT_XML(50,'cell')

Returns: integer(kind=I4P)

fortran
function VTK_DAT(NC_NN, var_location, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
NC_NNinteger(kind=I4P)inNumber of cells or nodes of field.
var_locationcharacter(len=*)inLocation of saving variables: cell for cell-centered, node for node-centered.
cfinteger(kind=I4P)inoptionalCurrent file index (for concurrent files IO).

Call graph

VTK_VAR_SCAL_R8

Function for saving field of scalar variable (R8P).

Returns: integer(kind=I4P)

fortran
function VTK_VAR_SCAL_R8(NC_NN, varname, var, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
NC_NNinteger(kind=I4P)inNumber of nodes or cells.
varnamecharacter(len=*)inVariable name.
varreal(kind=R8P)inVariable to be saved.
cfinteger(kind=I4P)inoptionalCurrent file index (for concurrent files IO).

VTK_VAR_SCAL_R4

Function for saving field of scalar variable (R4P).

Returns: integer(kind=I4P)

fortran
function VTK_VAR_SCAL_R4(NC_NN, varname, var, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
NC_NNinteger(kind=I4P)inNumber of nodes or cells.
varnamecharacter(len=*)inVariable name.
varreal(kind=R4P)inVariable to be saved.
cfinteger(kind=I4P)inoptionalCurrent file index (for concurrent files IO).

VTK_VAR_SCAL_I4

Function for saving field of scalar variable (I4P).

Returns: integer(kind=I4P)

fortran
function VTK_VAR_SCAL_I4(NC_NN, varname, var, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
NC_NNinteger(kind=I4P)inNumber of nodes or cells.
varnamecharacter(len=*)inVariable name.
varinteger(kind=I4P)inVariable to be saved.
cfinteger(kind=I4P)inoptionalCurrent file index (for concurrent files IO).

VTK_VAR_VECT_R8

Function for saving field of vectorial variable (R8P).

Returns: integer(kind=I4P)

fortran
function VTK_VAR_VECT_R8(vec_type, NC_NN, varname, varX, varY, varZ, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
vec_typecharacter(len=*)inVector type: vect = generic vector , norm = normal vector.
NC_NNinteger(kind=I4P)inNumber of nodes or cells.
varnamecharacter(len=*)inVariable name.
varXreal(kind=R8P)inX component of vector.
varYreal(kind=R8P)inY component of vector.
varZreal(kind=R8P)inZ component of vector.
cfinteger(kind=I4P)inoptionalCurrent file index (for concurrent files IO).

Call graph

VTK_VAR_VECT_R4

Function for saving field of vectorial variable (R4P).

Returns: integer(kind=I4P)

fortran
function VTK_VAR_VECT_R4(vec_type, NC_NN, varname, varX, varY, varZ, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
vec_typecharacter(len=*)inVector type: vect = generic vector , norm = normal vector.
NC_NNinteger(kind=I4P)inNumber of nodes or cells.
varnamecharacter(len=*)inVariable name.
varXreal(kind=R4P)inX component of vector.
varYreal(kind=R4P)inY component of vector.
varZreal(kind=R4P)inZ component of vector.
cfinteger(kind=I4P)inoptionalCurrent file index (for concurrent files IO).

Call graph

VTK_VAR_VECT_I4

Function for saving field of vectorial variable (I4P).

Returns: integer(kind=I4P)

fortran
function VTK_VAR_VECT_I4(NC_NN, varname, varX, varY, varZ, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
NC_NNinteger(kind=I4P)inNumber of nodes or cells.
varnamecharacter(len=*)inVariable name.
varXinteger(kind=I4P)inX component of vector.
varYinteger(kind=I4P)inY component of vector.
varZinteger(kind=I4P)inZ component of vector.
cfinteger(kind=I4P)inoptionalCurrent file index (for concurrent files IO).

VTK_VAR_TEXT_R8

Function for saving texture variable (R8P).

Returns: integer(kind=I4P)

fortran
function VTK_VAR_TEXT_R8(NC_NN, dimm, varname, textCoo, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
NC_NNinteger(kind=I4P)inNumber of nodes or cells.
dimminteger(kind=I4P)inTexture dimensions.
varnamecharacter(len=*)inVariable name.
textCooreal(kind=R8P)inTexture.
cfinteger(kind=I4P)inoptionalCurrent file index (for concurrent files IO).

VTK_VAR_TEXT_R4

Function for saving texture variable (R4P).

Returns: integer(kind=I4P)

fortran
function VTK_VAR_TEXT_R4(NC_NN, dimm, varname, textCoo, cf) result(E_IO)

Arguments

NameTypeIntentAttributesDescription
NC_NNinteger(kind=I4P)inNumber of nodes or cells.
dimminteger(kind=I4P)inTexture dimensions.
varnamecharacter(len=*)inVariable name.
textCooreal(kind=R4P)inTexture.
cfinteger(kind=I4P)inoptionalCurrent file index (for concurrent files IO).