77 #include "FieldExportConstants.h" 110 LOGICAL :: same_header
111 INTEGER(INTG) :: number_of_components
115 INTEGER(INTG),
ALLOCATABLE:: component_versions(:)
125 INTEGER(INTG) :: number_of_entries
127 INTEGER(INTG),
ALLOCATABLE:: list_of_global_number(:)
136 & bind(c,name=
"FieldExport_OpenSession")
139 INTEGER(C_INT),
VALUE :: exportType
140 CHARACTER(C_CHAR),
INTENT(IN) :: filename(*)
141 INTEGER(C_INT),
INTENT(OUT) :: handle
142 INTEGER(C_INT) :: FieldExport_OpenSession
146 & bind(c,name=
"FieldExport_Group")
149 INTEGER(C_INT),
VALUE :: handle
150 CHARACTER(C_CHAR),
INTENT(IN) :: groupName(*)
151 INTEGER(C_INT) :: FieldExport_Group
155 & bind(c,name=
"FieldExport_MeshDimensions")
158 INTEGER(C_INT),
VALUE :: handle
159 INTEGER(C_INT),
VALUE :: meshDimensions
160 INTEGER(C_INT),
VALUE :: basisType
161 INTEGER(C_INT) :: FieldExport_MeshDimensions
165 & bind(c,name=
"FieldExport_ScalingFactorCount")
168 INTEGER(C_INT),
VALUE :: handle
169 INTEGER(C_INT),
VALUE :: scalingFactorCount
170 INTEGER(C_INT) :: FieldExport_ScalingFactorCount
173 FUNCTION fieldexport_scalefactors( handle, numberOfXi, interpolationXi, numberOfScaleFactors ) &
174 & bind(c,name=
"FieldExport_ScaleFactors")
177 INTEGER(C_INT),
VALUE :: handle
178 INTEGER(C_INT),
VALUE :: numberOfXi
179 TYPE(c_ptr),
VALUE :: interpolationXi
180 INTEGER(C_INT),
VALUE :: numberOfScaleFactors
181 INTEGER(C_INT) :: FieldExport_ScaleFactors
182 END FUNCTION fieldexport_scalefactors
185 & bind(c,name=
"FieldExport_NodeCount")
188 INTEGER(C_INT),
VALUE :: handle
189 INTEGER(C_INT),
VALUE :: nodeCount
190 INTEGER(C_INT) :: FieldExport_NodeCount
194 & bind(c,name=
"FieldExport_FieldCount")
197 INTEGER(C_INT),
VALUE :: handle
198 INTEGER(C_INT),
VALUE :: fieldCount
199 INTEGER(C_INT) :: FieldExport_FieldCount
203 & bind(c,name=
"FieldExport_CoordinateVariable")
206 INTEGER(C_INT),
VALUE :: handle
207 CHARACTER(LEN=1, KIND=C_CHAR) :: variableName(*)
208 INTEGER(C_INT),
VALUE :: variableNumber
209 INTEGER(C_INT),
VALUE :: coordinateSystemType
210 INTEGER(C_INT),
VALUE :: componentCount
211 INTEGER(C_INT) :: FieldExport_CoordinateVariable
214 FUNCTION fieldexport_variable( handle, variableName, variableNumber, fieldType, variableType, componentCount ) &
215 & bind(c,name=
"FieldExport_Variable")
218 INTEGER(C_INT),
VALUE :: handle
219 CHARACTER(LEN=1, KIND=C_CHAR) :: variableName(*)
220 INTEGER(C_INT),
VALUE :: variableNumber
221 INTEGER(C_INT),
VALUE :: fieldType
222 INTEGER(C_INT),
VALUE :: variableType
223 INTEGER(C_INT),
VALUE :: componentCount
224 INTEGER(C_INT) :: FieldExport_Variable
228 & numberofxi, interpolationxi ) &
229 & bind(c,name=
"FieldExport_CoordinateComponent")
232 INTEGER(C_INT),
VALUE :: handle
233 INTEGER(C_INT),
VALUE :: coordinateSystemType
234 INTEGER(C_INT),
VALUE :: componentNumber
235 INTEGER(C_INT),
VALUE :: interpType
236 INTEGER(C_INT),
VALUE :: numberOfXi
237 TYPE(c_ptr),
VALUE :: interpolationXi
238 INTEGER(C_INT) :: FieldExport_CoordinateComponent
242 & bind(c,name=
"FieldExport_Component")
245 INTEGER(C_INT),
VALUE :: handle
246 INTEGER(C_INT),
VALUE :: componentNumber
247 INTEGER(C_INT),
VALUE :: interpType
248 INTEGER(C_INT),
VALUE :: numberOfXi
249 TYPE(c_ptr),
VALUE :: interpolationXi
250 INTEGER(C_INT) :: FieldExport_Component
254 & bind(c,name=
"FieldExport_ElementGridSize")
257 INTEGER(C_INT),
VALUE :: handle
258 INTEGER(C_INT),
VALUE :: headerType
259 INTEGER(C_INT),
VALUE :: numberOfXi
260 TYPE(c_ptr),
VALUE :: numberGauss
261 INTEGER(C_INT) :: FieldExport_ElementGridSize
266 & bind(c,name=
"FieldExport_NodeScaleIndexes")
269 INTEGER(C_INT),
VALUE :: handle
270 INTEGER(C_INT),
VALUE :: nodeCount
271 TYPE(c_ptr),
VALUE :: derivativeCount
272 TYPE(c_ptr),
VALUE :: elementDerivatives
273 TYPE(c_ptr),
VALUE :: nodeIndexes
274 TYPE(c_ptr),
VALUE :: scaleIndexes
275 INTEGER(C_INT) :: FieldExport_NodeScaleIndexes
279 & bind(c,name=
"FieldExport_ElementIndex")
282 INTEGER(C_INT),
VALUE :: handle
283 INTEGER(C_INT),
VALUE :: dimensionCount
284 INTEGER(C_INT),
VALUE :: elementIndex
285 INTEGER(C_INT) :: FieldExport_ElementIndex
289 & bind(c,name=
"FieldExport_ElementNodeIndices")
292 INTEGER(C_INT),
VALUE :: handle
293 INTEGER(C_INT),
VALUE :: nodeCount
294 TYPE(c_ptr),
VALUE :: nodeIndices
295 INTEGER(C_INT) :: FieldExport_ElementNodeIndices
299 & bind(c,name=
"FieldExport_ElementNodeScales")
302 INTEGER(C_INT),
VALUE :: handle
303 INTEGER(C_INT),
VALUE :: isFirstSet
304 INTEGER(C_INT),
VALUE :: scaleCount
305 TYPE(c_ptr),
VALUE :: scales
306 INTEGER(C_INT) :: FieldExport_ElementNodeScales
310 & bind(c,name=
"FieldExport_ElementGridValues")
313 INTEGER(C_INT),
VALUE :: handle
314 INTEGER(C_INT),
VALUE :: isFirstSet
315 INTEGER(C_INT),
VALUE :: numberOfXi
316 REAL(DP),
VALUE :: elementValue
317 INTEGER(C_INT) :: FieldExport_ElementGridValues
320 FUNCTION fieldexport_nodevalues( handle, nodeNumber, valueCount, nodeValues ) &
321 & bind(c,name=
"FieldExport_NodeValues")
324 INTEGER(C_INT),
VALUE :: handle
325 INTEGER(C_INT),
VALUE :: nodeNumber
326 INTEGER(C_INT),
VALUE :: valueCount
327 TYPE(c_ptr),
VALUE :: nodeValues
328 INTEGER(C_INT) :: FieldExport_NodeValues
329 END FUNCTION fieldexport_nodevalues
332 & bind(c,name=
"FieldExport_CloseSession")
335 INTEGER(C_INT),
VALUE :: handle
336 INTEGER(C_INT) :: FieldExport_CloseSession
339 FUNCTION fieldexport_coordinatederivativeindices( handle, componentNumber, coordinateSystemType, numberOfDerivatives, &
340 & derivatives, valueindex ) bind(c,name=
"FieldExport_CoordinateDerivativeIndices")
343 INTEGER(C_INT),
VALUE :: handle
344 INTEGER(C_INT),
VALUE :: componentNumber
345 INTEGER(C_INT),
VALUE :: coordinateSystemType
346 INTEGER(C_INT),
VALUE :: numberOfDerivatives
347 TYPE(c_ptr),
VALUE :: derivatives
348 INTEGER(C_INT),
VALUE :: valueIndex
349 INTEGER(C_INT) :: FieldExport_CoordinateDerivativeIndices
350 END FUNCTION fieldexport_coordinatederivativeindices
352 FUNCTION fieldexport_derivativeindices( handle, componentNumber, fieldType, variableType, numberOfDerivatives, &
353 & derivatives, valueindex ) bind(c,name=
"FieldExport_DerivativeIndices")
356 INTEGER(C_INT),
VALUE :: handle
357 INTEGER(C_INT),
VALUE :: componentNumber
358 INTEGER(C_INT),
VALUE :: fieldType
359 INTEGER(C_INT),
VALUE :: variableType
360 INTEGER(C_INT),
VALUE :: numberOfDerivatives
361 TYPE(c_ptr),
VALUE :: derivatives
362 INTEGER(C_INT),
VALUE :: valueIndex
363 INTEGER(C_INT) :: FieldExport_DerivativeIndices
364 END FUNCTION fieldexport_derivativeindices
366 FUNCTION fieldexport_endcomponent(handle) BIND(C,NAME="FieldExport_EndComponent")
369 INTEGER(C_INT),
VALUE :: handle
370 INTEGER(C_INT) :: FieldExport_EndComponent
371 END FUNCTION fieldexport_endcomponent
373 FUNCTION fieldexport_versioninfo(handle, numberOfVersions) BIND(C,NAME="FieldExport_VersionInfo")
376 INTEGER(C_INT),
VALUE :: handle
377 INTEGER(C_INT),
VALUE :: numberOfVersions
378 INTEGER(C_INT) :: FieldExport_VersionInfo
379 END FUNCTION fieldexport_versioninfo
419 SUBROUTINE reallocate_int( array, newSize, errorMessage, ERR, ERROR, * )
420 INTEGER(INTG),
ALLOCATABLE,
INTENT(INOUT) :: array(:)
421 INTEGER(INTG),
INTENT(IN) :: newSize
422 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
423 INTEGER(INTG),
INTENT(OUT) :: ERR
426 enters(
"REALLOCATE_INT",err,error,*999)
428 IF(
ALLOCATED( array ) )
THEN 432 ALLOCATE( array( newsize ), stat = err )
433 IF( err /= 0 )
CALL flagerror( errormessage, err, error, *999)
437 exits(
"REALLOCATE_INT")
439 999 errorsexits(
"REALLOCATE_INT",err,error)
447 SUBROUTINE reallocate_real( array, newSize, errorMessage, ERR, ERROR, * )
448 REAL(DP),
ALLOCATABLE,
INTENT(INOUT) :: array(:)
449 INTEGER(INTG),
INTENT(IN) :: newSize
450 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
451 INTEGER(INTG),
INTENT(OUT) :: ERR
454 enters(
"REALLOCATE_REAL",err,error,*999)
456 IF(
ALLOCATED( array ) )
THEN 460 ALLOCATE( array( newsize ), stat = err )
461 IF( err /= 0 )
CALL flagerror( errormessage, err, error, *999)
465 exits(
"REALLOCATE_REAL")
467 999 errorsexits(
"REALLOCATE_REAL",err,error)
477 INTEGER(INTG),
INTENT(IN) :: newSize
478 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
479 INTEGER(INTG),
INTENT(OUT) :: ERR
482 enters(
"REALLOCATE_STRING",err,error,*999)
484 IF(
ALLOCATED( array ) )
THEN 488 ALLOCATE( array( newsize ), stat = err )
489 IF( err /= 0 )
CALL flagerror( errormessage, err, error, *999)
491 exits(
"REALLOCATE_STRING")
493 999 errorsexits(
"REALLOCATE_STRING",err,error)
503 INTEGER(INTG),
INTENT(IN) :: newSize
504 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
505 INTEGER(INTG),
INTENT(OUT) :: ERR
508 enters(
"REALLOCATE_COMPONENTS",err,error,*999)
510 IF(
ALLOCATED( array ) )
THEN 514 ALLOCATE( array( newsize ), stat = err )
515 IF( err /= 0 )
CALL flagerror( errormessage, err, error, *999)
517 exits(
"REALLOCATE_COMPONENTS")
519 999 errorsexits(
"REALLOCATE_COMPONENTS",err,error)
529 INTEGER(INTG),
INTENT(IN) :: newSize
530 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
531 INTEGER(INTG),
INTENT(OUT) :: ERR
534 enters(
"REALLOCATE_BASIS",err,error,*999)
536 IF(
ALLOCATED( array ) )
THEN 540 ALLOCATE( array( newsize ), stat = err )
541 IF( err /= 0 )
CALL flagerror( errormessage, err, error, *999)
543 exits(
"REALLOCATE_BASIS")
545 999 errorsexits(
"REALLOCATE_BASIS",err,error)
555 INTEGER(INTG),
INTENT(IN) :: newSize
556 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
557 INTEGER(INTG),
INTENT(OUT) :: ERR
560 enters(
"REALLOCATE_FIELD",err,error,*999)
562 IF(
ALLOCATED( array ) )
THEN 566 ALLOCATE( array( newsize ), stat = err )
567 IF( err /= 0 )
CALL flagerror( errormessage, err, error, *999)
569 exits(
"REALLOCATE_FIELD")
571 999 errorsexits(
"REALLOCATE_FIELD",err,error)
581 INTEGER(INTG),
INTENT(IN) :: newSize
582 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
583 INTEGER(INTG),
INTENT(OUT) :: ERR
586 enters(
"REALLOCATE_ELEMENTS",err,error,*999)
588 IF(
ALLOCATED( array ) )
THEN 592 ALLOCATE( array( newsize ), stat = err )
593 IF( err /= 0 )
CALL flagerror( errormessage, err, error, *999)
595 exits(
"REALLOCATE_ELEMENTS")
597 999 errorsexits(
"REALLOCATE_ELEMENTS",err,error)
605 SUBROUTINE reallocate_2d( array, newSize1, newSize2, errorMessage, ERR, ERROR, * )
606 INTEGER(INTG),
ALLOCATABLE,
INTENT(INOUT) :: array(:,:)
607 INTEGER(INTG),
INTENT(IN) :: newSize1
608 INTEGER(INTG),
INTENT(IN) :: newSize2
609 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
610 INTEGER(INTG),
INTENT(OUT) :: ERR
613 enters(
"REALLOCATE_2D",err,error,*999)
615 IF(
ALLOCATED( array ) )
THEN 619 ALLOCATE( array( newsize1, newsize2 ), stat = err )
620 IF( err /= 0 )
CALL flagerror( errormessage, err, error, *999)
624 exits(
"REALLOCATE_2D")
626 999 errorsexits(
"REALLOCATE_2D",err,error)
634 SUBROUTINE grow_array_int( array, delta, errorMessage, ERR, ERROR, * )
635 INTEGER(INTG),
ALLOCATABLE,
INTENT(INOUT) :: array(:)
636 INTEGER(INTG),
INTENT(IN) :: delta
637 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
638 INTEGER(INTG),
INTENT(OUT) :: ERR
641 INTEGER(INTG),
ALLOCATABLE :: tempArray(:)
642 INTEGER(INTG) :: oldSize
644 enters(
"GROW_ARRAY_INT",err,error,*999)
646 IF( .NOT.
ALLOCATED( array ) )
THEN 647 CALL reallocate( array, delta, errormessage, err, error, *999 )
651 oldsize =
SIZE( array )
653 CALL reallocate( temparray, oldsize, errormessage, err, error, *999 )
655 temparray(:) = array(:)
657 CALL reallocate( array, oldsize + delta, errormessage, err, error, *999 )
659 array(1:oldsize) = temparray(:)
661 DEALLOCATE( temparray )
663 exits(
"GROW_ARRAY_INT")
665 999 errorsexits(
"GROW_ARRAY_INT",err,error)
673 SUBROUTINE grow_array_real( array, delta, errorMessage, ERR, ERROR, * )
674 REAL(C_DOUBLE),
ALLOCATABLE,
INTENT(INOUT) :: array(:)
675 INTEGER(INTG),
INTENT(IN) :: delta
676 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
677 INTEGER(INTG),
INTENT(OUT) :: ERR
680 REAL(C_DOUBLE),
ALLOCATABLE :: tempArray(:)
681 INTEGER(INTG) :: oldSize
683 enters(
"GROW_ARRAY_REAL",err,error,*999)
685 IF( .NOT.
ALLOCATED( array ) )
THEN 686 CALL reallocate( array, delta, errormessage, err, error, *999 )
690 oldsize =
SIZE( array )
692 CALL reallocate( temparray, oldsize, errormessage, err, error, *999 )
694 temparray(:) = array(:)
696 CALL reallocate( array, oldsize + delta, errormessage, err, error, *999 )
698 array(1:oldsize) = temparray(:)
700 DEALLOCATE( temparray )
702 exits(
"GROW_ARRAY_REAL")
704 999 errorsexits(
"GROW_ARRAY_REAL",err,error)
714 INTEGER(INTG),
INTENT(IN) :: delta
715 CHARACTER(LEN=*),
INTENT(IN) :: errorMessage
716 INTEGER(INTG),
INTENT(OUT) :: ERR
720 INTEGER(INTG) :: oldSize
722 enters(
"GROW_ARRAY_COMPONENTS",err,error,*999)
724 IF( .NOT.
ALLOCATED( array ) )
THEN 725 CALL reallocate( array, delta, errormessage, err, error, *999 )
729 oldsize =
SIZE( array )
731 CALL reallocate( temparray, oldsize, errormessage, err, error, *999 )
733 temparray(:) = array(:)
735 CALL reallocate( array, oldsize + delta, errormessage, err, error, *999 )
737 array(1:oldsize) = temparray(:)
739 DEALLOCATE( temparray )
741 exits(
"GROW_ARRAY_COMPONENTS")
743 999 errorsexits(
"GROW_ARRAY_COMPONENTS",err,error)
752 INTEGER(INTG),
ALLOCATABLE,
INTENT(INOUT) :: array(:)
754 IF(
ALLOCATED( array ) )
THEN 765 REAL(DP),
ALLOCATABLE,
INTENT(INOUT) :: array(:)
767 IF(
ALLOCATED( array ) )
THEN 778 INTEGER(INTG),
ALLOCATABLE,
INTENT(INOUT) :: array(:,:)
780 IF(
ALLOCATED( array ) )
THEN 793 IF(
ALLOCATED( array ) )
THEN 806 IF(
ALLOCATED( array ) )
THEN 819 IF(
ALLOCATED( array ) )
THEN 832 IF(
ALLOCATED( array ) )
THEN 844 IF(
ALLOCATED( array ) )
THEN 858 INTEGER(INTG),
INTENT(IN) :: LABEL_TYPE
859 INTEGER(INTG),
INTENT(INOUT) :: FIELD_TYPE
861 INTEGER(INTG),
INTENT(OUT) :: ERR
867 enters(
"FIELD_IO_FIELD_INFO",err,error,*999)
871 SELECT CASE(label_type)
876 keyword=
extract(line, 1, pos-1)
879 keyword=
trim(keyword)
880 IF(keyword==
"coordinate")
THEN 882 ELSE IF (keyword==
"anatomical")
THEN 886 CALL flagerror(
"Cannot find corresponding field type from input string",err,error,*999)
889 CALL flagerror(
"Cannot find any information from input string",err,error,*999)
892 exits(
"FIELD_IO_FIELD_INFO")
894 999 errorsexits(
"FIELD_IO_FIELD_INFO",err,error)
907 INTEGER(INTG),
INTENT(OUT) :: ERR
910 INTEGER(INTG) ::FIELD_IO_DERIVATIVE_INFO
912 enters(
"FIELD_IO_DERIVATIVE_INFO",err,error,*999)
914 IF(
"d/ds1"==line)
THEN 916 ELSE IF(
"d2/ds1ds1"==line)
THEN 918 ELSE IF(
"d/ds2"==line)
THEN 920 ELSE IF(
"d2/ds2ds2"==line)
THEN 922 ELSE IF(
"d/ds3"==line)
THEN 924 ELSE IF(
"d2/ds3ds3"==line)
THEN 926 ELSE IF(
"d2/ds3ds3"==line)
THEN 928 ELSE IF(
"d2/ds1ds3"==line)
THEN 930 ELSE IF(
"d2/ds2ds3"==line)
THEN 932 ELSE IF(
"d3/ds1ds2ds3"==line)
THEN 934 ELSE IF(
"d/ds4"==line)
THEN 936 ELSE IF(
"d2/ds4ds4"==line)
THEN 938 ELSE IF(
"d2/ds1ds4"==line)
THEN 940 ELSE IF(
"d2/ds2ds4"==line)
THEN 942 ELSE IF(
"d2/ds3ds4"==line)
THEN 944 ELSE IF(
"d3/ds1ds2ds4"==line)
THEN 946 ELSE IF(
"d3/ds1ds3ds4"==line)
THEN 948 ELSE IF(
"d3/ds2ds3ds4"==line)
THEN 950 ELSE IF(
"d3/ds1ds4ds4"==line)
THEN 952 ELSE IF(
"d3/ds2ds4ds4"==line)
THEN 954 ELSE IF(
"d3/ds3ds4ds4"==line)
THEN 956 ELSE IF(
"d3/ds4ds4ds4"==line)
THEN 959 field_io_derivative_info=-1
960 CALL flagerror(
"Could not recognize derivatives from input string",err,error,*999)
963 exits(
"FIELD_IO_DERIVATIVE_INFO")
965 999 errorsexits(
"FIELD_IO_DERIVATIVE_INFO",err,error)
976 INTEGER(INTG),
INTENT(IN) :: DERIVATIVE_NUMBER
977 INTEGER(INTG),
INTENT(IN) :: NODE_NUMBER
978 INTEGER(INTG),
INTENT(OUT) :: ERR
981 INTEGER(INTG) :: FIELD_IO_ELEMENT_DERIVATIVE_INDEX
983 INTEGER(INTG) :: VERSION_NUMBER,NUMBER_OF_DERIVATIVES
985 enters(
"FIELD_IO_ELEMENT_DERIVATIVE_INDEX", err, error, *999)
987 version_number=element%elementVersions(derivative_number, node_number)
988 number_of_derivatives=element%BASIS%NUMBER_OF_DERIVATIVES(node_number)
989 field_io_element_derivative_index=(version_number-1)*number_of_derivatives + &
990 & element%ELEMENT_DERIVATIVES(derivative_number, node_number)
992 exits(
"FIELD_IO_ELEMENT_DERIVATIVE_INDEX")
994 999 errorsexits(
"FIELD_IO_ELEMENT_DERIVATIVE_INDEX",err,error)
1002 SUBROUTINE field_io_create_fields(NAME, REGION, DECOMPOSITION, FIELD_VALUES_SET_TYPE, NUMBER_OF_FIELDS, &
1004 &mesh_components_of_field_components, components_in_fields, number_of_exnode_files, &
1010 INTEGER(INTG),
INTENT(IN) :: FIELD_VALUES_SET_TYPE
1011 INTEGER(INTG),
INTENT(IN) :: NUMBER_OF_FIELDS
1013 INTEGER(INTG),
INTENT(IN) :: MESH_COMPONENTS_OF_FIELD_COMPONENTS(:)
1014 INTEGER(INTG),
INTENT(IN) :: COMPONENTS_IN_FIELDS(:)
1015 INTEGER(INTG),
INTENT(IN) :: NUMBER_OF_EXNODE_FILES
1016 INTEGER(INTG),
INTENT(IN) :: MASTER_COMPUTATIONAL_NUMBER
1017 INTEGER(INTG),
INTENT(IN) :: my_computational_node_number
1018 INTEGER(INTG),
INTENT(IN) :: FIELD_SCALING_TYPE
1019 INTEGER(INTG),
INTENT(OUT) :: ERR
1026 TYPE(
varying_string) :: CMISS_KEYWORD_FIELDS, CMISS_KEYWORD_NODE, CMISS_KEYWORD_COMPONENTS
1027 TYPE(
varying_string) :: CMISS_KEYWORD_VALUE_INDEX, CMISS_KEYWORD_DERIVATIVE
1028 INTEGER(INTG),
ALLOCATABLE :: tmp_pointer(:), LIST_DEV(:), LIST_DEV_POS(:)
1029 INTEGER(INTG) :: FILE_ID
1031 INTEGER(INTG) :: NODAL_USER_NUMBER, NODAL_LOCAL_NUMBER, FIELDTYPE, NUMBER_NODAL_VALUE_LINES, NUMBER_OF_LINES, &
1032 & NUMBER_OF_COMPONENTS
1033 INTEGER(INTG) :: MPI_IERROR
1034 INTEGER(INTG) :: idx_comp, idx_comp1, pos, idx_field, idx_exnode, idx_nodal_line, idx_node
1035 INTEGER(INTG) :: idx_variable, idx_dev, idx_dev1, total_number_of_comps, total_number_of_devs, number_of_devs
1036 INTEGER(INTG) :: number_of_comps, VARIABLE_IDX,variable_type
1037 REAL(DP),
ALLOCATABLE :: LIST_DEV_VALUE(:)
1038 LOGICAL :: SECTION_START, FILE_END, NODE_SECTION, FILE_OPEN, NODE_IN_DOMAIN
1041 enters(
"FIELD_IO_CREATE_FIELDS",err,error,*999)
1043 IF(.NOT.
ASSOCIATED(decomposition))
THEN 1044 CALL flagerror(
"decomposition is NOT associated before importing data",err,error,*999)
1048 IF(.NOT.
ASSOCIATED(region))
THEN 1049 CALL flagerror(
"region is NOT associated before importing data",err,error,*999)
1053 cmiss_keyword_fields=
"#Fields=" 1054 cmiss_keyword_components=
"#Components=" 1055 cmiss_keyword_value_index=
"Value index=" 1056 cmiss_keyword_derivative=
"#Derivatives=" 1057 cmiss_keyword_node=
"Node:" 1063 total_number_of_comps=0
1064 number_nodal_value_lines=5
1065 number_of_components=sum(components_in_fields)
1068 IF(master_computational_number==my_computational_node_number)
THEN 1070 CALL reallocate( list_str, number_of_fields,
"can not allocate list of strings for fields", err, error, *999 )
1072 DO WHILE(idx_exnode<number_of_exnode_files)
1074 file_id=1030+idx_exnode
1079 section_start=.false.
1082 DO WHILE(.NOT.file_end)
1086 IF((.NOT.section_start).AND.(
verify(cmiss_keyword_fields,line)==0))
THEN 1087 section_start=.true.
1091 IF(section_start.AND.(
verify(cmiss_keyword_fields,line)==0))
THEN 1094 pos=
index(line,cmiss_keyword_fields)
1097 IF(idx_field/=number_of_fields)
CALL flagerror(
"find different field number in exnode files",err,error,*999)
1099 DO idx_field=1,number_of_fields
1101 IF(idx_exnode==0)
THEN 1102 list_str(idx_field)=line
1103 pos=
index(line,cmiss_keyword_components)
1106 total_number_of_comps=total_number_of_comps+number_of_comps
1108 IF(list_str(idx_field)/=line)
CALL flagerror(
"find different field information in exnode files", &
1111 pos=
index(line,cmiss_keyword_components)
1114 DO idx_comp=1,number_of_comps
1121 idx_exnode=idx_exnode+1
1126 DO idx_field=1,number_of_fields
1127 IF(
ASSOCIATED(field))
NULLIFY(field)
1129 CALL field_create_start(idx_field,region,field,err,error,*999)
1131 CALL field_number_of_variables_set(field,1,err,error,*999)
1133 CALL field_mesh_decomposition_set(field,decomposition,err,error,*999)
1135 CALL field_number_of_components_set(field,field_u_variable_type,components_in_fields(idx_field),err,error,*999)
1136 DO idx_comp=1, components_in_fields(idx_field)
1137 idx_comp1=idx_comp1+1
1139 CALL field_component_mesh_component_set(field,1,idx_comp,mesh_components_of_field_components(idx_comp1),err,error,*999)
1144 IF(master_computational_number==my_computational_node_number)
THEN 1147 CALL mpi_bcast(fieldtype,1,mpi_logical,master_computational_number,mpi_comm_world,mpi_ierror)
1150 CALL field_type_set(field, fieldtype, err, error, *999)
1152 CALL field_create_finish(field,err,error,*999)
1155 IF(master_computational_number==my_computational_node_number)
THEN 1165 CALL mpi_bcast(total_number_of_comps,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1168 CALL reallocate( list_dev_pos, total_number_of_comps, &
1169 &
"Could not allocate memory for nodal derivative position in field components", err, error, *999 )
1171 DO WHILE(idx_exnode<number_of_exnode_files)
1173 CALL mpi_bcast(file_end,1,mpi_logical,master_computational_number,mpi_comm_world,mpi_ierror)
1177 idx_exnode=idx_exnode+1
1178 INQUIRE(unit=file_id, opened=file_open)
1180 IF(idx_exnode>=number_of_exnode_files)
EXIT 1186 IF(master_computational_number==my_computational_node_number)
THEN 1189 file_id=1030+idx_exnode
1194 section_start=.false.
1195 node_section=.false.
1199 IF((.NOT.file_end).AND.(.NOT.section_start))
THEN 1201 DO WHILE(
verify(cmiss_keyword_fields,line)/=0)
1204 section_start=.true.
1208 IF((.NOT.file_end).AND.section_start.AND.(.NOT.node_section))
THEN 1209 pos=
index(line,cmiss_keyword_fields)
1212 total_number_of_devs=0
1215 DO idx_field=1, number_of_fields
1217 pos=
index(line,cmiss_keyword_components)
1222 DO idx_comp=1, number_of_comps
1225 line=
remove(line,1, pos+1)
1226 pos=
index(line,cmiss_keyword_value_index)
1230 idx_comp1=idx_comp1+1
1233 pos=
index(line,cmiss_keyword_derivative)
1238 total_number_of_devs=total_number_of_devs+number_of_devs
1240 IF(
ALLOCATED(list_dev))
THEN 1241 CALL reallocate( tmp_pointer, total_number_of_devs-number_of_devs, &
1242 &
"Could not allocate temporary memory for nodal derivative index in master node", err,error,*999)
1243 tmp_pointer(:)=list_dev(:)
1245 CALL reallocate( list_dev, total_number_of_devs, &
1246 &
"Could not allocate temporary memory for nodal derivative index in master node", err,error,*999)
1247 list_dev(1:total_number_of_devs-number_of_devs)=tmp_pointer(:)
1249 DEALLOCATE(tmp_pointer)
1251 CALL reallocate( list_dev, total_number_of_devs, &
1252 &
"Could not allocate memory for nodal derivative index", err, error, *999)
1257 IF(number_of_devs<=1)
THEN 1268 DO idx_dev=2, number_of_devs-1
1272 line=
remove(line, 1, pos)
1286 CALL mpi_bcast(total_number_of_devs,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1289 IF(master_computational_number/=my_computational_node_number)
THEN 1290 CALL reallocate( list_dev, total_number_of_devs, &
1291 &
"Could not allocate memory for nodal derivative index in non-master node", err, error, *999 )
1294 CALL reallocate( list_dev_value, total_number_of_devs, &
1295 &
"Could not allocate memory for nodal derivative index in non-master node", err, error, *999 )
1298 CALL mpi_bcast(list_dev_pos,total_number_of_comps,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1301 CALL mpi_bcast(list_dev,total_number_of_devs,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1305 IF(master_computational_number==my_computational_node_number)
THEN 1308 IF((.NOT.file_end).AND.section_start.AND.node_section)
THEN 1310 IF(
verify(cmiss_keyword_node, line)==0)
THEN 1311 pos=
index(line,cmiss_keyword_node)
1315 DO idx_comp=1, number_of_comps-1
1316 IF(list_dev_pos(idx_comp+1)-list_dev_pos(idx_comp)<=number_nodal_value_lines)
THEN 1319 & list_dev_pos(idx_comp), err,error, *999)
1321 number_of_lines=(list_dev_pos(idx_comp+1)-list_dev_pos(idx_comp))/number_nodal_value_lines
1322 DO idx_nodal_line=1, number_of_lines
1325 & (idx_nodal_line-1)*number_nodal_value_lines, err,error, *999)
1329 & number_nodal_value_lines*number_of_lines, list_dev_value, list_dev_pos(idx_comp)+ &
1330 & (idx_nodal_line-1)*number_nodal_value_lines, err,error, *999)
1347 & list_dev_pos(idx_comp), err,error, *999)
1349 CALL flagerror(
"The position of nodal information in exenode files is not correct",err, error,*999)
1350 node_section=.false.
1352 IF(.NOT.file_end)
THEN 1354 IF(
verify(cmiss_keyword_node, line)/=0) node_section=.false.
1360 CALL mpi_bcast(list_dev_value,total_number_of_devs,mpi_real8,master_computational_number,mpi_comm_world,mpi_ierror)
1362 CALL mpi_bcast(nodal_user_number,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1366 print *,
"user number:" 1367 print *, nodal_user_number
1368 print *, list_dev_value
1375 DO idx_field=1,number_of_fields
1376 IF(
ASSOCIATED(field))
NULLIFY(field)
1377 field=>region%FIELDS%FIELDS(idx_field)%PTR
1378 DO idx_comp=1, components_in_fields(idx_field)
1379 idx_comp1=idx_comp1+1
1380 domain_nodes=>field%VARIABLES(idx_variable)%COMPONENTS(idx_comp)%DOMAIN%TOPOLOGY%NODES
1381 node_in_domain=.false.
1382 DO idx_node=1,domain_nodes%NUMBER_OF_NODES
1384 IF(domain_nodes%NODES(idx_node)%USER_NUMBER==nodal_user_number)
THEN 1385 node_in_domain=.true.
1386 nodal_local_number=idx_node
1390 IF(node_in_domain)
THEN 1391 IF(idx_comp1>=number_of_components)
THEN 1392 DO idx_dev=1, total_number_of_devs-list_dev_pos(idx_comp1)+1
1396 CALL field_parameter_set_update_node(field,field_values_set_type,1, list_dev(idx_dev1), &
1397 &nodal_local_number, idx_comp, idx_variable, list_dev_value(idx_dev1),&
1402 DO idx_dev=1, list_dev_pos(idx_comp1+1)-list_dev_pos(idx_comp1)
1406 CALL field_parameter_set_update_node(field,field_values_set_type,1, list_dev(idx_dev1), &
1407 &nodal_local_number, idx_comp, idx_variable, list_dev_value(idx_dev1),&
1419 DO idx_field=1,number_of_fields
1420 IF(
ASSOCIATED(field))
NULLIFY(field)
1421 field=>region%FIELDS%FIELDS(idx_field)%PTR
1422 DO variable_idx=1,field%NUMBER_OF_VARIABLES
1423 variable_type=field%VARIABLES(variable_idx)%VARIABLE_TYPE
1424 CALL field_parameter_set_update_start(field,variable_type,field_values_set_type,err,error,*999)
1425 CALL field_parameter_set_update_finish(field,variable_type,field_values_set_type,err,error,*999)
1429 IF(
ALLOCATED(tmp_pointer))
DEALLOCATE(tmp_pointer)
1430 IF(
ALLOCATED(list_dev_value))
DEALLOCATE(list_dev_value)
1431 IF(
ALLOCATED(list_dev))
DEALLOCATE(list_dev)
1432 IF(
ALLOCATED(list_dev_pos))
DEALLOCATE(list_dev_pos)
1433 IF(
ALLOCATED(list_str))
DEALLOCATE(list_str)
1435 exits(
"FIELD_IO_CREATE_FIELDS")
1437 999 errorsexits(
"FIELD_IO_CREATE_FIELDS",err,error)
1448 & number_of_domains, err, error, *)
1451 INTEGER(INTG),
INTENT(IN) :: DECOMPOSITION_USER_NUMBER
1452 INTEGER(INTG),
INTENT(IN) :: DECOMPOSITION_METHOD
1454 INTEGER(INTG),
INTENT(IN) :: NUMBER_OF_DOMAINS
1455 INTEGER(INTG),
INTENT(OUT) :: ERR
1459 IF(.NOT.
ASSOCIATED(mesh))
THEN 1460 CALL flagerror(
"mesh is NOT associated before decomposing the mesh",err,error,*999)
1464 enters(
"FIELD_IO_CREATE_DECOMPISTION",err,error,*999)
1466 CALL decomposition_create_start(decomposition_user_number,mesh,decomposition,err,error,*999)
1468 CALL decomposition_type_set(decomposition,decomposition_method,err,error,*999)
1469 CALL decomposition_number_of_domains_set(decomposition,number_of_domains,err,error,*999)
1470 CALL decomposition_create_finish(decomposition,err,error,*999)
1472 exits(
"FIELD_IO_CREATE_DECOMPISTION")
1474 999 errorsexits(
"FIELD_IO_CREATE_DECOMPISTION",err,error)
1484 SUBROUTINE field_io_fields_import(NAME, METHOD, REGION, MESH, MESH_USER_NUMBER, DECOMPOSITION, DECOMPOSITION_USER_NUMBER, &
1491 INTEGER(INTG),
INTENT(IN) :: MESH_USER_NUMBER
1493 INTEGER(INTG),
INTENT(IN) :: DECOMPOSITION_USER_NUMBER
1494 INTEGER(INTG),
INTENT(IN) :: DECOMPOSITION_METHOD
1495 INTEGER(INTG),
INTENT(IN) :: FIELD_VALUES_SET_TYPE
1496 INTEGER(INTG),
INTENT(IN) :: FIELD_SCALING_TYPE
1498 INTEGER(INTG),
INTENT(OUT) :: ERR
1501 INTEGER(INTG) :: my_computational_node_number
1502 INTEGER(INTG) :: computational_node_numbers
1503 INTEGER(INTG) :: MASTER_COMPUTATIONAL_NUMBER
1504 INTEGER(INTG) :: NUMBER_OF_FIELDS
1505 INTEGER(INTG) :: NUMBER_OF_EXNODE_FILES
1507 INTEGER(INTG),
ALLOCATABLE :: MESH_COMPONENTS_OF_FIELD_COMPONENTS(:)
1508 INTEGER(INTG),
ALLOCATABLE :: COMPONENTS_IN_FIELDS(:)
1510 enters(
"FIELD_IO_FIELDS_IMPORT",err,error,*999)
1519 master_computational_number=0
1521 IF(method==
"FORTRAN")
THEN 1523 & my_computational_node_number, &
1524 &mesh_components_of_field_components, &
1525 & components_in_fields, number_of_fields, number_of_exnode_files, err, error, *999)
1528 &computational_node_numbers, err, error, *999)
1532 &mesh_components_of_field_components, components_in_fields, &
1533 & number_of_exnode_files, master_computational_number, my_computational_node_number,
field_scaling_type, &
1535 ELSE IF(method==
"MPIIO")
THEN 1536 CALL flagerror(
"MPI IO has not been implemented",err,error,*999)
1538 CALL flagerror(
"Unknown method!",err,error,*999)
1546 exits(
"FIELD_IO_FIELDS_IMPORT")
1548 999 errorsexits(
"FIELD_IO_FIELDS_IMPORT",err,error)
1559 INTEGER(INTG),
INTENT(INOUT) :: INTERPOLATION_XI(:,:)
1561 INTEGER(INTG),
INTENT(IN) :: NUMBER_OF_COMPONENTS
1562 INTEGER(INTG),
INTENT(OUT) :: ERR
1566 INTEGER(INTG) :: idx_comp, pos
1567 INTEGER(INTG) :: num_interp, INTERPOLATION_TYPE
1569 enters(
"FIELD_IO_FILL_BASIS_INFO",err,error,*999)
1571 DO idx_comp=1,number_of_components
1573 line=list_str(idx_comp)
1574 DO WHILE(
verify(
"*",line)==0)
1575 num_interp=num_interp+1
1580 interpolation_xi(idx_comp, num_interp)=interpolation_type
1582 num_interp=num_interp+1
1586 interpolation_xi(idx_comp, num_interp)=interpolation_type
1589 exits(
"FIELD_IO_FILL_BASIS_INFO")
1591 999 errorsexits(
"FIELD_IO_FILL_BASIS_INFO",err,error)
1603 &mesh_components_of_field_components, &
1604 & components_in_fields, number_of_fields, number_of_exnode_files, err, error, *)
1609 INTEGER(INTG),
INTENT(IN) :: MESH_USER_NUMBER
1610 INTEGER(INTG),
INTENT(IN) :: MASTER_COMPUTATIONAL_NUMBER
1611 INTEGER(INTG),
INTENT(IN) :: my_computational_node_number
1613 INTEGER(INTG),
INTENT(INOUT),
ALLOCATABLE :: MESH_COMPONENTS_OF_FIELD_COMPONENTS(:)
1614 INTEGER(INTG),
INTENT(INOUT),
ALLOCATABLE :: COMPONENTS_IN_FIELDS(:)
1615 INTEGER(INTG),
INTENT(INOUT) :: NUMBER_OF_FIELDS
1616 INTEGER(INTG),
INTENT(INOUT) :: NUMBER_OF_EXNODE_FILES
1617 INTEGER(INTG),
INTENT(OUT) :: ERR
1625 TYPE(
varying_string) :: CMISS_KEYWORD_FIELDS, CMISS_KEYWORD_ELEMENT, CMISS_KEYWORD_NODE, CMISS_KEYWORD_COMPONENTS
1626 TYPE(
varying_string) :: CMISS_KEYWORD_SHAPE, CMISS_KEYWORD_SCALE_FACTOR_SETS, CMISS_KEYWORD_NODES, CMISS_KEYWORD_SCALE_FACTORS
1627 INTEGER(INTG),
PARAMETER :: NUMBER_NODAL_LINES=3, number_scaling_factors_in_line=5
1628 INTEGER(INTG),
ALLOCATABLE :: LIST_ELEMENT_NUMBER(:), LIST_ELEMENTAL_NODES(:), LIST_COMP_NODAL_INDEX(:,:)
1629 INTEGER(INTG),
ALLOCATABLE :: MESH_COMPONENT_LOOKUP(:,:), INTERPOLATION_XI(:,:), LIST_COMP_NODES(:)
1630 INTEGER(INTG),
ALLOCATABLE :: USER_NODAL_NUMBER_MAP_GLOBAL_NODAL_NUMBER(:)
1631 INTEGER(INTG) :: FILE_ID, NUMBER_OF_EXELEM_FILES, NUMBER_OF_ELEMENTS, NUMBER_OF_NODES, NUMBER_OF_DIMENSIONS
1632 INTEGER(INTG) :: NUMBER_OF_MESH_COMPONENTS, NUMBER_OF_COMPONENTS, NUMBER_SCALING_FACTOR_LINES
1633 INTEGER(INTG) :: GLOBAL_ELEMENT_NUMBER
1634 INTEGER(INTG) :: MPI_IERROR
1636 INTEGER(INTG) :: idx_comp, idx_comp1, pos, idx_node, idx_node1, idx_field, idx_elem, idx_exnode, idx_exelem, number_of_comp
1637 INTEGER(INTG) :: idx_basis, number_of_node, number_of_scalesets, idx_scl, idx_mesh_comp, current_mesh_comp, num_scl,&
1639 LOGICAL :: FILE_EXIST, START_OF_ELEMENT_SECTION, FIELD_SECTION, SECTION_START, FILE_END, FILE_OPEN
1641 enters(
"FIELD_IO_IMPORT_GLOBAL_MESH",err,error,*999)
1644 IF(.NOT.
ASSOCIATED(region))
THEN 1645 CALL flagerror(
"region is not associated",err,error,*999)
1650 IF(
ASSOCIATED(mesh))
THEN 1651 CALL flagerror(
"mesh is associated, pls release the memory first",err,error,*999)
1655 IF(.NOT.region%REGION_FINISHED)
THEN 1656 CALL flagerror(
"region is not finished",err,error,*999)
1665 number_of_dimensions=region%COORDINATE_SYSTEM%NUMBER_OF_DIMENSIONS
1667 cmiss_keyword_shape=
"Shape. Dimension="//
trim(
number_to_vstring(number_of_dimensions,
"*",err,error))
1668 cmiss_keyword_element=
"Element:" 1669 cmiss_keyword_components=
"#Components=" 1670 cmiss_keyword_node=
"Node:" 1671 cmiss_keyword_nodes=
"#Nodes=" 1672 cmiss_keyword_fields=
"#Fields=" 1673 cmiss_keyword_scale_factor_sets=
"#Scale factor sets=" 1674 cmiss_keyword_scale_factors=
"#Scale factors=" 1676 CALL mesh_create_start(mesh_user_number,region,number_of_dimensions,mesh,err,error,*999)
1679 IF(master_computational_number==my_computational_node_number)
THEN 1684 number_of_components=0
1686 INQUIRE(file=
char(file_name), exist=file_exist)
1687 IF(.NOT.file_exist)
THEN 1688 CALL flagerror(
"exelem files can be found, pls check again",err,error,*999)
1691 DO WHILE(file_exist)
1693 file_id=1030+idx_exelem
1695 start_of_element_section=.false.
1696 field_section=.false.
1699 DO WHILE(.NOT.file_end)
1702 IF((.NOT.start_of_element_section).AND.(
verify(cmiss_keyword_shape,line)==0))
THEN 1703 start_of_element_section=.true.
1707 IF(start_of_element_section.AND.(
verify(cmiss_keyword_element,line)==0)) idx_elem=idx_elem+1
1710 IF(start_of_element_section.AND.(
verify(cmiss_keyword_fields,line)==0))
THEN 1713 field_section=.true.
1714 pos=
index(line,cmiss_keyword_fields)
1716 IF(idx_exelem==0)
THEN 1720 CALL flagerror(
"find different number of fields in the exelem files",err,error,*999)
1725 IF(.NOT.
ALLOCATED(components_in_fields))
THEN 1726 CALL reallocate( components_in_fields, number_of_fields, &
1727 &
"can not allocate the memory for outputing components in field", err, error, *999 )
1732 IF(field_section.AND.start_of_element_section.AND.(
verify(cmiss_keyword_components,line)==0))
THEN 1733 idx_field=idx_field+1
1734 pos=
index(line,cmiss_keyword_components)
1737 idx_comp=idx_comp+idx_comp1
1738 IF(idx_field>=number_of_fields)
THEN 1739 IF(idx_exelem==0)
THEN 1740 number_of_components=idx_comp
1741 components_in_fields(idx_field)=idx_comp
1743 IF(number_of_components/=idx_comp)
THEN 1744 CALL flagerror(
"find different total number of components in the exelem files",err,error,*999)
1748 field_section=.false.
1750 IF(idx_exelem==0)
THEN 1751 components_in_fields(idx_field)=idx_comp1
1753 IF(components_in_fields(idx_field)/=idx_comp1)
THEN 1754 CALL flagerror(
"find different number of components in one field in the exelem files",err,error,*999)
1764 idx_exelem=idx_exelem+1
1766 INQUIRE(file=
char(file_name), exist=file_exist)
1769 number_of_elements=idx_elem
1770 number_of_exelem_files=idx_exelem
1774 CALL mpi_bcast(number_of_fields,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1776 IF(master_computational_number/=my_computational_node_number)
THEN 1777 CALL reallocate( components_in_fields, number_of_fields, &
1778 &
"can not allocate the memory for outputing components in field", err, error, *999 )
1784 CALL mpi_bcast(components_in_fields,number_of_fields,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1789 CALL mpi_bcast(number_of_elements,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1791 CALL mesh_number_of_elements_set(mesh,number_of_elements,err,error,*999)
1794 IF(master_computational_number==my_computational_node_number)
THEN 1799 INQUIRE(file=
char(file_name), exist=file_exist)
1800 IF(.NOT.file_exist)
THEN 1801 CALL flagerror(
"exnode files can be found, pls check again",err,error,*999)
1804 DO WHILE(file_exist)
1805 file_id=1030+idx_exnode
1809 DO WHILE(.NOT.file_end)
1811 IF((.NOT.file_end).AND.
verify(cmiss_keyword_node,line)==0) idx_node=idx_node+1
1816 idx_exnode=idx_exnode+1
1818 INQUIRE(file=
char(file_name), exist=file_exist)
1821 number_of_nodes=idx_node
1822 number_of_exnode_files=idx_exnode
1825 CALL mpi_bcast(number_of_exnode_files,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1828 CALL mpi_bcast(number_of_nodes,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
1831 CALL nodes_create_start(region,number_of_nodes,nodes,err,error,*999)
1834 CALL reallocate( user_nodal_number_map_global_nodal_number, number_of_nodes, &
1835 &
"can not allocate list of nodal number.", err, error, *999 )
1836 IF(master_computational_number==my_computational_node_number)
THEN 1839 DO idx_exnode=0, number_of_exnode_files-1
1840 file_id=1030+idx_exnode
1844 DO WHILE(.NOT.file_end)
1846 IF((.NOT.file_end).AND.
verify(cmiss_keyword_node,line)==0)
THEN 1847 pos=
index(line,cmiss_keyword_node)
1849 user_nodal_number_map_global_nodal_number(idx_node)=
string_to_integer(line, err, error)
1855 CALL list_sort(user_nodal_number_map_global_nodal_number, err, error, *999)
1859 CALL mpi_bcast(user_nodal_number_map_global_nodal_number,number_of_nodes,mpi_integer,master_computational_number, &
1860 & mpi_comm_world,mpi_ierror)
1862 DO idx_node=1, number_of_nodes
1863 IF(idx_node/=user_nodal_number_map_global_nodal_number(idx_node))
CALL nodes_user_number_set(nodes,idx_node, &
1864 & user_nodal_number_map_global_nodal_number(idx_node),err,error,*999)
1866 CALL nodes_create_finish(nodes,err,error,*999)
1876 IF(master_computational_number==my_computational_node_number)
THEN 1879 CALL reallocate_2d( mesh_component_lookup, number_of_components, number_of_components, &
1880 &
"can not allocate list of mesh components", err, error, *999 )
1882 CALL reallocate( list_str, number_of_components, &
1883 &
"can not allocate list of str", err, error, *999 )
1886 DO idx_comp=1,number_of_components
1887 mesh_component_lookup(idx_comp,idx_comp)=1
1892 DO WHILE(idx_exelem<number_of_exelem_files)
1894 file_id=1030+idx_exelem
1898 field_section=.false.
1901 DO WHILE(.NOT.file_end)
1905 IF((.NOT.start_of_element_section).AND.(
verify(cmiss_keyword_shape,line)==0))
THEN 1906 start_of_element_section=.true.
1910 IF(start_of_element_section.AND.(
verify(cmiss_keyword_fields,line)==0))
THEN 1913 pos=
index(line,cmiss_keyword_fields)
1917 DO idx_field=1,number_of_fields
1919 pos=
index(line,cmiss_keyword_components)
1922 DO idx_comp1=1,number_of_comp
1930 list_str(idx_comp)= line
1932 pos=
index(line, cmiss_keyword_nodes)
1935 DO idx_node1=1, number_of_node*number_nodal_lines
1943 IF(sum(mesh_component_lookup)<number_of_components*number_of_components)
THEN 1944 DO idx_comp=1, number_of_components
1945 DO idx_comp1=idx_comp+1, number_of_components
1946 IF(mesh_component_lookup(idx_comp1,idx_comp)==0)
THEN 1947 IF(list_str(idx_comp1)/=list_str(idx_comp))
THEN 1948 mesh_component_lookup(idx_comp1,idx_comp)=1
1949 mesh_component_lookup(idx_comp,idx_comp1)=1
1955 idx_exelem=number_of_exelem_files
1967 idx_exelem=idx_exelem+1
1971 CALL reallocate( mesh_components_of_field_components, number_of_components, &
1972 &
"can not allocate list of field components", err, error, *999 )
1974 DO idx_comp=1, number_of_components
1975 mesh_components_of_field_components(idx_comp)=idx_comp
1977 DO idx_comp=1, number_of_components
1978 DO idx_comp1=idx_comp+1, number_of_components
1979 IF(mesh_components_of_field_components(idx_comp)==idx_comp)
THEN 1980 IF(mesh_component_lookup(idx_comp1,idx_comp)==0) mesh_components_of_field_components(idx_comp1)=idx_comp
1985 number_of_mesh_components=0
1987 DO idx_comp=1,number_of_components
1988 IF(mesh_components_of_field_components(idx_comp)==idx_comp)
THEN 1989 idx_comp1=idx_comp1+1
1990 mesh_components_of_field_components(idx_comp)=idx_comp1
1991 number_of_mesh_components=number_of_mesh_components+1
2010 CALL mpi_bcast(number_of_components,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
2012 CALL mpi_bcast(number_of_mesh_components,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
2014 CALL mesh_number_of_components_set(mesh,number_of_mesh_components,err,error,*999)
2016 CALL reallocate( elements_ptr, number_of_mesh_components, &
2017 &
"can not allocate list of mesh element pointers", err, error, *999 )
2025 DO idx_comp=1, number_of_mesh_components
2026 CALL mesh_topology_elements_create_start(mesh,idx_comp,
basis_functions%BASES(1)%PTR,elements_ptr(idx_comp)%PTR, &
2031 CALL reallocate( list_element_number, number_of_elements, &
2032 &
"can not allocate list of elemental number", err, error, *999 )
2034 IF(master_computational_number==my_computational_node_number)
THEN 2037 DO idx_exelem=0, number_of_exelem_files-1
2039 file_id=1030+idx_exelem
2042 start_of_element_section=.false.
2046 DO WHILE(.NOT.file_end)
2049 IF((.NOT.start_of_element_section).AND.(
verify(cmiss_keyword_shape,line)==0))
THEN 2050 start_of_element_section=.true.
2053 IF(start_of_element_section.AND.(
verify(cmiss_keyword_element,line)==0))
THEN 2054 pos=
index(line,cmiss_keyword_element)
2058 IF(number_of_dimensions==3)
THEN 2059 list_element_number(idx_elem)=shape_index(1)
2060 ELSE IF(number_of_dimensions==2)
THEN 2061 list_element_number(idx_elem)=shape_index(2)
2062 ELSE IF(number_of_dimensions==1)
THEN 2063 list_element_number(idx_elem)=shape_index(3)
2065 CALL flagerror(
"Non recognized dimension size during reading elemental numbering",err,error,*999)
2073 CALL list_sort(list_element_number, err, error, *999)
2077 CALL mpi_bcast(list_element_number,number_of_elements,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
2081 DO idx_elem=1,number_of_elements
2082 DO idx_comp=1, number_of_mesh_components
2083 IF(idx_elem/=list_element_number(idx_elem)) &
2084 &
CALL meshelements_elementusernumberset(idx_elem,list_element_number(idx_elem), &
2085 & elements_ptr(idx_comp)%PTR,err,error,*999)
2090 CALL mpi_bcast(number_of_exelem_files,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
2095 CALL reallocate( list_comp_nodes, number_of_components, &
2096 &
"Could not allocate list of component nodal index ", err, error, *999 )
2102 DO WHILE(idx_exelem<number_of_exelem_files)
2104 CALL mpi_bcast(file_end,1,mpi_logical,master_computational_number,mpi_comm_world,mpi_ierror)
2108 idx_exelem=idx_exelem+1
2109 INQUIRE(unit=file_id, opened=file_open)
2111 IF(idx_exelem>=number_of_exelem_files)
EXIT 2115 IF(master_computational_number==my_computational_node_number)
THEN 2126 file_id=1030+idx_exelem
2131 section_start=.false.
2132 start_of_element_section=.false.
2136 IF((.NOT.file_end).AND.(.NOT.start_of_element_section))
THEN 2138 DO WHILE(
verify(cmiss_keyword_scale_factor_sets,line)/=0)
2141 start_of_element_section=.true.
2145 IF((.NOT.file_end).AND.start_of_element_section.AND.(.NOT.section_start))
THEN 2146 section_start=.true.
2150 pos=
index(line,cmiss_keyword_scale_factor_sets)
2151 line=
remove(line,1, pos+
len_trim(cmiss_keyword_scale_factor_sets)-1)
2155 number_scaling_factor_lines=0
2156 DO idx_scl=1,number_of_scalesets
2158 pos=
index(line,cmiss_keyword_scale_factors)
2161 num_scl_line=num_scl/number_scaling_factors_in_line
2162 IF(num_scl_line*number_scaling_factors_in_line/=num_scl) num_scl_line=num_scl_line+1
2163 number_scaling_factor_lines=number_scaling_factor_lines+num_scl_line
2167 pos=
index(line,cmiss_keyword_nodes)
2171 CALL reallocate( list_elemental_nodes, number_of_node, &
2172 &
"Could not allocate list of elemental nodes", err, error, *999 )
2175 CALL reallocate_2d( list_comp_nodal_index, number_of_components,number_of_node, &
2176 &
"Could not allocate list of component nodal index ", err, error, *999 )
2180 pos=
index(line,cmiss_keyword_fields)
2184 DO idx_field=1,number_of_fields
2186 pos=
index(line,cmiss_keyword_components)
2189 DO idx_comp1=1,number_of_comp
2197 list_str(idx_comp)= line
2199 pos=
index(line, cmiss_keyword_nodes)
2202 list_comp_nodes(idx_comp)=number_of_node
2203 DO idx_node1=1, number_of_node
2205 pos=
index(line,
".")
2214 CALL reallocate_2d( interpolation_xi, number_of_components,number_of_dimensions, &
2215 &
"Could not allocate list of interpolation types", err, error, *999 )
2222 IF((.NOT.file_end).AND.start_of_element_section.AND.section_start)
THEN 2224 pos=
index(line,cmiss_keyword_element)
2229 DO WHILE(
verify(cmiss_keyword_node,line)/=0)
2238 DO idx_scl=1, number_scaling_factor_lines
2242 IF(.NOT.file_end)
THEN 2244 IF(
verify(cmiss_keyword_scale_factor_sets,line)==0) section_start=.true.
2250 CALL mpi_bcast(number_of_node,1,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
2254 IF(master_computational_number/=my_computational_node_number)
THEN 2255 CALL reallocate( list_elemental_nodes, number_of_node, &
2256 &
"Could not allocate list of elemental nodes", err, error, *999 )
2257 CALL reallocate_2d( list_comp_nodal_index, number_of_components, number_of_node, &
2258 &
"Could not allocate list of component nodal index ", err, error, *999 )
2259 CALL reallocate_2d( interpolation_xi, number_of_components,number_of_dimensions, &
2260 &
"Could not allocate list of interpolation types", err, error, *999 )
2261 CALL reallocate( mesh_components_of_field_components, number_of_components, &
2262 &
"Could not allocate list of mesh components of field", err, error, *999 )
2278 CALL mpi_bcast(list_elemental_nodes,number_of_node,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
2280 CALL mpi_bcast(list_comp_nodal_index,number_of_node*number_of_components,mpi_integer,master_computational_number, &
2281 & mpi_comm_world,mpi_ierror)
2283 CALL mpi_bcast(shape_index,
shape_size,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
2285 CALL mpi_bcast(list_comp_nodes,number_of_components,mpi_integer,master_computational_number,mpi_comm_world,mpi_ierror)
2287 CALL mpi_bcast(mesh_components_of_field_components,number_of_components,mpi_integer,master_computational_number, &
2288 & mpi_comm_world,mpi_ierror)
2290 CALL mpi_bcast(interpolation_xi,number_of_components*number_of_dimensions,mpi_integer,master_computational_number,&
2291 & mpi_comm_world,mpi_ierror)
2295 DO idx_comp=1, number_of_components
2297 IF(number_of_dimensions==3)
THEN 2298 CALL list_search(list_element_number, shape_index(1),global_element_number, err,error,*999)
2299 ELSE IF(number_of_dimensions==2)
THEN 2300 CALL list_search(list_element_number, shape_index(2),global_element_number, err,error,*999)
2301 ELSE IF(number_of_dimensions==1)
THEN 2302 CALL list_search(list_element_number, shape_index(3),global_element_number, err,error,*999)
2304 CALL flagerror(
"Non recognized dimension size during reading elemental numbering",err,error,*999)
2307 IF(mesh_components_of_field_components(idx_comp)==current_mesh_comp)
THEN 2311 IF(sum(
basis_functions%BASES(idx_basis)%PTR%INTERPOLATION_XI(:)-interpolation_xi(idx_comp,:))==0)
THEN 2318 IF(
ASSOCIATED(basis))
NULLIFY(basis)
2325 CALL mesh_topology_elements_element_basis_set(global_element_number,elements_ptr( &
2326 & mesh_components_of_field_components(idx_comp))%PTR,basis,err,error,*999)
2328 CALL mesh_topology_elements_element_nodes_set(global_element_number,elements_ptr( &
2329 & mesh_components_of_field_components(idx_comp))%PTR,list_elemental_nodes(list_comp_nodal_index(idx_comp,:)), &
2332 current_mesh_comp=current_mesh_comp+1
2339 DO idx_comp=1, number_of_mesh_components
2340 CALL mesh_topology_elements_create_finish(elements_ptr(idx_comp)%PTR, err,error,*999)
2342 CALL mesh_create_finish(mesh,err,error,*999)
2355 IF(
ASSOCIATED(basis))
NULLIFY(basis)
2357 exits(
"FIELD_IO_IMPORT_GLOBAL_MESH")
2359 999 errorsexits(
"FIELD_IO_IMPORT_GLOBAL_MESH",err,error)
2370 INTEGER(INTG),
INTENT(INOUT) :: INTERPOLATION
2372 INTEGER(INTG),
INTENT(OUT) :: ERR
2376 enters(
"FieldIO_TranslateLabelIntoInterpolationType",err,error,*999)
2378 SELECT CASE(
char(label_type))
2387 CASE(
"LagrangeHermite")
2389 CASE(
"HermiteLagrange")
2392 CALL flagerror(
"Invalid interpolation type",err,error,*999)
2395 exits(
"FieldIO_TranslateLabelIntoInterpolationType")
2397 999 errorsexits(
"FieldIO_TranslateLabelIntoInterpolationType",err,error)
2410 INTEGER(INTG),
INTENT(INOUT) :: num_scl
2411 INTEGER(INTG),
INTENT(INOUT) :: num_node
2412 INTEGER(INTG),
INTENT(OUT) :: ERR
2418 enters(
"FieldIO_CalculateSimplexScaleAndNodeCounts",err,error,*999)
2420 IF(basis%NUMBER_OF_XI==0)
CALL flagerror(
"number of xi in the basis is zero",err,error,*999)
2422 n = basis%NUMBER_OF_XI
2425 SELECT CASE(basis%INTERPOLATION_XI(1))
2429 num_node = ( n + 1 ) * ( n + 2 ) / 2
2431 num_node = ( n + 1 ) * ( n + 2 ) * ( n + 3 ) / 6
2433 CALL flagerror(
"Invalid interpolation type", err, error, *999 )
2438 exits(
"FieldIO_CalculateSimplexScaleAndNodeCounts")
2440 999 errorsexits(
"FieldIO_CalculateSimplexScaleAndNodeCounts",err,error)
2451 INTEGER(INTG),
INTENT(INOUT) :: num_scl
2452 INTEGER(INTG),
INTENT(INOUT) :: num_node
2453 INTEGER(INTG),
INTENT(OUT) :: ERR
2458 enters(
"FIELD_IO_CALCULATE_TP_SCALE_AND_NODE_COUNTS",err,error,*999)
2460 IF(basis%NUMBER_OF_XI==0)
CALL flagerror(
"number of xi in the basis is zero",err,error,*999)
2464 DO ni=1,basis%NUMBER_OF_XI
2465 SELECT CASE(basis%INTERPOLATION_XI(ni))
2485 CALL flagerror(
"Invalid interpolation type", err, error, *999 )
2489 exits(
"FIELD_IO_CALCULATE_TP_SCALE_AND_NODE_COUNTS")
2491 999 errorsexits(
"FIELD_IO_CALCULATE_TP_SCALE_AND_NODE_COUNTS",err,error)
2501 INTEGER(INTG),
INTENT(IN) :: myComputationalNodeNumber
2503 INTEGER(INTG) :: FindMyLocalDomainNumber
2505 INTEGER(INTG) :: domainIndex
2506 INTEGER(INTG) :: myDomainIndex
2508 DO domainindex = 1, mapping%NUMBER_OF_DOMAINS
2509 IF( mapping%DOMAIN_NUMBER( domainindex ) == mycomputationalnodenumber )
THEN 2510 mydomainindex = domainindex
2515 findmylocaldomainnumber = mapping%LOCAL_NUMBER( mydomainindex )
2526 INTEGER(INTG),
INTENT(IN) :: global_number
2527 INTEGER(INTG),
INTENT(INOUT) :: MAX_NODE_COMP_INDEX
2528 INTEGER(INTG),
INTENT(INOUT) :: NUM_OF_SCALING_FACTOR_SETS
2529 INTEGER(INTG),
INTENT(INOUT) :: LIST_COMP_SCALE(:)
2530 INTEGER(INTG),
INTENT(IN) :: my_computational_node_number
2532 INTEGER(INTG),
INTENT(IN) :: sessionHandle
2533 INTEGER(INTG),
INTENT(OUT) :: ERR
2536 INTEGER(INTG) :: i,LENGTH
2537 INTEGER(INTG) :: NUMBER_OF_UNIQUE_NODES
2538 CHARACTER(LEN=MAXSTRLEN) :: fvar_name
2539 CHARACTER(LEN=1, KIND=C_CHAR) :: cvar_name(
maxstrlen+1)
2550 INTEGER(INTG),
ALLOCATABLE :: GROUP_LOCAL_NUMBER(:), GROUP_SCALE_FACTORS(:)
2551 INTEGER(INTG),
ALLOCATABLE :: GROUP_NODE(:), GROUP_VARIABLES(:)
2553 INTEGER(C_INT),
ALLOCATABLE,
TARGET :: INTERPOLATION_XI(:),ELEMENT_DERIVATIVES(:),NUMBER_OF_DERIVATIVES(:), NODE_INDEXES(:)
2554 INTEGER(C_INT),
ALLOCATABLE,
TARGET :: SCALE_INDEXES(:)
2555 INTEGER(INTG) :: nn, nx, ny, nz, NodesX, NodesY, NodesZ, mm, NUM_OF_VARIABLES, MAX_NUM_NODES
2556 INTEGER(INTG) :: local_number, interpType, NODE_NUMBER, NODE_NUMBER_COUNTER, NODE_NUMBER_COLLAPSED, NUMBER_OF_ELEMENT_NODES
2557 INTEGER(INTG) :: num_scl, num_node, comp_idx, scaleIndex, scaleIndex1, var_idx, derivativeIndex
2558 INTEGER(INTG) :: NODE_LOCAL_NUMBER,NODE_USER_NUMBER,MAX_ELEMENT_LOCAL_NUMBER,MAX_ELEMENT_USER_NUMBER
2559 LOGICAL :: SAME_SCALING_SET
2561 enters(
"FieldIO_ExportElementalGroupHeaderFortran",err,error,*999)
2564 ALLOCATE(interpolation_xi(3), stat = err)
2569 num_of_scaling_factor_sets=0
2572 max_node_comp_index=0
2573 NULLIFY(variable_ptr)
2575 CALL reallocate( group_local_number, elementalinfoset%NUMBER_OF_COMPONENTS, &
2576 &
"Could not allocate GROUP_LOCAL_NUMBER in exelem header", err, error, *999 )
2577 CALL reallocate( listscalebases, elementalinfoset%NUMBER_OF_COMPONENTS, &
2578 &
"Could not allocate listScaleBases in exelem header", err, error, *999 )
2579 CALL reallocate( listscalefields, elementalinfoset%NUMBER_OF_COMPONENTS, &
2580 &
"Could not allocate listScaleFields in exelem header", err, error, *999 )
2583 DO comp_idx=1,elementalinfoset%NUMBER_OF_COMPONENTS
2585 IF (.NOT.
ASSOCIATED(variable_ptr,
TARGET=elementalinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE))
THEN 2586 num_of_variables=num_of_variables+1
2587 variable_ptr=>elementalinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE
2591 componentdomain=>elementalinfoset%COMPONENTS(comp_idx)%PTR%DOMAIN
2593 local_number =
findmylocaldomainnumber( componentdomain%MAPPINGS%ELEMENTS%GLOBAL_TO_LOCAL_MAP( global_number ),&
2594 & my_computational_node_number )
2595 group_local_number(comp_idx)=local_number
2597 domain_elements=>componentdomain%TOPOLOGY%ELEMENTS
2598 domain_nodes=>componentdomain%TOPOLOGY%NODES
2599 basis=>domain_elements%ELEMENTS(local_number)%BASIS
2600 IF(basis%NUMBER_OF_NODES>max_num_nodes)
THEN 2601 max_node_comp_index=comp_idx
2602 max_node_element => domain_elements%ELEMENTS(local_number)
2603 max_num_nodes=basis%NUMBER_OF_NODES
2604 max_element_domain_nodes=>componentdomain%TOPOLOGY%NODES
2607 IF(comp_idx == 1)
THEN 2608 num_of_scaling_factor_sets = num_of_scaling_factor_sets + 1
2609 listscalebases( num_of_scaling_factor_sets )%PTR => basis
2610 listscalefields( num_of_scaling_factor_sets )%PTR => variable_ptr%FIELD
2611 list_comp_scale(comp_idx)=num_of_scaling_factor_sets
2613 same_scaling_set=.false.
2614 DO scaleindex1=1, num_of_scaling_factor_sets
2615 IF(basis%GLOBAL_NUMBER == listscalebases(scaleindex1)%PTR%GLOBAL_NUMBER)
THEN 2616 IF(variable_ptr%FIELD%SCALINGS%SCALING_TYPE /= listscalefields(scaleindex1)%PTR%SCALINGS%SCALING_TYPE)
THEN 2619 &
" have components that use basis number "//
trim(
number_to_vstring(basis%GLOBAL_NUMBER,
"*",err,error))// &
2620 &
" but have different scaling types. ",err,error,*999)
2622 IF(variable_ptr%FIELD%SCALINGS%SCALING_TYPE == listscalefields(scaleindex1)%PTR%SCALINGS%SCALING_TYPE)
THEN 2623 same_scaling_set=.true.
2624 list_comp_scale(comp_idx)=scaleindex1
2629 IF(.NOT.same_scaling_set)
THEN 2630 num_of_scaling_factor_sets=num_of_scaling_factor_sets+1
2631 listscalebases( num_of_scaling_factor_sets )%PTR => basis
2632 listscalefields( num_of_scaling_factor_sets )%PTR => variable_ptr%FIELD
2633 list_comp_scale(comp_idx)=num_of_scaling_factor_sets
2639 CALL reallocate( group_variables, num_of_variables, &
2640 &
"Could not allocate temporary variable buffer in IO", err, error, *999 )
2643 CALL reallocate( group_scale_factors, num_of_scaling_factor_sets, &
2644 &
"Could not allocate temporary variable buffer in IO", err, error, *999 )
2646 CALL reallocate( group_node, num_of_scaling_factor_sets, &
2647 &
"Could not allocate temporary variable buffer in IO", err, error, *999 )
2650 NULLIFY(variable_ptr)
2652 DO comp_idx=1,elementalinfoset%NUMBER_OF_COMPONENTS
2654 IF (.NOT.
ASSOCIATED(variable_ptr,
TARGET=elementalinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE))
THEN 2655 num_of_variables=num_of_variables+1
2656 variable_ptr=>elementalinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE
2658 group_variables(num_of_variables)=group_variables(num_of_variables)+1
2661 DO scaleindex = 1, num_of_scaling_factor_sets
2662 basis => listscalebases( scaleindex )%PTR
2663 IF(.NOT.
ASSOCIATED(basis))
THEN 2664 CALL flagerror(
"Basis is not associated",err,error,*999)
2667 SELECT CASE( basis%TYPE )
2677 group_scale_factors(scaleindex)=num_scl
2678 group_node(scaleindex)=num_node
2684 CALL flagerror(
"File write error during field export", err, error,*999 )
2687 CALL reallocate(interpolation_xi, basis%NUMBER_OF_XI, &
2688 &
"Could not allocate temporary variable buffer in IO", err, error, *999)
2689 CALL reallocate(element_derivatives, sum(group_scale_factors(:)), &
2690 &
"Could not allocate temporary variable buffer in IO", err, error, *999)
2693 DO scaleindex = 1, num_of_scaling_factor_sets
2694 basis => listscalebases( scaleindex )%PTR
2695 SELECT CASE( basis%TYPE )
2701 interpolation_xi(1:basis%NUMBER_OF_XI)=basis%INTERPOLATION_XI(1:basis%NUMBER_OF_XI)
2702 err = fieldexport_scalefactors( sessionhandle, basis%NUMBER_OF_XI, c_loc(interpolation_xi), &
2703 & basis%NUMBER_OF_ELEMENT_PARAMETERS );
2705 CALL flagerror(
"can not get basis type of lagrange_hermite label" ,err, error, *999 )
2715 CALL flagerror(
"File write error during field export", err, error,*999 )
2720 CALL flagerror(
"File write error during field export", err, error,*999 )
2725 NULLIFY(variable_ptr)
2726 DO comp_idx=1,elementalinfoset%NUMBER_OF_COMPONENTS
2727 component => elementalinfoset%COMPONENTS(comp_idx)%PTR
2730 IF(.NOT.
ASSOCIATED(variable_ptr,
TARGET=component%FIELD_VARIABLE))
THEN 2732 variable_ptr=>component%FIELD_VARIABLE
2735 fvar_name =
char(variable_ptr%variable_label)
2738 cvar_name(i)=fvar_name(i:i)
2740 cvar_name(length+1)=c_null_char
2742 IF( variable_ptr%FIELD%TYPE == field_geometric_type .AND. &
2743 & variable_ptr%VARIABLE_TYPE == field_u_variable_type )
THEN 2744 NULLIFY(coordinate_system)
2745 CALL field_coordinate_system_get(variable_ptr%FIELD,coordinate_system,err,error,*999)
2747 & group_variables(var_idx) )
2749 err =
fieldexport_variable( sessionhandle, cvar_name, var_idx, variable_ptr%FIELD%TYPE, variable_ptr%VARIABLE_TYPE, &
2750 & group_variables(var_idx) )
2754 CALL flagerror(
"File write error during field export", err, error,*999 )
2758 componentdomain=>component%DOMAIN
2759 domain_elements=>componentdomain%TOPOLOGY%ELEMENTS
2760 basis=>domain_elements%ELEMENTS(group_local_number(comp_idx))%BASIS
2762 SELECT CASE( basis%TYPE )
2771 CALL reallocate(number_of_derivatives, num_node, &
2772 &
"Could not allocate temporary variable buffer in IO", err, error, *999)
2774 &
"Could not allocate temporary variable buffer in IO", err, error, *999)
2776 &
"Could not allocate temporary variable buffer in IO", err, error, *999)
2778 SELECT CASE(component%INTERPOLATION_TYPE)
2779 CASE(field_constant_interpolation)
2781 CASE(field_element_based_interpolation)
2783 CASE(field_node_based_interpolation)
2785 CASE(field_grid_point_based_interpolation)
2787 CASE(field_gauss_point_based_interpolation)
2789 CASE(field_data_point_based_interpolation)
2795 IF(component%INTERPOLATION_TYPE==field_gauss_point_based_interpolation)
THEN 2797 interpolation_xi(1:basis%NUMBER_OF_XI)=basis%QUADRATURE%NUMBER_OF_GAUSS_XI(1:basis%NUMBER_OF_XI)
2801 interpolation_xi(1:basis%NUMBER_OF_XI)=basis%INTERPOLATION_XI(1:basis%NUMBER_OF_XI)
2804 IF( variable_ptr%FIELD%TYPE == field_geometric_type .AND. &
2805 & variable_ptr%VARIABLE_TYPE == field_u_variable_type )
THEN 2809 NULLIFY(coordinate_system)
2810 CALL field_coordinate_system_get(variable_ptr%FIELD,coordinate_system,err,error,*999)
2812 & component%COMPONENT_NUMBER,interptype,basis%NUMBER_OF_XI, c_loc( interpolation_xi ))
2818 & component%COMPONENT_NUMBER,interptype,basis%NUMBER_OF_XI, c_loc( interpolation_xi ) )
2821 CALL flagerror(
"File write error during field export", err, error,*999 )
2824 IF( interptype /= 3 .AND. interptype /= 6)
THEN 2828 IF(list_comp_scale(comp_idx)==1)
THEN 2831 scaleindex= sum(group_scale_factors(1:list_comp_scale(comp_idx)))-1
2835 scaleindex1 = scaleindex + 1
2849 IF (basis%NUMBER_OF_COLLAPSED_XI>0)
THEN 2854 node_number_counter=0
2855 number_of_unique_nodes = 0
2856 IF(basis%INTERPOLATION_XI(1)>3)
THEN 2859 nodesx=basis%INTERPOLATION_XI(1)+1
2861 IF(basis%INTERPOLATION_XI(2)>3)
THEN 2864 nodesy=basis%INTERPOLATION_XI(2)+1
2866 IF(basis%INTERPOLATION_XI(3)>3)
THEN 2869 nodesz=basis%INTERPOLATION_XI(3)+1
2881 node_number_collapsed=(nz-1)*nodesx*(nodesy-1)+nz
2882 node_number=node_number_collapsed
2884 IF (node_number_counter<node_number_collapsed)
THEN 2885 node_number_counter=node_number_collapsed+1
2887 node_number_counter=node_number_counter+1
2889 node_number=node_number_counter
2891 node_indexes(nn)=node_number
2892 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
2893 IF(node_number>number_of_unique_nodes)
THEN 2894 DO mm=1,number_of_derivatives(nn)
2896 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
2897 scale_indexes(derivativeindex)=scaleindex1
2898 derivativeindex=derivativeindex+1
2899 scaleindex1=scaleindex1+1
2901 number_of_unique_nodes=number_of_unique_nodes+1
2903 DO mm=1,number_of_derivatives(nn)
2905 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
2906 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
2907 & nn-number_of_unique_nodes-2))+mm)
2908 derivativeindex = derivativeindex + 1
2919 IF (ny==nodesy)
THEN 2920 node_number_collapsed=(nz-1)*nodesx*(nodesy-1)+nodesx*(nodesy-1)+nz
2921 node_number=node_number_collapsed
2923 IF (node_number_counter<node_number_collapsed)
THEN 2924 node_number_counter=node_number_collapsed+1
2926 node_number_counter=node_number_counter+1
2928 node_number=node_number_counter
2930 node_indexes(nn)=node_number
2931 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
2932 IF(node_number>number_of_unique_nodes)
THEN 2933 DO mm=1,number_of_derivatives(nn)
2935 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
2936 scale_indexes(derivativeindex)=scaleindex1
2937 derivativeindex=derivativeindex+1
2938 scaleindex1=scaleindex1+1
2940 number_of_unique_nodes=number_of_unique_nodes+1
2942 DO mm=1,number_of_derivatives(nn)
2944 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
2945 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
2946 & nn-number_of_unique_nodes-2))+mm)
2947 derivativeindex = derivativeindex + 1
2959 node_number_collapsed=ny
2960 node_number=node_number_collapsed
2962 IF (node_number_counter<node_number_collapsed)
THEN 2963 node_number_counter=node_number_collapsed+1
2965 node_number_counter=node_number_counter+1
2967 node_number=node_number_counter
2969 node_indexes(nn)=node_number
2970 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
2971 IF(node_number>number_of_unique_nodes)
THEN 2972 DO mm=1,number_of_derivatives(nn)
2974 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
2975 scale_indexes(derivativeindex)=scaleindex1
2976 derivativeindex=derivativeindex+1
2977 scaleindex1=scaleindex1+1
2979 number_of_unique_nodes=number_of_unique_nodes+1
2981 DO mm=1,number_of_derivatives(nn)
2983 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
2984 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
2985 & nn-number_of_unique_nodes-2))+mm)
2986 derivativeindex = derivativeindex + 1
2997 IF (nz==nodesz)
THEN 2998 node_number_collapsed=(nodesz-1)*(nodesy*nodesx)+ny
2999 node_number=node_number_collapsed
3001 IF (node_number_counter<node_number_collapsed)
THEN 3002 node_number_counter=node_number_collapsed+1
3004 node_number_counter=node_number_counter+1
3006 node_number=node_number_counter
3008 node_indexes(nn)=node_number
3009 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
3010 IF(node_number>number_of_unique_nodes)
THEN 3011 DO mm=1,number_of_derivatives(nn)
3013 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3014 scale_indexes(derivativeindex)=scaleindex1
3015 derivativeindex=derivativeindex+1
3016 scaleindex1=scaleindex1+1
3018 number_of_unique_nodes=number_of_unique_nodes+1
3020 DO mm=1,number_of_derivatives(nn)
3022 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3023 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
3024 & nn-number_of_unique_nodes-2))+mm)
3025 derivativeindex = derivativeindex + 1
3039 node_number_collapsed=(nz-1)*nodesx*(nodesy-1)+nz
3040 node_number=node_number_collapsed
3042 IF (node_number_counter<node_number_collapsed)
THEN 3043 node_number_counter=node_number_collapsed+1
3045 node_number_counter=node_number_counter+1
3047 node_number=node_number_counter
3049 node_indexes(nn)=node_number
3050 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
3051 IF(node_number>number_of_unique_nodes)
THEN 3052 DO mm=1,number_of_derivatives(nn)
3054 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3055 scale_indexes(derivativeindex)=scaleindex1
3056 derivativeindex=derivativeindex+1
3057 scaleindex1=scaleindex1+1
3059 number_of_unique_nodes=number_of_unique_nodes+1
3061 DO mm=1,number_of_derivatives(nn)
3063 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3064 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
3065 & nn-number_of_unique_nodes-2))+mm)
3066 derivativeindex = derivativeindex + 1
3077 IF (ny==nodesy)
THEN 3078 node_number=(nz-1)*nodesx*(nodesy-1)+nz+nodesx-1
3079 node_number=node_number_collapsed
3081 IF (node_number_counter<node_number_collapsed)
THEN 3082 node_number_counter=node_number_collapsed+1
3084 node_number_counter=node_number_counter+1
3086 node_number=node_number_counter
3088 node_indexes(nn)=node_number
3089 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
3090 IF(node_number>number_of_unique_nodes)
THEN 3091 DO mm=1,number_of_derivatives(nn)
3093 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3094 scale_indexes(derivativeindex)=scaleindex1
3095 derivativeindex=derivativeindex+1
3096 scaleindex1=scaleindex1+1
3098 number_of_unique_nodes=number_of_unique_nodes+1
3100 DO mm=1,number_of_derivatives(nn)
3102 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3103 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
3104 & nn-number_of_unique_nodes-2))+mm)
3105 derivativeindex = derivativeindex + 1
3117 node_number_collapsed=nx
3118 node_number=node_number_collapsed
3120 IF (node_number_counter<node_number_collapsed)
THEN 3121 node_number_counter=node_number_collapsed+1
3123 node_number_counter=node_number_counter+1
3125 node_number=node_number_counter
3127 node_indexes(nn)=node_number
3128 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
3129 IF(node_number>number_of_unique_nodes)
THEN 3130 DO mm=1,number_of_derivatives(nn)
3132 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3133 scale_indexes(derivativeindex)=scaleindex1
3134 derivativeindex=derivativeindex+1
3135 scaleindex1=scaleindex1+1
3137 number_of_unique_nodes=number_of_unique_nodes+1
3139 DO mm=1,number_of_derivatives(nn)
3141 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3142 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
3143 & nn-number_of_unique_nodes-2))+mm)
3144 derivativeindex = derivativeindex + 1
3155 IF (nz==nodesz)
THEN 3156 node_number_collapsed=(nodesz-1)*nodesy*nodesx+nx
3157 node_number=node_number_collapsed
3159 IF (node_number_counter<node_number_collapsed)
THEN 3160 node_number_counter=node_number_collapsed+1
3162 node_number_counter=node_number_counter+1
3164 node_number=node_number_counter
3166 node_indexes(nn)=node_number
3167 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
3168 IF(node_number>number_of_unique_nodes)
THEN 3169 DO mm=1,number_of_derivatives(nn)
3171 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3172 scale_indexes(derivativeindex)=scaleindex1
3173 derivativeindex=derivativeindex+1
3174 scaleindex1=scaleindex1+1
3176 number_of_unique_nodes=number_of_unique_nodes+1
3178 DO mm=1,number_of_derivatives(nn)
3180 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3181 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
3182 & nn-number_of_unique_nodes-2))+mm)
3183 derivativeindex = derivativeindex + 1
3197 node_number_collapsed=nodesx*(ny-1)+ny
3198 node_number=node_number_collapsed
3200 IF (node_number_counter<node_number_collapsed)
THEN 3201 node_number_counter=node_number_collapsed+1
3203 node_number_counter=node_number_counter+1
3205 node_number=node_number_counter
3207 node_indexes(nn)=node_number
3208 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
3209 IF(node_number>number_of_unique_nodes)
THEN 3210 DO mm=1,number_of_derivatives(nn)
3212 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3213 scale_indexes(derivativeindex)=scaleindex1
3214 derivativeindex=derivativeindex+1
3215 scaleindex1=scaleindex1+1
3217 number_of_unique_nodes=number_of_unique_nodes+1
3219 DO mm=1,number_of_derivatives(nn)
3221 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3222 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
3223 & nn-number_of_unique_nodes-2))+mm)
3224 derivativeindex = derivativeindex + 1
3235 IF (nx==nodesx)
THEN 3236 node_number_collapsed=nodesx*(ny-1)+ny+nodesx-1
3237 node_number=node_number_collapsed
3239 IF (node_number_counter<node_number_collapsed)
THEN 3240 node_number_counter=node_number_collapsed+1
3242 node_number_counter=node_number_counter+1
3244 node_number=node_number_counter
3246 node_indexes(nn)=node_number
3247 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
3248 IF(node_number>number_of_unique_nodes)
THEN 3249 DO mm=1,number_of_derivatives(nn)
3251 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3252 scale_indexes(derivativeindex)=scaleindex1
3253 derivativeindex=derivativeindex+1
3254 scaleindex1=scaleindex1+1
3256 number_of_unique_nodes=number_of_unique_nodes+1
3258 DO mm=1,number_of_derivatives(nn)
3260 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3261 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
3262 & nn-number_of_unique_nodes-2))+mm)
3263 derivativeindex = derivativeindex + 1
3275 node_number_collapsed=nx
3276 node_number=node_number_collapsed
3278 IF (node_number_counter<node_number_collapsed)
THEN 3279 node_number_counter=node_number_collapsed+1
3281 node_number_counter=node_number_counter+1
3283 node_number=node_number_counter
3285 node_indexes(nn)=node_number
3286 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
3287 IF(node_number>number_of_unique_nodes)
THEN 3288 DO mm=1,number_of_derivatives(nn)
3290 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3291 scale_indexes(derivativeindex)=scaleindex1
3292 derivativeindex=derivativeindex+1
3293 scaleindex1=scaleindex1+1
3295 number_of_unique_nodes=number_of_unique_nodes+1
3297 DO mm=1,number_of_derivatives(nn)
3299 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3300 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
3301 & nn-number_of_unique_nodes-2))+mm)
3302 derivativeindex = derivativeindex + 1
3313 IF (ny==nodesy)
THEN 3314 node_number_collapsed=nodesx*(nodesy-1)+nx
3315 node_number=node_number_collapsed
3317 IF (node_number_counter<node_number_collapsed)
THEN 3318 node_number_counter=node_number_collapsed+1
3320 node_number_counter=node_number_counter+1
3322 node_number=node_number_counter
3324 node_indexes(nn)=node_number
3325 number_of_derivatives(nn)=basis%NUMBER_OF_DERIVATIVES(node_number)
3326 IF(node_number>number_of_unique_nodes)
THEN 3327 DO mm=1,number_of_derivatives(nn)
3329 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3330 scale_indexes(derivativeindex)=scaleindex1
3331 derivativeindex=derivativeindex+1
3332 scaleindex1=scaleindex1+1
3334 number_of_unique_nodes=number_of_unique_nodes+1
3336 DO mm=1,number_of_derivatives(nn)
3338 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,node_number,err,error)
3339 scale_indexes(derivativeindex) = scale_indexes(sum(number_of_derivatives(1:node_number+ &
3340 & nn-number_of_unique_nodes-2))+mm)
3341 derivativeindex = derivativeindex + 1
3350 number_of_element_nodes=nn
3353 DO nn=1,basis%NUMBER_OF_NODES
3354 number_of_derivatives(nn) = basis%NUMBER_OF_DERIVATIVES(nn)
3355 DO mm=1,number_of_derivatives(nn)
3357 & domain_elements%ELEMENTS(group_local_number(comp_idx)),mm,nn,err,error)
3358 scale_indexes(derivativeindex) = scaleindex1
3359 derivativeindex = derivativeindex + 1
3360 scaleindex1 = scaleindex1 + 1
3366 DO nn = 1, basis%NUMBER_OF_NODES
3367 DO mm = 1, max_node_element%BASIS%NUMBER_OF_NODES
3368 node_local_number = domain_elements%ELEMENTS( local_number )%ELEMENT_NODES( nn )
3369 node_user_number=domain_elements%DOMAIN%TOPOLOGY%NODES%NODES(node_local_number)%USER_NUMBER
3370 max_element_local_number = max_node_element%ELEMENT_NODES( mm )
3371 max_element_user_number = max_element_domain_nodes%NODES(max_element_local_number)%USER_NUMBER
3372 IF( node_user_number == max_element_user_number )
THEN 3373 node_indexes( nn ) = mm
3378 number_of_element_nodes= basis%NUMBER_OF_NODES
3382 IF( variable_ptr%FIELD%SCALINGS%SCALING_TYPE == field_no_scaling )
THEN 3383 scale_indexes(:) = -1
3386 & c_loc( element_derivatives ), c_loc( node_indexes ), c_loc( scale_indexes ) )
3393 CALL flagerror(
"File write error during field export", err, error,*999 )
3412 exits(
"FieldIO_ExportElementalGroupHeaderFortran")
3414 999 errorsexits(
"FieldIO_ExportElementalGroupHeaderFortran",err,error)
3423 & mycomputationalnodenumber, err, error, * )
3425 INTEGER(INTG) :: sessionHandle
3427 INTEGER(INTG) :: componentScales(:)
3428 INTEGER(INTG) :: globalNumber
3429 INTEGER(INTG) :: myComputationalNodeNumber
3430 INTEGER(INTG),
INTENT(OUT) :: ERR
3434 INTEGER(INTG) :: scaleIndex, componentIndex, localNumber, scaleFactorCount, nodeIndex
3435 INTEGER(INTG) :: nodeNumber, derivativeIndex, nv, nk, ny2, firstScaleSet
3441 REAL(C_DOUBLE),
ALLOCATABLE,
TARGET :: scaleBuffer(:)
3442 REAL(DP),
POINTER :: SCALE_FACTORS(:)
3444 NULLIFY(scale_factors)
3446 enters(
"FIELD_IO_EXPORT_ELEMENT_SCALE_FACTORS",err,error,*999)
3450 DO componentindex = 1, components%NUMBER_OF_COMPONENTS
3451 component => components%COMPONENTS( componentindex )%PTR
3454 domainelementmapping=>component%DOMAIN%MAPPINGS%ELEMENTS
3458 & mycomputationalnodenumber )
3460 domainelements => component%DOMAIN%TOPOLOGY%ELEMENTS
3461 domainnodes => component%DOMAIN%TOPOLOGY%NODES
3465 IF( componentscales( componentindex ) == scaleindex )
THEN 3466 scaleindex = scaleindex + 1
3468 scalefactorcount = 0
3469 basis => domainelements%ELEMENTS( localnumber )%BASIS
3471 CALL reallocate( scalebuffer, sum( basis%NUMBER_OF_DERIVATIVES(1:basis%NUMBER_OF_NODES ) ), &
3472 &
"Could not allocate scale buffer in IO", err, error, *999 )
3474 IF( component%FIELD_VARIABLE%FIELD%SCALINGS%SCALING_TYPE /= field_no_scaling )
THEN 3476 & scaling_index)%SCALE_FACTORS,scale_factors,err,error,*999)
3480 DO nodeindex = 1, basis%NUMBER_OF_NODES
3481 nodenumber = domainelements%ELEMENTS( localnumber )%ELEMENT_NODES( nodeindex )
3482 DO derivativeindex = 1, basis%NUMBER_OF_DERIVATIVES( nodeindex )
3483 nk = domainelements%ELEMENTS( localnumber )%ELEMENT_DERIVATIVES(derivativeindex, nodeindex )
3484 nv = domainelements%ELEMENTS( localnumber )%elementVersions(derivativeindex, nodeindex )
3485 ny2 = domainnodes%NODES( nodenumber )%DERIVATIVES(nk)%DOF_INDEX(nv)
3486 scalefactorcount = scalefactorcount + 1
3487 IF( component%FIELD_VARIABLE%FIELD%SCALINGS%SCALING_TYPE /= field_no_scaling )
THEN 3488 scalebuffer( scalefactorcount ) = scale_factors(ny2)
3490 scalebuffer( scalefactorcount ) = 1
3511 NULLIFY( scale_factors )
3518 CALL flagerror(
"Cannot write node scales to file", err, error,*999 )
3526 exits(
"FIELD_IO_EXPORT_ELEMENT_SCALE_FACTORS")
3528 999 errorsexits(
"FIELD_IO_EXPORT_ELEMENT_SCALE_FACTORS",err,error)
3543 INTEGER(INTG),
INTENT(IN):: my_computational_node_number
3544 INTEGER(INTG),
INTENT(OUT) :: ERR
3547 INTEGER(INTG) :: sessionHandle
3555 INTEGER(INTG) :: local_number, global_number, MAX_NODE_COMP_INDEX, NUM_DIM
3556 INTEGER(INTG),
ALLOCATABLE :: LIST_COMP_SCALE(:), NODAL_NUMBER(:)
3557 INTEGER(C_INT),
TARGET :: USER_ELEMENT_NODES(64)
3558 INTEGER(INTG) :: elem_idx, comp_idx, NUM_OF_SCALING_FACTOR_SETS, isFirstValueSet
3559 REAL(DP),
ALLOCATABLE :: SCALE_FACTORS(:)
3561 REAL(DP),
POINTER :: GEOMETRIC_PARAMETERS(:)
3562 INTEGER(INTG),
POINTER :: GEOMETRIC_PARAMETERS_INTG(:)
3563 REAL(DP),
ALLOCATABLE :: GEOMETRIC_PARAMETERS_DP(:)
3565 enters(
"FIELD_IO_EXPORT_ELEMENTS_INTO_LOCAL_FILE",err,error,*999)
3571 file_name=name//
".part"//
trim(
number_to_vstring(my_computational_node_number,
"*",err,error))//
".exelem" 3572 num_of_scaling_factor_sets=0
3574 IF(.NOT.
ALLOCATED(elemental_info_set%COMPONENT_INFO_SET))
THEN 3575 CALL flagerror(
"the elemental information set in input is invalid",err,error,*999)
3578 IF(.NOT.
ALLOCATED(elemental_info_set%LIST_OF_GLOBAL_NUMBER))
THEN 3579 CALL flagerror(
"the elemental information set is not associated with any numbering list",err,error,*999)
3582 IF(elemental_info_set%NUMBER_OF_ENTRIES==0)
THEN 3583 CALL flagerror(
"the elemental information set does not contain any nodes",err,error,*999)
3586 IF(elemental_info_set%COMPONENT_INFO_SET(1)%PTR%SAME_HEADER)
THEN 3587 CALL flagerror(
"the first header flag of elemental information set should be false",err,error,*999)
3594 NULLIFY(coordinate_system)
3595 CALL field_coordinate_system_get(elemental_info_set%COMPONENT_INFO_SET(1)%PTR%COMPONENTS(1)%PTR% &
3596 & field_variable%FIELD,coordinate_system,err,error,*999)
3597 num_dim=coordinate_system%NUMBER_OF_DIMENSIONS
3601 CALL flagerror(
"Cannot open file export session", err, error,*999 )
3604 IF(
ASSOCIATED(elemental_info_set%FIELDS%REGION))
THEN 3607 IF(
ASSOCIATED(elemental_info_set%FIELDS%INTERFACE))
THEN 3608 err =
fieldexport_group( sessionhandle,
char(elemental_info_set%FIELDS%INTERFACE%LABEL)//c_null_char )
3610 CALL flagerror(
"Fields region or interface is not associated.",err,error,*999)
3614 CALL flagerror(
"Cannot write group name to elements file", err, error,*999 )
3617 components => elemental_info_set%COMPONENT_INFO_SET(1)%PTR
3618 component => components%COMPONENTS(1)%PTR
3619 domain_mapping_elements=>component%DOMAIN%MAPPINGS%ELEMENTS
3620 domain_elements=>component%DOMAIN%TOPOLOGY%ELEMENTS
3621 basis => domain_elements%ELEMENTS( 1 )%BASIS
3625 CALL flagerror(
"Cannot write mesh dimensions to file", err, error,*999 )
3628 DO elem_idx=1, elemental_info_set%NUMBER_OF_ENTRIES
3630 components => elemental_info_set%COMPONENT_INFO_SET(elem_idx)%PTR
3631 global_number = elemental_info_set%LIST_OF_GLOBAL_NUMBER(elem_idx)
3633 IF(.NOT.
ALLOCATED(list_comp_scale))
THEN 3634 ALLOCATE(list_comp_scale(components%NUMBER_OF_COMPONENTS),stat=err)
3635 IF(err/=0)
CALL flagerror(
"Could not allocate LIST_COMP_SCALE in exelem io",err,error,*999)
3639 IF(.NOT.components%SAME_HEADER)
THEN 3642 & list_comp_scale, my_computational_node_number, components, sessionhandle, err, error, *999)
3649 component => components%COMPONENTS(max_node_comp_index)%PTR
3650 element => component%DOMAIN%MESH%TOPOLOGY(component%MESH_COMPONENT_NUMBER)%PTR%ELEMENTS%ELEMENTS(global_number)
3654 CALL flagerror(
"Cannot write element index to file", err, error,*999 )
3658 DO comp_idx = 1, components%NUMBER_OF_COMPONENTS
3659 component => components%COMPONENTS(comp_idx)%PTR
3662 domain_mapping_elements=>component%DOMAIN%MAPPINGS%ELEMENTS
3663 domain_elements=>component%DOMAIN%TOPOLOGY%ELEMENTS
3666 & my_computational_node_number )
3668 basis => domain_elements%ELEMENTS( local_number )%BASIS
3670 IF( component%INTERPOLATION_TYPE == field_element_based_interpolation )
THEN 3674 IF(component%FIELD_VARIABLE%DATA_TYPE==field_dp_type)
THEN 3675 NULLIFY(geometric_parameters)
3676 CALL field_parameter_set_data_get(component%FIELD_VARIABLE%FIELD,&
3677 & component%FIELD_VARIABLE%VARIABLE_TYPE,field_values_set_type,geometric_parameters,err,error,*999)
3679 & geometric_parameters(component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS(local_number)))
3680 ELSE IF(component%FIELD_VARIABLE%DATA_TYPE==field_intg_type)
THEN 3681 NULLIFY(geometric_parameters_intg)
3682 CALL field_parameter_set_data_get(component%FIELD_VARIABLE%FIELD,&
3683 & component%FIELD_VARIABLE%VARIABLE_TYPE,field_values_set_type,geometric_parameters_intg,err,error,*999)
3684 ALLOCATE(geometric_parameters_dp(
SIZE(geometric_parameters_intg)))
3685 IF(err/=0)
CALL flagerror(
"Could not allocate geometric parameters dp", err, error,*999 )
3686 geometric_parameters_dp(1:
SIZE(geometric_parameters_intg))= &
3687 &
REAL(geometric_parameters_intg(1:size(geometric_parameters_intg)))
3689 & geometric_parameters_dp(component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS(local_number)))
3690 DEALLOCATE(geometric_parameters_dp)
3692 CALL flagerror(
"Only INTG and REAL data types implemented.", err, error,*999 )
3695 ELSE IF( component%INTERPOLATION_TYPE == field_constant_interpolation )
THEN 3696 IF(component%FIELD_VARIABLE%DATA_TYPE==field_dp_type)
THEN 3697 NULLIFY(geometric_parameters)
3698 CALL field_parameter_set_data_get(component%FIELD_VARIABLE%FIELD,component%FIELD_VARIABLE%VARIABLE_TYPE, &
3699 & field_values_set_type,geometric_parameters,err,error,*999)
3701 & geometric_parameters(component%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP))
3702 ELSE IF(component%FIELD_VARIABLE%DATA_TYPE==field_intg_type)
THEN 3703 NULLIFY(geometric_parameters_intg)
3704 CALL field_parameter_set_data_get(component%FIELD_VARIABLE%FIELD,component%FIELD_VARIABLE%VARIABLE_TYPE, &
3705 & field_values_set_type,geometric_parameters_intg,err,error,*999)
3706 ALLOCATE(geometric_parameters_dp(
SIZE(geometric_parameters_intg)))
3707 IF(err/=0)
CALL flagerror(
"Could not allocate geometric parameters dp", err, error,*999 )
3708 geometric_parameters_dp(1:
SIZE(geometric_parameters_intg))= &
3709 &
REAL(geometric_parameters_intg(1:size(geometric_parameters_intg)))
3711 & geometric_parameters_dp(component%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP))
3712 DEALLOCATE(geometric_parameters_dp)
3714 CALL flagerror(
"Only INTG and REAL data types implemented.", err, error,*999 )
3717 ELSE IF( component%INTERPOLATION_TYPE == field_gauss_point_based_interpolation)
THEN 3718 IF(component%FIELD_VARIABLE%DATA_TYPE==field_dp_type)
THEN 3719 NULLIFY(geometric_parameters)
3720 CALL field_parameter_set_data_get(component%FIELD_VARIABLE%FIELD,component%FIELD_VARIABLE%VARIABLE_TYPE, &
3721 & field_values_set_type,geometric_parameters,err,error,*999)
3724 & geometric_parameters(component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(1,local_number)))
3725 ELSE IF(component%FIELD_VARIABLE%DATA_TYPE==field_intg_type)
THEN 3726 NULLIFY(geometric_parameters_intg)
3727 CALL field_parameter_set_data_get(component%FIELD_VARIABLE%FIELD,component%FIELD_VARIABLE%VARIABLE_TYPE, &
3728 & field_values_set_type,geometric_parameters_intg,err,error,*999)
3729 ALLOCATE(geometric_parameters_dp(
SIZE(geometric_parameters_intg)))
3730 IF(err/=0)
CALL flagerror(
"Could not allocate geometric parameters dp", err, error,*999 )
3731 geometric_parameters_dp(1:
SIZE(geometric_parameters_intg))= &
3732 &
REAL(geometric_parameters_intg(1:size(geometric_parameters_intg)))
3735 & geometric_parameters_dp(component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(1,local_number)))
3736 DEALLOCATE(geometric_parameters_dp)
3738 CALL flagerror(
"Only INTG and REAL data types implemented.", err, error,*999 )
3744 CALL flagerror(
"Cannot write grid points to nodes file", err, error,*999 )
3749 basis=>element%BASIS
3755 SELECT CASE(basis%TYPE)
3757 user_element_nodes(1:basis%NUMBER_OF_NODES)=element%USER_ELEMENT_NODES(1:basis%NUMBER_OF_NODES)
3759 SELECT CASE(basis%NUMBER_OF_XI)
3761 user_element_nodes(1:basis%NUMBER_OF_NODES)=element%USER_ELEMENT_NODES(1:basis%NUMBER_OF_NODES)
3763 SELECT CASE(basis%INTERPOLATION_ORDER(1))
3765 user_element_nodes(1:3)=element%USER_ELEMENT_NODES(1:3)
3767 user_element_nodes(1)=element%USER_ELEMENT_NODES(1)
3768 user_element_nodes(2)=element%USER_ELEMENT_NODES(4)
3769 user_element_nodes(3)=element%USER_ELEMENT_NODES(2)
3770 user_element_nodes(4)=element%USER_ELEMENT_NODES(6)
3771 user_element_nodes(5)=element%USER_ELEMENT_NODES(5)
3772 user_element_nodes(6)=element%USER_ELEMENT_NODES(3)
3774 user_element_nodes(1)=element%USER_ELEMENT_NODES(1)
3775 user_element_nodes(2)=element%USER_ELEMENT_NODES(4)
3776 user_element_nodes(3)=element%USER_ELEMENT_NODES(5)
3777 user_element_nodes(4)=element%USER_ELEMENT_NODES(2)
3778 user_element_nodes(5)=element%USER_ELEMENT_NODES(9)
3779 user_element_nodes(6)=element%USER_ELEMENT_NODES(10)
3780 user_element_nodes(7)=element%USER_ELEMENT_NODES(6)
3781 user_element_nodes(8)=element%USER_ELEMENT_NODES(8)
3782 user_element_nodes(9)=element%USER_ELEMENT_NODES(7)
3783 user_element_nodes(10)=element%USER_ELEMENT_NODES(3)
3785 CALL flagerror(
"Invalid basis order.",err,error,*999)
3788 SELECT CASE(basis%INTERPOLATION_ORDER(1))
3790 user_element_nodes(1:4)=element%USER_ELEMENT_NODES(1:4)
3792 user_element_nodes(1)=element%USER_ELEMENT_NODES(1)
3793 user_element_nodes(2)=element%USER_ELEMENT_NODES(5)
3794 user_element_nodes(3)=element%USER_ELEMENT_NODES(2)
3795 user_element_nodes(4)=element%USER_ELEMENT_NODES(6)
3796 user_element_nodes(5)=element%USER_ELEMENT_NODES(8)
3797 user_element_nodes(6)=element%USER_ELEMENT_NODES(3)
3798 user_element_nodes(7)=element%USER_ELEMENT_NODES(7)
3799 user_element_nodes(8)=element%USER_ELEMENT_NODES(10)
3800 user_element_nodes(9)=element%USER_ELEMENT_NODES(9)
3801 user_element_nodes(10)=element%USER_ELEMENT_NODES(4)
3803 user_element_nodes(1)=element%USER_ELEMENT_NODES(1)
3804 user_element_nodes(2)=element%USER_ELEMENT_NODES(5)
3805 user_element_nodes(3)=element%USER_ELEMENT_NODES(6)
3806 user_element_nodes(4)=element%USER_ELEMENT_NODES(2)
3807 user_element_nodes(5)=element%USER_ELEMENT_NODES(7)
3808 user_element_nodes(6)=element%USER_ELEMENT_NODES(17)
3809 user_element_nodes(7)=element%USER_ELEMENT_NODES(11)
3810 user_element_nodes(8)=element%USER_ELEMENT_NODES(8)
3811 user_element_nodes(9)=element%USER_ELEMENT_NODES(12)
3812 user_element_nodes(10)=element%USER_ELEMENT_NODES(3)
3813 user_element_nodes(11)=element%USER_ELEMENT_NODES(9)
3814 user_element_nodes(12)=element%USER_ELEMENT_NODES(18)
3815 user_element_nodes(13)=element%USER_ELEMENT_NODES(15)
3816 user_element_nodes(14)=element%USER_ELEMENT_NODES(19)
3817 user_element_nodes(15)=element%USER_ELEMENT_NODES(20)
3818 user_element_nodes(16)=element%USER_ELEMENT_NODES(13)
3819 user_element_nodes(17)=element%USER_ELEMENT_NODES(10)
3820 user_element_nodes(18)=element%USER_ELEMENT_NODES(16)
3821 user_element_nodes(19)=element%USER_ELEMENT_NODES(14)
3822 user_element_nodes(20)=element%USER_ELEMENT_NODES(4)
3824 CALL flagerror(
"Invalid basis order.",err,error,*999)
3827 CALL flagerror(
"Invalid number of xi.",err,error,*999)
3830 CALL flagerror(
"Not implemented.",err,error,*999)
3834 CALL flagerror(
"Cannot write node indices to file", err, error,*999 )
3838 & list_comp_scale, global_number, my_computational_node_number, err, error, *999 )
3844 CALL flagerror(
"Cannot close element export file", err, error,*999 )
3853 exits(
"FIELD_IO_EXPORT_ELEMENTS_INTO_LOCAL_FILE")
3855 999 errorsexits(
"FIELD_IO_EXPORT_ELEMENTS_INTO_LOCAL_FILE",err,error)
3867 INTEGER(INTG),
INTENT(IN):: my_computational_node_number
3868 INTEGER(INTG),
INTENT(OUT) :: ERR
3873 INTEGER(INTG) :: global_number1, local_number1, global_number2, local_number2
3874 INTEGER(INTG) :: component_idx, nn1, nn2
3875 INTEGER(INTG) :: node_idx, deriv_idx
3877 LOGICAL :: SAME_ELEMENT_INFO
3880 enters(
"FIELD_IO_ELEMENTAL_INFO_SET_SORT",err,error,*999)
3882 IF(.NOT.
ALLOCATED(elemental_info_set%LIST_OF_GLOBAL_NUMBER))
THEN 3883 CALL flagerror(
"list of global numbering in the input data is invalid",err,error,*999)
3885 IF(.NOT.
ALLOCATED(elemental_info_set%COMPONENT_INFO_SET))
THEN 3886 CALL flagerror(
"nodal information set in the input data is invalid",err,error,*999)
3899 DO WHILE(nn1<elemental_info_set%NUMBER_OF_ENTRIES)
3901 global_number1=elemental_info_set%LIST_OF_GLOBAL_NUMBER(nn1)
3902 DO nn2=nn1+1,elemental_info_set%NUMBER_OF_ENTRIES
3903 global_number2=elemental_info_set%LIST_OF_GLOBAL_NUMBER(nn2)
3904 IF(elemental_info_set%COMPONENT_INFO_SET(nn1)%PTR%NUMBER_OF_COMPONENTS== &
3905 & elemental_info_set%COMPONENT_INFO_SET(nn2)%PTR%NUMBER_OF_COMPONENTS)
THEN 3906 same_element_info=.true.
3908 DO component_idx=1,elemental_info_set%COMPONENT_INFO_SET(nn1)%PTR%NUMBER_OF_COMPONENTS
3914 IF(.NOT.
ASSOCIATED(elemental_info_set%COMPONENT_INFO_SET(nn1)%PTR%COMPONENTS(component_idx)%PTR, &
3915 &
TARGET=elemental_info_set%COMPONENT_INFO_SET(nn2)%PTR%COMPONENTS(component_idx)%PTR))
THEN 3916 same_element_info=.false.
3947 IF(same_element_info)
THEN 3948 DO component_idx=1,elemental_info_set%COMPONENT_INFO_SET(nn1)%PTR%NUMBER_OF_COMPONENTS
3950 domain_mapping_elements=>&
3951 & elemental_info_set%COMPONENT_INFO_SET(nn1)%PTR%COMPONENTS(component_idx)%PTR%DOMAIN% &
3956 & my_computational_node_number )
3958 & elemental_info_set%COMPONENT_INFO_SET(nn1)%PTR%COMPONENTS(component_idx)%PTR% &
3959 & domain%TOPOLOGY%ELEMENTS
3962 domain_mapping_elements=>&
3963 & elemental_info_set%COMPONENT_INFO_SET(nn2)%PTR%COMPONENTS(component_idx)%PTR% &
3964 & domain%MAPPINGS%ELEMENTS
3968 & my_computational_node_number )
3970 & elemental_info_set%COMPONENT_INFO_SET(nn2)%PTR%COMPONENTS(component_idx)%PTR% &
3971 & domain%TOPOLOGY%ELEMENTS
3974 IF(domain_elements1%ELEMENTS(local_number1)%BASIS%GLOBAL_NUMBER/=&
3975 &domain_elements2%ELEMENTS(local_number2)%BASIS%GLOBAL_NUMBER)
THEN 3976 same_element_info=.false.
3981 DO node_idx=1,domain_elements1%ELEMENTS(local_number1)%BASIS%NUMBER_OF_NODES
3982 DO deriv_idx=1,domain_elements1%ELEMENTS(local_number1)%BASIS%NUMBER_OF_DERIVATIVES(node_idx)
3983 IF (domain_elements1%ELEMENTS(local_number1)%elementVersions(deriv_idx,node_idx)/= &
3984 & domain_elements2%ELEMENTS(local_number2)%elementVersions(deriv_idx,node_idx))
THEN 3985 same_element_info=.false.
3996 IF(same_element_info)
THEN 3997 tmpinfoset => elemental_info_set%COMPONENT_INFO_SET(nn2)%PTR
3998 elemental_info_set%COMPONENT_INFO_SET(nn2)%PTR => elemental_info_set%COMPONENT_INFO_SET(nn1+1)%PTR
3999 elemental_info_set%COMPONENT_INFO_SET(nn1+1)%PTR => tmpinfoset
4001 elemental_info_set%COMPONENT_INFO_SET(nn2)%PTR%SAME_HEADER=.false.
4002 elemental_info_set%COMPONENT_INFO_SET(nn1+1)%PTR%SAME_HEADER=.true.
4005 elemental_info_set%LIST_OF_GLOBAL_NUMBER(nn2)=elemental_info_set%LIST_OF_GLOBAL_NUMBER(nn1+1)
4006 elemental_info_set%LIST_OF_GLOBAL_NUMBER(nn1+1)=global_number2
4061 exits(
"FIELD_IO_ELEMENTAL_INFO_SET_SORT")
4063 999 errorsexits(
"FIELD_IO_ELEMENTAL_INFO_SET_SORT",err,error)
4076 INTEGER(INTG),
INTENT(OUT):: ERR
4079 LOGICAL :: ININTERFACE,INREGION
4084 INTEGER(INTG) :: num_field, var_idx, component_idx, np, nn
4085 LOGICAL :: foundNewElement
4087 enters(
"FieldIO_ElementalInfoSetAttachLocalProcess",err,error,*999)
4092 IF(
ASSOCIATED(fields%REGION))
THEN 4095 IF(
ASSOCIATED(fields%INTERFACE))
THEN 4098 CALL flagerror(
"Fields is not associated with a region or interface.",err,error,*999)
4104 DO num_field =1, fields%NUMBER_OF_FIELDS
4105 IF(.NOT.
ASSOCIATED(fields%FIELDS(num_field)%PTR))
THEN 4107 &
" field handle in fields list is invalid" 4108 CALL flagerror(local_error,err,error,*999)
4111 IF( num_field == 1 )
THEN 4115 IF(fields%FIELDS(num_field-1)%PTR%REGION%USER_NUMBER/=fields%FIELDS(num_field)%PTR%REGION%USER_NUMBER)
THEN 4118 CALL flagerror(local_error,err,error,*999)
4123 DO num_field =1, fields%NUMBER_OF_FIELDS
4124 IF(.NOT.
ASSOCIATED(fields%FIELDS(num_field)%PTR))
THEN 4126 &
" field handle in fields list is invalid" 4127 CALL flagerror(local_error,err,error,*999)
4130 IF( num_field == 1 )
THEN 4134 IF(fields%FIELDS(num_field-1)%PTR%INTERFACE%USER_NUMBER/= &
4135 & fields%FIELDS(num_field)%PTR%INTERFACE%USER_NUMBER)
THEN 4138 CALL flagerror(local_error,err,error,*999)
4143 elemental_info_set%FIELDS=>fields
4148 IF((elemental_info_set%NUMBER_OF_ENTRIES/=0).OR.(.NOT.
ASSOCIATED(elemental_info_set%FIELDS)) &
4149 & .OR.
ALLOCATED(elemental_info_set%COMPONENT_INFO_SET))
THEN 4150 CALL flagerror(
"nodal information set is not initialized properly, and call start method first", &
4154 DO num_field=1,elemental_info_set%FIELDS%NUMBER_OF_FIELDS
4155 field=>elemental_info_set%FIELDS%FIELDS(num_field)%PTR
4156 IF(.NOT.
ALLOCATED(field%VARIABLES))
THEN 4159 DO var_idx=1, field%NUMBER_OF_VARIABLES
4160 field_variable=>field%VARIABLES(var_idx)
4161 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
4162 IF(.NOT.
ASSOCIATED(field_variable%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%ELEMENTS))
THEN 4166 domain_elements_mapping=>field_variable%COMPONENTS(component_idx)%DOMAIN%MAPPINGS%ELEMENTS
4167 DO np=1,domain_elements_mapping%NUMBER_OF_LOCAL
4168 foundnewelement=.true.
4169 DO nn=1,elemental_info_set%NUMBER_OF_ENTRIES
4170 IF(elemental_info_set%LIST_OF_GLOBAL_NUMBER(nn)==domain_elements_mapping%LOCAL_TO_GLOBAL_MAP(np))
THEN 4171 foundnewelement=.false.
4177 IF(foundnewelement)
THEN 4178 CALL grow_array( elemental_info_set%LIST_OF_GLOBAL_NUMBER, 1, &
4179 &
"Could not allocate temporary buffer in IO", err, error, *999 )
4180 elemental_info_set%LIST_OF_GLOBAL_NUMBER(elemental_info_set% &
4181 & number_of_entries+1) = domain_elements_mapping%LOCAL_TO_GLOBAL_MAP(np)
4182 elemental_info_set%NUMBER_OF_ENTRIES=elemental_info_set%NUMBER_OF_ENTRIES+1
4190 ALLOCATE(elemental_info_set%COMPONENT_INFO_SET(elemental_info_set%NUMBER_OF_ENTRIES),stat=err)
4191 IF(err/=0)
CALL flagerror(
"Could not allocate nodal information set",err,error,*999)
4193 DO nn = 1, elemental_info_set%NUMBER_OF_ENTRIES
4194 ALLOCATE( elemental_info_set%COMPONENT_INFO_SET(nn)%PTR )
4195 elemental_info_set%COMPONENT_INFO_SET(nn)%PTR%SAME_HEADER = .false.
4196 elemental_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS = 0
4201 DO num_field=1,elemental_info_set%FIELDS%NUMBER_OF_FIELDS
4202 field=>elemental_info_set%FIELDS%FIELDS(num_field)%PTR
4203 IF(.NOT.
ALLOCATED(field%VARIABLES))
THEN 4206 DO var_idx=1, field%NUMBER_OF_VARIABLES
4207 field_variable=>field%VARIABLES(var_idx)
4208 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
4209 IF(.NOT.
ASSOCIATED(field_variable%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%ELEMENTS))
THEN 4213 domain_elements_mapping=>field_variable%COMPONENTS(component_idx)%DOMAIN%MAPPINGS%ELEMENTS
4214 DO np=1,domain_elements_mapping%NUMBER_OF_LOCAL
4215 DO nn=1,elemental_info_set%NUMBER_OF_ENTRIES
4216 IF(elemental_info_set%LIST_OF_GLOBAL_NUMBER(nn)==domain_elements_mapping%LOCAL_TO_GLOBAL_MAP(np))
THEN 4222 CALL grow_array( elemental_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENTS, 1, &
4223 &
"Could not allocate component buffer in IO", err, error, *999 )
4224 elemental_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENTS( &
4225 & elemental_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS+1 &
4226 & )%PTR=>field%VARIABLES(var_idx)%COMPONENTS(component_idx)
4228 elemental_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS=&
4229 & elemental_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS+1
4238 exits(
"FieldIO_ElementalInfoSetAttachLocalProcess")
4240 999 errorsexits(
"FieldIO_ElementalInfoSetAttachLocalProcess",err,error)
4295 LOGICAL :: FIELD_IO_COMPARE_INFO_SET_COMPONENTS
4298 INTEGER(INTG) :: component_idx
4300 field_io_compare_info_set_components = .false.
4302 IF( set1%NUMBER_OF_COMPONENTS /= set2%NUMBER_OF_COMPONENTS )
THEN 4306 DO component_idx = 1, set1%NUMBER_OF_COMPONENTS
4324 IF( set1%COMPONENTS(component_idx)%PTR%FIELD_VARIABLE%FIELD%GLOBAL_NUMBER/= &
4325 & set2%COMPONENTS(component_idx)%PTR%FIELD_VARIABLE%FIELD%GLOBAL_NUMBER )
THEN 4330 IF( set1%COMPONENTS( component_idx )%PTR%FIELD_VARIABLE% &
4331 & variable_number /= set2%COMPONENTS( component_idx )%PTR% &
4332 & field_variable%VARIABLE_NUMBER )
THEN 4337 IF( set1%COMPONENTS( component_idx )%PTR%COMPONENT_NUMBER /= &
4338 & set2%COMPONENTS( component_idx)%PTR%COMPONENT_NUMBER )
THEN 4343 field_io_compare_info_set_components = .true.
4352 & doesmatch, err, error, * )
4356 INTEGER(INTG) :: my_computational_node_number
4357 INTEGER(INTG) :: global_number1
4358 INTEGER(INTG) :: global_number2
4359 LOGICAL :: doesMatch
4360 INTEGER(INTG),
INTENT(OUT) :: ERR
4364 INTEGER(INTG) :: component_idx, derivative_idx
4365 INTEGER(INTG) :: local_number1, local_number2, tmp1
4367 INTEGER(INTG),
ALLOCATABLE:: array1(:), array2(:)
4370 enters(
"FIELD_IO_COMPARE_INFO_SET_DERIVATIVES",err,error,*999)
4375 DO component_idx=1, set1%NUMBER_OF_COMPONENTS
4377 domain_nodes1=>set1%COMPONENTS(component_idx)%PTR%DOMAIN%TOPOLOGY%NODES
4379 DO local_number1=1,domain_nodes1%NUMBER_OF_NODES
4380 IF( domain_nodes1%NODES(local_number1)%GLOBAL_NUMBER == global_number1 )
THEN 4386 IF( .NOT. found )
THEN 4391 domain_nodes2=>set2%COMPONENTS(component_idx)%PTR%DOMAIN%TOPOLOGY%NODES
4393 DO local_number2=1,domain_nodes2%NUMBER_OF_NODES
4394 IF( domain_nodes2%NODES(local_number2)%GLOBAL_NUMBER == global_number2 )
THEN 4400 IF( .NOT. found )
THEN 4405 IF(domain_nodes1%NODES(local_number1)%NUMBER_OF_DERIVATIVES&
4406 &==domain_nodes2%NODES(local_number2)%NUMBER_OF_DERIVATIVES)
THEN 4407 ALLOCATE(array1(domain_nodes1%NODES(local_number1)%NUMBER_OF_DERIVATIVES),stat=err)
4408 IF(err/=0)
CALL flagerror(
"Could not allocate temporary buffer in IO sorting",err,error,*999)
4410 ALLOCATE(array2(domain_nodes1%NODES(local_number2)%NUMBER_OF_DERIVATIVES),stat=err)
4411 IF(err/=0)
CALL flagerror(
"Could not allocate temporary buffer in IO sorting",err,error,*999)
4413 array1(1:domain_nodes1%NODES(local_number1)%NUMBER_OF_DERIVATIVES)=0
4414 array2(1:domain_nodes1%NODES(local_number2)%NUMBER_OF_DERIVATIVES)=0
4416 DO derivative_idx=1,domain_nodes1%NODES(local_number1)%NUMBER_OF_DERIVATIVES
4417 array1(derivative_idx)=domain_nodes1%NODES(local_number1)%DERIVATIVES(derivative_idx)%PARTIAL_DERIVATIVE_INDEX
4419 DO derivative_idx=1,domain_nodes1%NODES(local_number2)%NUMBER_OF_DERIVATIVES
4420 array2(derivative_idx)=domain_nodes1%NODES(local_number2)%DERIVATIVES(derivative_idx)%PARTIAL_DERIVATIVE_INDEX
4425 tmp1=sum(array1-array2)
4438 IF(set1%COMPONENT_VERSIONS(component_idx)/=set2%COMPONENT_VERSIONS(component_idx))
THEN 4444 exits(
"FIELD_IO_COMPARE_INFO_SET_DERIVATIVES")
4446 999 errorsexits(
"FIELD_IO_COMPARE_INFO_SET_DERIVATIVES",err,error)
4459 INTEGER(INTG),
INTENT(IN):: my_computational_node_number
4460 INTEGER(INTG),
INTENT(OUT) :: ERR
4464 INTEGER(INTG) :: global_number1, global_number2
4465 INTEGER(INTG) :: nn1, nn2
4466 LOGICAL :: SAME_NODAL_INFO
4469 enters(
"FIELD_IO_NODAL_INFO_SET_SORT",err,error,*999)
4471 IF(.NOT.
ALLOCATED(nodal_info_set%LIST_OF_GLOBAL_NUMBER))
THEN 4472 CALL flagerror(
"list of global numbering in the input data is invalid",err,error,*999)
4474 IF(.NOT.
ALLOCATED(nodal_info_set%COMPONENT_INFO_SET))
THEN 4475 CALL flagerror(
"nodal information set in the input data is invalid",err,error,*999)
4481 DO WHILE(nn1<nodal_info_set%NUMBER_OF_ENTRIES)
4483 global_number1=nodal_info_set%LIST_OF_GLOBAL_NUMBER(nn1)
4484 DO nn2=nn1+1,nodal_info_set%NUMBER_OF_ENTRIES
4485 global_number2=nodal_info_set%LIST_OF_GLOBAL_NUMBER(nn2)
4488 & nodal_info_set%COMPONENT_INFO_SET( nn2 )%PTR )
4491 IF( same_nodal_info )
THEN 4493 & nodal_info_set%COMPONENT_INFO_SET(nn2)%PTR, my_computational_node_number, global_number1, global_number2, &
4494 & same_nodal_info, err, error, *999 )
4498 IF(same_nodal_info)
THEN 4499 tmpinfoset => nodal_info_set%COMPONENT_INFO_SET(nn2)%PTR
4500 nodal_info_set%COMPONENT_INFO_SET(nn2)%PTR => nodal_info_set%COMPONENT_INFO_SET(nn1+1)%PTR
4501 nodal_info_set%COMPONENT_INFO_SET(nn1+1)%PTR => tmpinfoset
4503 nodal_info_set%COMPONENT_INFO_SET(nn2)%PTR%SAME_HEADER=.false.
4504 nodal_info_set%COMPONENT_INFO_SET(nn1+1)%PTR%SAME_HEADER=.true.
4507 nodal_info_set%LIST_OF_GLOBAL_NUMBER(nn2)=nodal_info_set%LIST_OF_GLOBAL_NUMBER(nn1+1)
4508 nodal_info_set%LIST_OF_GLOBAL_NUMBER(nn1+1)=global_number2
4564 exits(
"FIELD_IO_NODAL_INFO_SET_SORT")
4566 999 errorsexits(
"FIELD_IO_NODAL_INFO_SET_SORT",err,error)
4577 INTEGER(INTG),
INTENT(IN) :: NUMBER_DERIVATIVES
4578 INTEGER(INTG),
INTENT(IN) :: GROUP_DERIVATIVES(number_derivatives)
4579 INTEGER(INTG),
INTENT(IN) :: LABEL_TYPE
4580 INTEGER(INTG),
INTENT(OUT) :: ERR
4584 INTEGER(INTG) :: dev_idx
4586 enters(
"FIELD_IO_LABEL_DERIVATIVE_INFO_GET",err,error,*999)
4588 IF(number_derivatives==0)
THEN 4589 CALL flagerror(
"number of derivatives in the input data is zero",err,error,*999)
4592 CALL flagerror(
"label type in the input data is not derivative label",err,error,*999)
4595 IF((number_derivatives==1).AND.group_derivatives(1)==
no_part_deriv)
THEN 4596 field_io_label_derivative_info_get=
" " 4598 field_io_label_derivative_info_get=
"(" 4599 DO dev_idx=1,number_derivatives
4600 SELECT CASE(group_derivatives(dev_idx))
4602 field_io_label_derivative_info_get=field_io_label_derivative_info_get
4604 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d/ds1" 4606 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds1ds1" 4608 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d/ds2" 4610 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds2ds2" 4612 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d/ds3" 4614 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds3ds3" 4616 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds3ds3" 4618 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds1ds3" 4620 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds2ds3" 4622 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d3/ds1ds2ds3" 4624 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d/ds4" 4626 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds4ds4" 4628 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds1ds4" 4630 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds2ds4" 4632 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d2/ds3ds4" 4634 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d3/ds1ds2ds4" 4636 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d3/ds1ds3ds4" 4638 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d3/ds2ds3ds4" 4640 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d3/ds1ds4ds4" 4642 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d3/ds2ds4ds4" 4644 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d3/ds3ds4ds4" 4646 field_io_label_derivative_info_get=field_io_label_derivative_info_get//
", d3/ds4ds4ds4" 4648 field_io_label_derivative_info_get=
"real, add more details later, #Components=" 4654 exits(
"FIELD_IO_LABEL_DERIVATIVE_INFO_GET")
4656 999 errorsexits(
"FIELD_IO_LABEL_DERIVATIVE_INFO_GET",err,error)
4667 INTEGER(INTG),
INTENT(OUT) :: ERR
4673 enters(
"FIELD_IO_GET_FIELD_INFO_LABEL",err,error,*999)
4675 IF(.NOT.
ASSOCIATED(field))
THEN 4676 CALL flagerror(
"field pointer in the input data is invalid",err,error,*999)
4680 SELECT CASE(field%TYPE)
4681 CASE(field_geometric_type)
4682 field_io_get_field_info_label=
"field geometric type" 4683 CASE(field_fibre_type)
4684 field_io_get_field_info_label=
"field fibres type" 4685 CASE(field_general_type)
4686 field_io_get_field_info_label=
"field general type" 4687 CASE(field_material_type)
4688 field_io_get_field_info_label=
"field material type" 4689 CASE(field_geometric_general_type)
4690 field_io_get_field_info_label=
"field geometric general type" 4692 field_io_get_field_info_label=
"unknown field type" 4695 exits(
"FIELD_IO_GET_FIELD_INFO_LABEL")
4697 999 errorsexits(
"FIELD_IO_GET_FIELD_INFO_LABEL",err,error)
4707 INTEGER(INTG),
INTENT(OUT) :: ERR
4715 enters(
"FIELD_IO_GET_VARIABLE_INFO_LABEL",err,error,*999)
4717 IF(.NOT.
ASSOCIATED(component))
THEN 4718 CALL flagerror(
"component pointer in the input data is invalid",err,error,*999)
4722 field=>component%FIELD_VARIABLE%FIELD
4723 variable=>component%FIELD_VARIABLE
4725 SELECT CASE(field%TYPE)
4726 CASE(field_geometric_type)
4727 SELECT CASE(variable%VARIABLE_TYPE)
4728 CASE(field_u_variable_type)
4730 NULLIFY(coordinate_system)
4731 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
4732 SELECT CASE(coordinate_system%TYPE)
4734 field_io_get_variable_info_label=
"coordinates, coordinate, rectangular cartesian" 4740 field_io_get_variable_info_label=
"unknown" 4742 CASE(field_deludeln_variable_type)
4743 field_io_get_variable_info_label=
"Normal_derivative, field, normal derivative of variable" 4744 CASE(field_deludelt_variable_type)
4745 field_io_get_variable_info_label=
"first_time_derivative, field, first time derivative of variable" 4746 CASE(field_del2udelt2_variable_type)
4747 field_io_get_variable_info_label=
"second_time_derivative, field, second time derivative of variable" 4749 field_io_get_variable_info_label=
"unknown_geometry, field, real" 4751 CASE(field_fibre_type)
4752 SELECT CASE(variable%VARIABLE_TYPE)
4753 CASE(field_u_variable_type)
4756 field_io_get_variable_info_label=
"fibres, anatomical, fibre" 4758 CASE(field_deludeln_variable_type)
4759 field_io_get_variable_info_label=
"norm_der_fiber, normal derivative of variable" 4760 CASE(field_deludelt_variable_type)
4761 field_io_get_variable_info_label=
"first_time_fiber, first time derivative of variable" 4762 CASE(field_del2udelt2_variable_type)
4763 field_io_get_variable_info_label=
"second_time_fiber, second time derivative of variable" 4765 field_io_get_variable_info_label=
"unknown_fiber, real" 4767 CASE(field_general_type)
4768 SELECT CASE(variable%VARIABLE_TYPE)
4769 CASE(field_u_variable_type)
4772 field_io_get_variable_info_label=
"general, field, rectangular cartesian" 4774 CASE(field_deludeln_variable_type)
4775 field_io_get_variable_info_label=
"norm_dev_variable, field, string" 4776 CASE(field_deludelt_variable_type)
4777 field_io_get_variable_info_label=
"first_time_variable, field, first time derivative of variable" 4778 CASE(field_del2udelt2_variable_type)
4779 field_io_get_variable_info_label=
"second_time_variable, field, second time derivative of variable" 4781 field_io_get_variable_info_label=
"unknown_general, field, real" 4783 CASE(field_material_type)
4784 SELECT CASE(variable%VARIABLE_TYPE)
4785 CASE(field_u_variable_type)
4788 field_io_get_variable_info_label=
"material, field, rectangular cartesian" 4790 CASE(field_deludeln_variable_type)
4791 field_io_get_variable_info_label=
"normal_material, field, normal derivative of variable" 4792 CASE(field_deludelt_variable_type)
4793 field_io_get_variable_info_label=
"fist_time_material, field, first time derivative of variable" 4794 CASE(field_del2udelt2_variable_type)
4795 field_io_get_variable_info_label=
"second_time_material, field, second time derivative of variable" 4797 field_io_get_variable_info_label=
"unknown material, field, real" 4799 CASE(field_geometric_general_type)
4800 SELECT CASE(variable%VARIABLE_TYPE)
4801 CASE(field_u_variable_type)
4804 field_io_get_variable_info_label=
"geometric general, field, rectangular cartesian" 4806 CASE(field_deludeln_variable_type)
4807 field_io_get_variable_info_label=
"norm_dev_variable, field, string" 4808 CASE(field_deludelt_variable_type)
4809 field_io_get_variable_info_label=
"first_time_variable, field, first time derivative of variable" 4810 CASE(field_del2udelt2_variable_type)
4811 field_io_get_variable_info_label=
"second_time_variable, field, second time derivative of variable" 4813 field_io_get_variable_info_label=
"unknown_general, field, real" 4816 SELECT CASE(variable%VARIABLE_TYPE)
4817 CASE(field_u_variable_type)
4818 field_io_get_variable_info_label=
"unknown, field, unknown standand variable type" 4819 CASE(field_deludeln_variable_type)
4820 field_io_get_variable_info_label=
"unknown, field, unknown normal derivative of variable" 4821 CASE(field_deludelt_variable_type)
4822 field_io_get_variable_info_label=
"unknown, field, unknown first time derivative of variable" 4823 CASE(field_del2udelt2_variable_type)
4824 field_io_get_variable_info_label=
"unknown, field, unknown second time derivative of variable" 4826 field_io_get_variable_info_label=
"unknown, field, real" 4830 exits(
"FIELD_IO_GET_VARIABLE_INFO_LABEL")
4832 999 errorsexits(
"FIELD_IO_GET_VARIABLE_INFO_LABEL",err,error)
4842 INTEGER(INTG),
INTENT(OUT) :: ERR
4850 enters(
"FIELD_IO_GET_COMPONENT_INFO_LABEL",err,error,*999)
4852 IF(.NOT.
ASSOCIATED(component))
THEN 4853 CALL flagerror(
"component pointer in the input data is invalid",err,error,*999)
4857 field=>component%FIELD_VARIABLE%FIELD
4858 variable=>component%FIELD_VARIABLE
4860 SELECT CASE(field%TYPE)
4861 CASE(field_geometric_type)
4862 SELECT CASE(variable%VARIABLE_TYPE)
4863 CASE(field_u_variable_type)
4865 NULLIFY(coordinate_system)
4866 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
4867 SELECT CASE(coordinate_system%TYPE)
4869 IF(component%COMPONENT_NUMBER==1)
THEN 4870 field_io_get_component_info_label=
"x" 4871 ELSE IF(component%COMPONENT_NUMBER==2)
THEN 4872 field_io_get_component_info_label=
"y" 4873 ELSE IF(component%COMPONENT_NUMBER==3)
THEN 4874 field_io_get_component_info_label=
"z" 4890 exits(
"FIELD_IO_GET_COMPONENT_INFO_LABEL")
4892 999 errorsexits(
"FIELD_IO_GET_COMPONENT_INFO_LABEL",err,error)
5109 INTEGER(INTG),
INTENT(IN) :: global_number
5110 INTEGER(INTG),
INTENT(INOUT) :: MAX_NUM_OF_NODAL_DERIVATIVES
5111 INTEGER(INTG),
INTENT(IN) :: my_computational_node_number
5112 INTEGER(INTG),
INTENT(IN) :: sessionHandle
5113 INTEGER(INTG),
ALLOCATABLE,
INTENT(INOUT) :: paddingInfo(:)
5114 INTEGER(INTG),
INTENT(OUT) :: ERR
5117 INTEGER(INTG) :: i, LENGTH
5118 CHARACTER(LEN=MAXSTRLEN) :: fvar_name
5119 CHARACTER(LEN=1, KIND=C_CHAR) :: cvar_name(
maxstrlen+1)
5125 INTEGER(INTG),
ALLOCATABLE,
TARGET :: GROUP_FIELDS(:), GROUP_VARIABLES(:), GROUP_DERIVATIVES(:)
5126 INTEGER(INTG) :: NUM_OF_FIELDS, NUM_OF_VARIABLES, NUM_OF_NODAL_DEV
5127 INTEGER(INTG) :: local_number
5128 INTEGER(INTG) :: field_idx, comp_idx, comp_idx1, value_idx, var_idx, global_var_idx ,derivative_idx
5131 enters(
"FIELD_IO_EXPORT_NODAL_GROUP_HEADER_FORTRAN",err,error,*999)
5145 max_num_of_nodal_derivatives=0
5147 NULLIFY(variable_ptr)
5148 DO comp_idx=1,fieldinfoset%NUMBER_OF_COMPONENTS
5150 IF (.NOT.
ASSOCIATED(field_ptr,
TARGET=fieldinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE%FIELD))
THEN 5151 num_of_fields=num_of_fields+1
5152 field_ptr=>fieldinfoset%COMPONENTS (comp_idx)%PTR%FIELD_VARIABLE%FIELD
5156 IF (.NOT.
ASSOCIATED(variable_ptr,
TARGET=fieldinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE))
THEN 5157 num_of_variables=num_of_variables+1
5158 variable_ptr=>fieldinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE
5162 domain_nodes=>fieldinfoset%COMPONENTS(comp_idx)%PTR%DOMAIN%TOPOLOGY%NODES
5164 DO local_number=1,domain_nodes%NUMBER_OF_NODES
5165 IF( domain_nodes%NODES(local_number)%GLOBAL_NUMBER == global_number )
THEN 5171 IF( .NOT. found )
THEN 5176 max_num_of_nodal_derivatives=max(domain_nodes%NODES(local_number)%NUMBER_OF_DERIVATIVES,max_num_of_nodal_derivatives)
5180 ALLOCATE(group_fields(num_of_fields),stat=err)
5181 IF(err/=0)
CALL flagerror(
"Could not allocate temporary field buffer in IO",err,error,*999)
5183 ALLOCATE(group_variables(num_of_variables),stat=err)
5184 IF(err/=0)
CALL flagerror(
"Could not allocate temporary variable buffer in IO",err,error,*999)
5186 ALLOCATE(group_derivatives(max_num_of_nodal_derivatives),stat=err)
5187 IF(err/=0)
CALL flagerror(
"Could not allocate temporary derivatives buffer in IO",err,error,*999)
5193 NULLIFY(variable_ptr)
5195 group_variables(:)=0
5196 DO comp_idx=1,fieldinfoset%NUMBER_OF_COMPONENTS
5198 IF((.NOT.
ASSOCIATED(field_ptr,
TARGET=fieldinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE%FIELD)).AND. &
5199 & (.NOT.
ASSOCIATED(variable_ptr,
TARGET=fieldinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE)))
THEN 5200 num_of_fields=num_of_fields+1
5201 field_ptr=>fieldinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE%FIELD
5204 IF(.NOT.
ASSOCIATED(variable_ptr,
TARGET=fieldinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE))
THEN 5206 group_fields(num_of_fields)=group_fields(num_of_fields)+1
5208 num_of_variables=num_of_variables+1
5209 variable_ptr=>fieldinfoset%COMPONENTS(comp_idx)%PTR%FIELD_VARIABLE
5212 group_variables(num_of_variables)=group_variables(num_of_variables)+1
5224 CALL reallocate( paddinginfo, fieldinfoset%NUMBER_OF_COMPONENTS + 1,
"Cannot allocate padding info", err, error, *999 )
5228 CALL flagerror(
"File write error during field export", err, error,*999 )
5231 DO field_idx=1, num_of_fields
5232 DO var_idx=1, group_fields(field_idx)
5233 global_var_idx=global_var_idx+1
5235 variable_ptr=>fieldinfoset%COMPONENTS(comp_idx1)%PTR%FIELD_VARIABLE
5238 fvar_name =
char(variable_ptr%variable_label)
5241 cvar_name(i)=fvar_name(i:i)
5243 cvar_name(length+1)=c_null_char
5245 IF( variable_ptr%FIELD%TYPE == field_geometric_type .AND. &
5246 & variable_ptr%VARIABLE_TYPE == field_u_variable_type )
THEN 5247 NULLIFY(coordinate_system)
5248 CALL field_coordinate_system_get(variable_ptr%FIELD,coordinate_system,err,error,*999)
5250 & coordinate_system%TYPE, variable_ptr%NUMBER_OF_COMPONENTS )
5252 err =
fieldexport_variable( sessionhandle, cvar_name, global_var_idx, variable_ptr%FIELD%TYPE, &
5253 & variable_ptr%VARIABLE_TYPE, &
5254 & variable_ptr%NUMBER_OF_COMPONENTS )
5257 CALL flagerror(
"File write error during field export", err, error,*999 )
5260 DO comp_idx=1, variable_ptr%NUMBER_OF_COMPONENTS
5263 fieldcomponent => variable_ptr%COMPONENTS(comp_idx)
5265 IF( comp_idx1 <= fieldinfoset%NUMBER_OF_COMPONENTS )
THEN 5267 component => fieldinfoset%COMPONENTS(comp_idx1)%PTR
5271 IF(.NOT.
ASSOCIATED(component,
TARGET=fieldcomponent))
THEN 5272 paddinginfo(comp_idx1) = paddinginfo(comp_idx1) + 1
5274 IF( fieldcomponent%FIELD_VARIABLE%FIELD%TYPE == field_geometric_type .AND. &
5275 & fieldcomponent%FIELD_VARIABLE%VARIABLE_TYPE == field_u_variable_type )
THEN 5276 NULLIFY(coordinate_system)
5277 CALL field_coordinate_system_get(variable_ptr%FIELD,coordinate_system,err,error,*999)
5278 err = fieldexport_coordinatederivativeindices( sessionhandle, fieldcomponent%COMPONENT_NUMBER, &
5279 & coordinate_system%TYPE, 1, c_loc(group_derivatives), value_idx )
5281 err = fieldexport_derivativeindices( sessionhandle, fieldcomponent%COMPONENT_NUMBER, &
5282 & variable_ptr%FIELD%TYPE, &
5283 & variable_ptr%VARIABLE_TYPE, 1, c_loc(group_derivatives), value_idx )
5286 value_idx = value_idx + 1
5288 err = fieldexport_endcomponent( sessionhandle )
5293 domain_nodes=>component%DOMAIN%TOPOLOGY%NODES
5296 DO local_number=1,domain_nodes%NUMBER_OF_NODES
5297 IF( domain_nodes%NODES(local_number)%GLOBAL_NUMBER == global_number )
THEN 5303 IF( .NOT. found )
THEN 5304 err = fieldexport_endcomponent( sessionhandle )
5309 num_of_nodal_dev=domain_nodes%NODES(local_number)%NUMBER_OF_DERIVATIVES
5310 DO derivative_idx=1,num_of_nodal_dev
5311 group_derivatives(derivative_idx)=domain_nodes%NODES(local_number)%DERIVATIVES(derivative_idx)% &
5315 CALL list_sort(group_derivatives(1:num_of_nodal_dev),err,error,*999)
5317 IF( component%FIELD_VARIABLE%FIELD%TYPE == field_geometric_type .AND. &
5318 & component%FIELD_VARIABLE%VARIABLE_TYPE == field_u_variable_type )
THEN 5319 NULLIFY(coordinate_system)
5320 CALL field_coordinate_system_get(variable_ptr%FIELD,coordinate_system,err,error,*999)
5321 err = fieldexport_coordinatederivativeindices( sessionhandle, component%COMPONENT_NUMBER, &
5322 & coordinate_system%TYPE, num_of_nodal_dev, c_loc(group_derivatives), value_idx )
5324 err = fieldexport_derivativeindices( sessionhandle, component%COMPONENT_NUMBER, &
5325 & variable_ptr%FIELD%TYPE, &
5326 & variable_ptr%VARIABLE_TYPE,num_of_nodal_dev, c_loc(group_derivatives), value_idx )
5329 err = fieldexport_versioninfo( sessionhandle, fieldinfoset%COMPONENT_VERSIONS(comp_idx1) )
5331 CALL flagerror(
"Error exporting version information.", err, error,*999 )
5333 err = fieldexport_endcomponent( sessionhandle )
5336 comp_idx1=comp_idx1+1
5338 value_idx=value_idx+num_of_nodal_dev
5348 exits(
"FIELD_IO_EXPORT_NODAL_GROUP_HEADER_FORTRAN")
5350 999 errorsexits(
"FIELD_IO_EXPORT_NODAL_GROUP_HEADER_FORTRAN",err,error)
5364 INTEGER(INTG),
INTENT(IN):: my_computational_node_number
5365 INTEGER(INTG),
INTENT(OUT) :: ERR
5371 INTEGER(INTG) :: local_number, global_number, sessionHandle, paddingCount,DERIVATIVE_INDEXES(
part_deriv_s4_s4_s4)
5372 INTEGER(INTG),
ALLOCATABLE :: paddingInfo(:)
5373 INTEGER(INTG) :: nn, comp_idx, dev_idx, version_idx, NUM_OF_NODAL_DEV, MAX_NUM_OF_NODAL_DERIVATIVES, total_nodal_values
5374 INTEGER(INTG) :: NUMBER_VERSIONS, MAX_NUMBER_VERSIONS
5375 INTEGER(INTG),
POINTER :: GEOMETRIC_PARAMETERS_INTG(:)
5377 REAL(C_DOUBLE),
ALLOCATABLE,
TARGET :: NODAL_BUFFER(:), TOTAL_NODAL_BUFFER(:)
5378 REAL(DP),
POINTER :: GEOMETRIC_PARAMETERS_DP(:)
5380 REAL(DP) :: padding(1),VALUE
5382 padding(1) = 1.23456789
5385 enters(
"FIELD_IO_EXPORT_NODES_INTO_LOCAL_FILE",err,error,*999)
5390 file_name=name//
".part"//
trim(
number_to_vstring(my_computational_node_number,
"*",err,error))//
".exnode" 5391 max_num_of_nodal_derivatives=0
5393 IF(.NOT.
ALLOCATED(nodal_info_set%COMPONENT_INFO_SET))
THEN 5394 CALL flagerror(
"the nodal information set in input is invalid",err,error,*999)
5397 IF(.NOT.
ALLOCATED(nodal_info_set%LIST_OF_GLOBAL_NUMBER))
THEN 5398 CALL flagerror(
"the nodal global information set is not associated with any numbering list",err,error,*999)
5401 IF(nodal_info_set%NUMBER_OF_ENTRIES==0)
THEN 5402 CALL flagerror(
"the nodal information set does not contain any nodes",err,error,*999)
5405 IF(nodal_info_set%COMPONENT_INFO_SET(1)%PTR%SAME_HEADER)
THEN 5406 CALL flagerror(
"the first header flag of nodal information set should be false",err,error,*999)
5411 CALL flagerror(
"Cannot open file export session", err, error,*999 )
5414 IF(
ASSOCIATED(nodal_info_set%FIELDS%REGION))
THEN 5417 IF(
ASSOCIATED(nodal_info_set%FIELDS%INTERFACE))
THEN 5420 CALL flagerror(
"Fields region or interface is not associated.",err,error,*999)
5424 CALL flagerror(
"Cannot write group name to nodes file", err, error,*999 )
5427 DO nn=1, nodal_info_set%NUMBER_OF_ENTRIES
5428 global_number=nodal_info_set%LIST_OF_GLOBAL_NUMBER(nn)
5430 IF(.NOT.nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%SAME_HEADER)
THEN 5434 & global_number, max_num_of_nodal_derivatives, my_computational_node_number, sessionhandle, &
5435 & paddinginfo, err,error,*999)
5436 max_number_versions = maxval(nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENT_VERSIONS)
5439 IF(
ALLOCATED(nodal_buffer))
THEN 5440 IF(
SIZE(nodal_buffer)<max_num_of_nodal_derivatives*max_number_versions)
THEN 5441 CALL reallocate( nodal_buffer, max_num_of_nodal_derivatives*max_number_versions, &
5442 &
"Could not allocate temporary nodal buffer in IO writing", err, error, *999 )
5445 CALL reallocate( nodal_buffer, max_num_of_nodal_derivatives*max_number_versions, &
5446 &
"Could not allocate temporary nodal buffer in IO writing", err, error, *999 )
5451 total_nodal_values = 0
5453 DO comp_idx=1,nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS
5454 component => nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENTS(comp_idx)%PTR
5455 number_versions = nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENT_VERSIONS(comp_idx)
5456 domain_nodes=>component%DOMAIN%TOPOLOGY%NODES
5458 DO local_number=1,domain_nodes%NUMBER_OF_NODES
5459 IF( domain_nodes%NODES(local_number)%GLOBAL_NUMBER == global_number )
THEN 5465 IF(.NOT. found)
THEN 5469 DO paddingcount = 1, paddinginfo( comp_idx )
5470 num_of_nodal_dev = 1
5471 nodal_buffer(1) = padding(1)
5473 CALL grow_array( total_nodal_buffer, num_of_nodal_dev,
"Insufficient memory during I/O", err, error, *999 )
5474 total_nodal_buffer(total_nodal_values+1:total_nodal_values+num_of_nodal_dev) = nodal_buffer(1:num_of_nodal_dev)
5475 total_nodal_values = total_nodal_values + num_of_nodal_dev
5477 err = fieldexport_nodevalues( sessionhandle, domain_nodes%NODES(local_number)%USER_NUMBER, num_of_nodal_dev, &
5478 & c_loc(nodal_buffer) )
5480 CALL flagerror(
"Cannot write group name to nodes file", err, error,*999 )
5485 SELECT CASE(component%FIELD_VARIABLE%DATA_TYPE)
5486 CASE(field_intg_type)
5487 NULLIFY(geometric_parameters_intg)
5488 CALL field_parameter_set_data_get(component%FIELD_VARIABLE%FIELD,component%FIELD_VARIABLE%VARIABLE_TYPE, &
5489 & field_values_set_type,geometric_parameters_intg,err,error,*999)
5491 NULLIFY(geometric_parameters_dp)
5492 CALL field_parameter_set_data_get(component%FIELD_VARIABLE%FIELD,component%FIELD_VARIABLE%VARIABLE_TYPE, &
5493 & field_values_set_type,geometric_parameters_dp,err,error,*999)
5495 CALL flagerror(
"Not implemented.",err,error,*999)
5498 num_of_nodal_dev=domain_nodes%NODES(local_number)%NUMBER_OF_DERIVATIVES
5501 derivative_indexes = -1
5502 DO dev_idx=1, num_of_nodal_dev
5503 derivative_indexes( domain_nodes%NODES(local_number)%DERIVATIVES(dev_idx)%PARTIAL_DERIVATIVE_INDEX ) = dev_idx
5508 num_of_nodal_dev = 0
5509 DO version_idx=1, number_versions
5510 DO dev_idx=1,
SIZE(derivative_indexes)
5511 IF( derivative_indexes( dev_idx ) == -1 )
THEN 5515 num_of_nodal_dev = num_of_nodal_dev + 1
5517 SELECT CASE(component%FIELD_VARIABLE%DATA_TYPE)
5518 CASE(field_intg_type)
5519 IF(component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(local_number)% &
5520 & derivatives(derivative_indexes(dev_idx))%NUMBER_OF_VERSIONS < version_idx)
THEN 5523 VALUE=
REAL(GEOMETRIC_PARAMETERS_INTG( COMPONENT%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(local_number)% &
& DERIVATIVES(DERIVATIVE_INDEXES(dev_idx))%VERSIONS(1) ) ,DP)
5525 VALUE=
REAL(GEOMETRIC_PARAMETERS_INTG( COMPONENT%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(local_number)% &
& DERIVATIVES(DERIVATIVE_INDEXES(dev_idx))%VERSIONS(version_idx) ) ,DP)
5529 IF(component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(local_number)% &
5530 & derivatives(derivative_indexes(dev_idx))%NUMBER_OF_VERSIONS < version_idx)
THEN 5531 VALUE=geometric_parameters_dp( component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(local_number)% &
5532 & derivatives(derivative_indexes(dev_idx))%VERSIONS(1) )
5534 VALUE=geometric_parameters_dp( component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(local_number)% &
5535 & derivatives(derivative_indexes(dev_idx))%VERSIONS(version_idx) )
5538 CALL flagerror(
"Not implemented.",err,error,*999)
5540 nodal_buffer( num_of_nodal_dev ) =
VALUE 5544 CALL grow_array( total_nodal_buffer, num_of_nodal_dev,
"Insufficient memory during I/O", err, error, *999 )
5545 total_nodal_buffer(total_nodal_values+1:total_nodal_values+num_of_nodal_dev) = nodal_buffer(1:num_of_nodal_dev)
5546 total_nodal_values = total_nodal_values + num_of_nodal_dev
5549 err = fieldexport_nodevalues( sessionhandle, domain_nodes%NODES(local_number)%USER_NUMBER, num_of_nodal_dev, &
5550 & c_loc(nodal_buffer) )
5552 CALL flagerror(
"Cannot write group name to nodes file", err, error,*999 )
5557 DO paddingcount = 1, paddinginfo( nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS + 1 )
5558 num_of_nodal_dev = 1
5559 nodal_buffer(1) = padding(1)
5561 CALL grow_array( total_nodal_buffer, num_of_nodal_dev,
"Insufficient memory during I/O", err, error, *999 )
5562 total_nodal_buffer(total_nodal_values+1:total_nodal_values+num_of_nodal_dev) = nodal_buffer(1:num_of_nodal_dev)
5563 total_nodal_values = total_nodal_values + num_of_nodal_dev
5565 err = fieldexport_nodevalues( sessionhandle, domain_nodes%NODES(local_number)%USER_NUMBER, num_of_nodal_dev, &
5566 & c_loc(nodal_buffer) )
5568 CALL flagerror(
"Cannot write group name to nodes file", err, error,*999 )
5584 CALL flagerror(
"Cannot write group name to nodes file", err, error,*999 )
5590 IF(
ASSOCIATED(geometric_parameters_dp))
NULLIFY(geometric_parameters_dp)
5591 IF(
ASSOCIATED(geometric_parameters_intg))
NULLIFY(geometric_parameters_intg)
5593 exits(
"FIELD_IO_EXPORT_NODES_INTO_LOCAL_FILE")
5595 999 errorsexits(
"FIELD_IO_EXPORT_NODES_INTO_LOCAL_FILE",err,error)
5608 INTEGER(INTG),
INTENT(IN) :: FILE_ID
5609 LOGICAL,
INTENT(INOUT) :: FILE_END
5610 INTEGER(INTG),
INTENT(OUT) :: ERR
5613 CHARACTER (LEN=MAXSTRLEN) :: TEMP_STR
5614 INTEGER(INTG) :: LEN_OF_DATA, IOS
5616 string_data=
remove(string_data, 1,
len(string_data))
5618 enters(
"FIELD_IO_FORTRAN_FILE_READ_STRING", err, error, *999)
5620 READ(file_id,
"(A)", iostat=ios) temp_str
5628 string_data=
trim(temp_str)
5629 len_of_data=
len(string_data)
5631 IF(len_of_data==0)
THEN 5632 CALL flagerror(
"leng of string is zero",err,error,*999)
5635 exits(
"FIELD_IO_FORTRAN_FILE_READ_STRING")
5637 999 errorsexits(
"FIELD_IO_FORTRAN_FILE_READ_STRING",err,error)
5639 exits(
"FIELD_IO_FORTRAN_FILE_READ_STRING")
5652 REAL(DP),
INTENT(OUT) :: REAL_DATA(:)
5653 INTEGER(INTG),
INTENT(IN) :: FILE_ID
5654 INTEGER(INTG),
INTENT(IN) :: LEN_OF_DATA
5655 LOGICAL,
INTENT(INOUT) :: FILE_END
5656 INTEGER(INTG),
INTENT(OUT) :: ERR
5660 INTEGER(INTG) :: IOS
5662 enters(
"FIELD_IO_FORTRAN_FILE_READ_DP",err,error,*999)
5665 READ(file_id,
char(dp_fmt), iostat=ios) real_data(1:len_of_data)
5673 exits(
"FIELD_IO_FORTRAN_FILE_READ_DP")
5675 999 errorsexits(
"FIELD_IO_FORTRAN_FILE_READ_DP",err,error)
5687 REAL(DP),
INTENT(IN) :: REAL_DATA(:)
5688 INTEGER(INTG),
INTENT(IN) :: FILE_ID
5689 INTEGER(INTG),
INTENT(IN) :: LEN_OF_DATA
5690 INTEGER(INTG),
INTENT(OUT) :: ERR
5694 enters(
"FIELD_IO_FORTRAN_FILE_WRITE_DP",err,error,*999)
5698 WRITE(file_id,*) real_data(1:len_of_data)
5700 exits(
"FIELD_IO_FORTRAN_FILE_WRITE_DP")
5702 999 errorsexits(
"FIELD_IO_FORTRAN_FILE_WRITE_DP",err,error)
5714 INTEGER(INTG),
INTENT(OUT) :: INTG_DATA(:)
5715 INTEGER(INTG),
INTENT(IN) :: FILE_ID
5716 INTEGER(INTG),
INTENT(IN) :: LEN_OF_DATA
5717 INTEGER(INTG),
INTENT(OUT) :: ERR
5722 enters(
"FIELD_IO_FORTRAN_FILE_READ_INTG",err,error,*999)
5725 READ(file_id,
char(dp_fmt)) intg_data(1:len_of_data)
5727 exits(
"FIELD_IO_FORTRAN_FILE_READ_INTG")
5729 999 errorsexits(
"FIELD_IO_FORTRAN_FILE_READ_INTG",err,error)
5741 INTEGER(INTG),
INTENT(IN) :: INTG_DATA(:)
5742 INTEGER(INTG),
INTENT(IN) :: FILE_ID
5743 INTEGER(INTG),
INTENT(IN) :: LEN_OF_DATA
5744 INTEGER(INTG),
INTENT(OUT) :: ERR
5749 enters(
"FIELD_IO_FORTRAN_FILE_WRITE_INTG",err,error,*999)
5752 WRITE(file_id,
char(dp_fmt)) intg_data(1:len_of_data)
5754 exits(
"FIELD_IO_FORTRAN_FILE_WRITE_INTG")
5756 999 errorsexits(
"FIELD_IO_FORTRAN_FILE_WRITE_INTG",err,error)
5770 INTEGER(INTG),
INTENT(INOUT) :: FILE_ID
5771 INTEGER(INTG),
INTENT(OUT) :: ERR
5775 enters(
"FIELD_IO_FORTRAN_FILE_OPEN",err,error,*999)
5779 OPEN(unit=file_id, file=
char(file_name), status=
char(file_status), form=
"FORMATTED", err=999)
5782 exits(
"FIELD_IO_FORTRAN_FILE_OPEN")
5784 999 errorsexits(
"FIELD_IO_FORTRAN_FILE_OPEN",err,error)
5795 INTEGER(INTG),
INTENT(INOUT) :: FILE_ID
5796 INTEGER(INTG),
INTENT(OUT) :: ERR
5800 enters(
"FIELD_IO_FORTRAN_FILE_CLOSE",err,error,*999)
5804 CLOSE(unit=file_id, err=999)
5806 exits(
"FIELD_IO_FORTRAN_FILE_CLOSE")
5808 999 errorsexits(
"FIELD_IO_FORTRAN_FILE_CLOSE",err,error)
5822 INTEGER(INTG),
INTENT(INOUT) :: INTG_DATA(:)
5823 INTEGER(INTG),
INTENT(IN) :: NUMBER_OF_INTEGERS
5824 INTEGER(INTG),
INTENT(OUT) :: ERR
5828 INTEGER(INTG) :: idx, pos
5830 enters(
"STRING_TO_MUTI_INTEGERS_VS",err,error,*999)
5836 DO idx=1,number_of_integers-1
5837 local_string=
adjustl(local_string)
5838 local_string=
trim(local_string)
5839 pos=
index(local_string,
" ")
5840 local_string1=
extract(local_string, 1, pos-1)
5842 local_string=
remove(local_string,1,pos)
5844 local_string=
adjustl(local_string)
5845 local_string=
trim(local_string)
5848 exits(
"STRING_TO_MUTI_INTEGERS_VS")
5850 999 errorsexits(
"STRING_TO_MUTI_INTEGERS_VS",err,error)
5864 REAL(DP),
INTENT(INOUT) :: REAL_DATA(:)
5865 INTEGER(INTG),
INTENT(IN) :: NUMBER_OF_REALS
5866 INTEGER(INTG),
INTENT(IN) :: POSITION
5867 INTEGER(INTG),
INTENT(OUT) :: ERR
5872 INTEGER(INTG) :: idx, pos
5874 enters(
"STRING_TO_MUTI_REALS_VS",err,error,*999)
5880 DO idx=1,number_of_reals-1
5881 local_string=
adjustl(local_string)
5882 local_string=
trim(local_string)
5883 pos=
index(local_string,
" ")
5884 local_string1=
extract(local_string, 1, pos-1)
5888 local_string=
remove(local_string,1,pos)
5890 local_string=
adjustl(local_string)
5891 local_string=
trim(local_string)
5897 exits(
"STRING_TO_MUTI_REALS_VS")
5899 999 errorsexits(
"STRING_TO_MUTI_REALS_VS",err,error)
5913 INTEGER(INTG),
INTENT(IN):: my_computational_node_number
5914 INTEGER(INTG),
INTENT(OUT):: ERR
5918 LOGICAL :: ININTERFACE,INREGION
5922 INTEGER(INTG) :: field_idx, var_idx, component_idx, deriv_idx, np, nn, num_field
5923 INTEGER(INTG) :: MAX_NUMBER_VERSIONS
5924 LOGICAL :: foundNewNode
5927 enters(
"FieldIO_NodelInfoSetAttachLocalProcess",err,error,*999)
5932 IF(
ASSOCIATED(fields%REGION))
THEN 5935 IF(
ASSOCIATED(fields%INTERFACE))
THEN 5938 CALL flagerror(
"Fields is not associated with a region or interface.",err,error,*999)
5944 DO num_field =1, fields%NUMBER_OF_FIELDS
5945 IF(.NOT.
ASSOCIATED(fields%FIELDS(num_field)%PTR))
THEN 5947 &
" field handle in fields list is invalid" 5948 CALL flagerror(local_error,err,error,*999)
5951 IF( num_field == 1 )
THEN 5955 IF(fields%FIELDS(num_field-1)%PTR%REGION%USER_NUMBER/=fields%FIELDS(num_field)%PTR%REGION%USER_NUMBER)
THEN 5958 CALL flagerror(local_error,err,error,*999)
5963 DO num_field =1, fields%NUMBER_OF_FIELDS
5964 IF(.NOT.
ASSOCIATED(fields%FIELDS(num_field)%PTR))
THEN 5966 &
" field handle in fields list is invalid" 5967 CALL flagerror(local_error,err,error,*999)
5970 IF( num_field == 1 )
THEN 5974 IF(fields%FIELDS(num_field-1)%PTR%INTERFACE%USER_NUMBER/= &
5975 & fields%FIELDS(num_field)%PTR%INTERFACE%USER_NUMBER)
THEN 5978 CALL flagerror(local_error,err,error,*999)
5996 nodal_info_set%FIELDS=>fields
6001 IF( ( nodal_info_set%NUMBER_OF_ENTRIES > 0 ) .OR. &
6002 &
ALLOCATED( nodal_info_set%COMPONENT_INFO_SET ) )
THEN 6003 CALL flagerror(
"nodal information set is not initialized properly, call start method first",err,error,*999)
6006 DO field_idx = 1, nodal_info_set%FIELDS%NUMBER_OF_FIELDS
6007 field => nodal_info_set%FIELDS%FIELDS(field_idx)%PTR
6008 IF( .NOT.
ALLOCATED( field%VARIABLES ) )
THEN 6012 DO var_idx = 1, field%NUMBER_OF_VARIABLES
6013 field_variable => field%VARIABLES( var_idx )
6015 DO component_idx = 1, field_variable%NUMBER_OF_COMPONENTS
6016 IF( .NOT.
ASSOCIATED( field_variable%COMPONENTS( component_idx )%DOMAIN%TOPOLOGY%NODES ) )
THEN 6020 domain_nodes => field_variable%COMPONENTS( component_idx )%DOMAIN%TOPOLOGY%NODES
6025 DO np = 1, domain_nodes%NUMBER_OF_NODES
6026 foundnewnode = .true.
6027 DO nn = 1,nodal_info_set%NUMBER_OF_ENTRIES
6028 IF( nodal_info_set%LIST_OF_GLOBAL_NUMBER( nn ) == domain_nodes%NODES( np )%GLOBAL_NUMBER )
THEN 6029 foundnewnode = .false.
6034 IF( foundnewnode )
THEN 6036 CALL grow_array( nodal_info_set%LIST_OF_GLOBAL_NUMBER, 1,
"Could not allocate buffer in IO", err, error, *999 )
6037 nodal_info_set%LIST_OF_GLOBAL_NUMBER(nodal_info_set%NUMBER_OF_ENTRIES+1)= domain_nodes%NODES(np)%GLOBAL_NUMBER
6038 nodal_info_set%NUMBER_OF_ENTRIES=nodal_info_set%NUMBER_OF_ENTRIES+1
6046 ALLOCATE( nodal_info_set%COMPONENT_INFO_SET( nodal_info_set%NUMBER_OF_ENTRIES ), stat = err )
6047 IF( err /= 0 )
CALL flagerror(
"Could not allocate nodal information set", err, error, *999)
6049 DO nn = 1, nodal_info_set%NUMBER_OF_ENTRIES
6050 ALLOCATE( nodal_info_set%COMPONENT_INFO_SET(nn)%PTR )
6051 nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%SAME_HEADER = .false.
6052 nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS = 0
6054 CALL checked_deallocate( nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENT_VERSIONS )
6058 DO field_idx = 1, nodal_info_set%FIELDS%NUMBER_OF_FIELDS
6059 field => nodal_info_set%FIELDS%FIELDS( field_idx )%PTR
6060 IF( .NOT.
ALLOCATED(field%VARIABLES) )
THEN 6064 DO var_idx=1, field%NUMBER_OF_VARIABLES
6065 field_variable => field%VARIABLES( var_idx )
6066 DO component_idx = 1, field_variable%NUMBER_OF_COMPONENTS
6067 IF( field_variable%COMPONENTS( component_idx )%INTERPOLATION_TYPE /= field_node_based_interpolation )
THEN 6071 IF( .NOT.
ASSOCIATED( field_variable%COMPONENTS( component_idx )%DOMAIN%TOPOLOGY%NODES ) )
THEN 6075 domain_nodes => field_variable%COMPONENTS( component_idx )%DOMAIN%TOPOLOGY%NODES
6077 DO np = 1, domain_nodes%NUMBER_OF_NODES
6078 DO nn = 1, nodal_info_set%NUMBER_OF_ENTRIES
6079 IF( nodal_info_set%LIST_OF_GLOBAL_NUMBER( nn ) == domain_nodes%NODES( np )%GLOBAL_NUMBER )
THEN 6083 max_number_versions = 1
6084 DO deriv_idx=1,domain_nodes%NODES( np )%NUMBER_OF_DERIVATIVES
6085 max_number_versions = max(max_number_versions, &
6086 & domain_nodes%NODES(np)%DERIVATIVES(deriv_idx)%numberOfVersions)
6089 CALL grow_array( nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENTS, 1, &
6090 &
"Could not allocate temporary buffer in IO", err, error, *999 )
6091 nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENTS(nodal_info_set%COMPONENT_INFO_SET(nn)%PTR &
6092 & %NUMBER_OF_COMPONENTS+1)%PTR=>field%VARIABLES( var_idx )%COMPONENTS( component_idx )
6093 nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS = &
6094 & nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS+1
6095 CALL grow_array( nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENT_VERSIONS, 1, &
6096 &
"Could not allocate temporary buffer in IO", err, error, *999 )
6097 nodal_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENT_VERSIONS( &
6098 & nodal_info_set%COMPONENT_INFO_SET(nn)%PTR &
6099 & %NUMBER_OF_COMPONENTS) = max_number_versions
6108 exits(
"FieldIO_NodelInfoSetAttachLocalProcess")
6110 999 errorsexits(
"FieldIO_NodelInfoSetAttachLocalProcess",err,error)
6122 INTEGER(INTG),
INTENT(OUT) :: ERR
6125 INTEGER(INTG) :: nn, ncomp
6127 enters(
"FIELD_IO_INFO_SET_INITIALISE",err,error,*999)
6129 IF(
ASSOCIATED(local_process_info_set%FIELDS))
THEN 6130 NULLIFY(local_process_info_set%FIELDS)
6132 IF(
ALLOCATED(local_process_info_set%COMPONENT_INFO_SET))
THEN 6133 DO nn=1, local_process_info_set%NUMBER_OF_ENTRIES
6134 IF(
ALLOCATED(local_process_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENTS))
THEN 6135 DO ncomp=1, local_process_info_set%COMPONENT_INFO_SET(nn)%PTR%NUMBER_OF_COMPONENTS
6136 NULLIFY(local_process_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENTS(ncomp)%PTR)
6138 CALL checked_deallocate( local_process_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENTS )
6139 CALL checked_deallocate( local_process_info_set%COMPONENT_INFO_SET(nn)%PTR%COMPONENT_VERSIONS )
6140 DEALLOCATE( local_process_info_set%COMPONENT_INFO_SET(nn)%PTR )
6143 DEALLOCATE(local_process_info_set%COMPONENT_INFO_SET)
6146 local_process_info_set%NUMBER_OF_ENTRIES=0
6149 exits(
"FIELD_IO_INFO_SET_INITIALISE")
6151 999 errorsexits(
"FIELD_IO_INFO_SET_INITIALISE",err,error)
6165 INTEGER(INTG),
INTENT(OUT) :: ERR
6169 INTEGER(INTG):: my_computational_node_number
6170 INTEGER(INTG):: computational_node_numbers
6172 enters(
"FIELD_IO_NODES_EXPORT", err,error,*999)
6180 IF(method==
"FORTRAN")
THEN 6187 ELSE IF(method==
"MPIIO")
THEN 6188 CALL flagerror(
"MPI IO has not been implemented yet!",err,error,*999)
6190 CALL flagerror(
"Unknown method!",err,error,*999)
6193 exits(
"FIELD_IO_NODES_EXPORT")
6195 999 errorsexits(
"FIELD_IO_NODES_EXPORT",err,error)
6215 INTEGER(INTG),
INTENT(OUT) :: ERR
6219 INTEGER(INTG):: my_computational_node_number
6220 INTEGER(INTG):: computational_node_numbers
6222 enters(
"FIELD_IO_ELEMENTS_EXPORT", err,error,*999)
6230 IF(method==
"FORTRAN")
THEN 6237 ELSE IF(method==
"MPIIO")
THEN 6238 CALL flagerror(
"MPI IO has not been implemented yet",err,error,*999)
6240 CALL flagerror(
"Unknown method!",err,error,*999)
6243 exits(
"FIELD_IO_ELEMENTS_EXPORT")
6245 999 errorsexits(
"FIELD_IO_ELEMENTS_EXPORT",err,error)
6254 This module contains all basis function routines.
Sets/changes the number of Xi directions for a basis.
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
integer(intg), parameter, public basis_xi_collapsed
The Xi direction is collapsed.
integer, parameter ptr
Pointer integer kind.
Contains information for a component of a field variable.
integer(intg), parameter, public basis_quadratic_lagrange_interpolation
Quadratic Lagrange interpolation specification.
This module contains all coordinate transformation and support routines.
integer(intg), parameter field_io_component_label
subroutine, public basis_create_finish(BASIS, ERR, ERROR,)
Finishes the creation of a new basis.
Contains information for a region.
Converts a number to its equivalent varying string representation.
contains information for parallel IO, and it is nodal base
integer(intg), parameter, public basis_quadratic2_hermite_interpolation
Quadratic Hermite (no derivative at xi=1) interpolation specification.
Contains information on the mesh decomposition.
subroutine checked_deallocate_real(array)
A buffer type to allow for an array of pointers to a FIELD_TYPE.
Sets/changes the interpolation type in each Xi direction for a basis.
subroutine field_io_export_nodes_into_local_file(NODAL_INFO_SET, NAME, my_computational_node_number, ERR, ERROR,)
Write all the nodal information from NODAL_INFO_SET to local exnode files.
integer(intg), parameter no_part_deriv
No partial derivative i.e., u.
subroutine field_io_fortran_file_write_dp(FILE_ID, REAL_DATA, LEN_OF_DATA, ERR, ERROR,)
Write a real data using FORTRAN IO.
integer(intg), parameter, public basis_collapsed_at_xi0
The Xi direction at the xi=0 end of this Xi direction is collapsed.
subroutine field_io_export_elements_into_local_file(ELEMENTAL_INFO_SET, NAME, my_computational_node_number, ERR, ERROR,)
Write all the elemental information from LOCAL_PROCESS_NODAL_INFO_SET to exelem files.
subroutine reallocate_basis(array, newSize, errorMessage, ERR, ERROR,)
integer(intg), parameter part_deriv_s4_s4_s4
Third partial derivative in the s4 direction i.e., d^3u/ds4^3.
subroutine reallocate_2d(array, newSize1, newSize2, errorMessage, ERR, ERROR,)
int fieldexport_elementgridvalues(const int handle, const int isFirstSet, const int dimensionCount, const double value)
integer(intg), parameter part_deriv_s4
First partial derivative in the s4 direction i.e., du/ds4.
subroutine reallocate_int(array, newSize, errorMessage, ERR, ERROR,)
subroutine field_io_export_element_scale_factors(sessionHandle, components, componentScales, globalNumber, myComputationalNodeNumber, ERR, ERROR,)
Contains information on the fields defined on a region.
This module contains all string manipulation and transformation routines.
int fieldexport_variable(const int handle, const int variableNumber, const int fieldType, const int variableType, const int componentCount)
subroutine reallocate_field(array, newSize, errorMessage, ERR, ERROR,)
integer(intg), parameter, public basis_quadratic_simplex_interpolation
Quadratic Simplex interpolation specification.
integer(intg), parameter part_deriv_s3_s4
Cross derivative in the s3 and s4 direction i.e., d^2u/ds3ds4.
int fieldexport_component(const int handle, const int componentNumber, const int isNodal, const int numberOfXi, const int *const interpolationXi)
Sorts a list into ascending order.
subroutine reallocate_components(array, newSize, errorMessage, ERR, ERROR,)
integer(intg), parameter, public basis_simplex_type
Simplex basis type.
integer(intg), parameter part_deriv_s2
First partial derivative in the s2 direction i.e., du/ds2.
integer(intg), parameter part_deriv_s3_s4_s4
Cross derivative in the s3, s4 and s4 direction i.e., d^3u/ds3ds4^2.
int fieldexport_elementnodeindices(const int handle, const int nodeCount, const int *const indices)
subroutine string_to_muti_reals_vs(STRING, NUMBER_OF_REALS, REAL_DATA, POSITION, ERR, ERROR,)
integer(intg), parameter part_deriv_s4_s4
Second partial derivative in the s4 direction i.e., d^2u/ds4ds4.
subroutine grow_array_components(array, delta, errorMessage, ERR, ERROR,)
Contains information for a field defined on a region.
integer(intg), parameter part_deriv_s1_s4_s4
Cross derivative in the s2, s4 and s4 direction i.e., d^3u/ds1ds4^2.
subroutine field_io_fortran_file_open(FILE_ID, FILE_NAME, FILE_STATUS, ERR, ERROR,)
Open a file using Fortran.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
Contains the information for an element in a domain.
subroutine checked_deallocate_components(array)
int fieldexport_closesession(const int handle)
integer(intg), parameter, public basis_default_quadrature_scheme
Identifier for the default quadrature scheme.
Contains information on a coordinate system.
int fieldexport_scalingfactorcount(const int handle, const int scalingFactorCount)
int fieldexport_meshdimensions(const int handle, const int dimensions, const int basisType)
integer(intg) function field_io_derivative_info(LINE, ERR, ERROR)
Get the derivative information.
A type to hold the scale factors for the appropriate mesh component of a field.
This module contains all program wide constants.
subroutine field_io_info_set_initialise(LOCAL_PROCESS_INFO_SET, ERR, ERROR,)
Initialize nodal information set.
integer(intg), parameter part_deriv_s1
First partial derivative in the s1 direction i.e., du/ds1.
Flags a warning to the user.
subroutine fieldio_translatelabelintointerpolationtype(INTERPOLATION, LABEL_TYPE, ERR, ERROR,)
Finding basis information.
type(varying_string) function field_io_get_component_info_label(COMPONENT, ERR, ERROR)
Get the field information.
Contains the topology information for the elements of a domain.
integer(intg), parameter, public basis_cubic_simplex_interpolation
Cubic Simplex interpolation specification.
subroutine field_io_compare_info_set_derivatives(SET1, SET2, my_computational_node_number, global_number1, global_number2, doesMatch, ERR, ERROR,)
integer(intg) function findmylocaldomainnumber(mapping, myComputationalNodeNumber)
integer(intg), parameter, public basis_linear_simplex_interpolation
Linear Simplex interpolation specification.
subroutine fieldio_calculatesimplexscaleandnodecounts(BASIS, num_scl, num_node, ERR, ERROR,)
Finding basis information.
subroutine field_io_fortran_file_read_dp(FILE_ID, REAL_DATA, LEN_OF_DATA, FILE_END, ERR, ERROR,)
Read a real data using FORTRAN IO.
subroutine field_io_fortran_file_close(FILE_ID, ERR, ERROR,)
Close a file using Fortran.
integer(intg), parameter maxstrlen
Maximum string length fro character strings.
contains information for parallel IO, and it is nodal base
subroutine, public exits(NAME)
Records the exit out of the named procedure.
This module contains all type definitions in order to avoid cyclic module references.
integer(intg), parameter part_deriv_s1_s3_s4
Cross derivative in the s1, s3 and s4 direction i.e., d^3u/ds1ds3ds4.
subroutine fieldio_exportelementalgroupheaderfortran(global_number, MAX_NODE_COMP_INDEX, NUM_OF_SCALING_FACTOR_SETS, LIST_COMP_SCALE, my_computational_node_number, elementalInfoSet, sessionHandle, ERR, ERROR,)
Write the header of a group elements using FORTRAN.
integer(intg), parameter part_deriv_s3
First partial derivative in the s3 direction i.e., du/ds3.
type(basis_functions_type), public basis_functions
The tree of defined basis functions.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
type(varying_string) function field_io_get_field_info_label(FIELD, ERR, ERROR)
Get the field information.
subroutine field_io_fortran_file_read_intg(FILE_ID, INTG_DATA, LEN_OF_DATA, ERR, ERROR,)
Read a integer data.
subroutine field_io_elemental_info_set_sort(ELEMENTAL_INFO_SET, my_computational_node_number, ERR, ERROR,)
Sort the Elemental_info_set according to the type of field variable components.
subroutine field_io_calculate_tp_scale_and_node_counts(BASIS, num_scl, num_node, ERR, ERROR,)
Finding basis information.
integer(intg), parameter part_deriv_s1_s1
Second partial derivative in the s1 direction i.e., d^2u/ds1ds1.
subroutine reallocate_elements(array, newSize, errorMessage, ERR, ERROR,)
integer(intg), parameter, public basis_cubic_interpolation_order
Cubic interpolation order.
integer(intg) function, public computational_nodes_number_get(ERR, ERROR)
Returns the number of computational nodes.
integer(intg) function field_io_element_derivative_index(ELEMENT, DERIVATIVE_NUMBER, NODE_NUMBER, ERR, ERROR)
Use the element version information to calcualte the derivative index of a given nodal derivative for...
integer(intg), parameter, public basis_quadratic_interpolation_order
Quadratic interpolation order.
integer(intg), parameter field_io_field_label
Type for lable.
int fieldexport_elementindex(const int handle, const int dimensionCount, const int index)
integer(intg), parameter part_deriv_s2_s3
Cross derivative in the s2 and s3 direction i.e., d^2u/ds2ds3.
integer(intg), parameter part_deriv_s2_s3_s4
Cross derivative in the s2, s3 and s4 direction i.e., d^3u/ds2ds3ds4.
subroutine checked_deallocate_str(array)
integer(intg), parameter part_deriv_s1_s3
Cross derivative in the s1 and s3 direction i.e., d^2u/ds1ds3.
This module contains all computational environment variables.
Contains the information for an element in a mesh.
This module contains CMISS MPI routines.
int fieldexport_elementgridsize(const int handle, const int numberOfXi)
field variable component type pointer for IO
integer(intg), save my_computational_node_number
The computational rank for this node.
subroutine fieldio_nodelinfosetattachlocalprocess(NODAL_INFO_SET, FIELDS, my_computational_node_number, ERR, ERROR,)
Collect nodal information from each MPI process.
int fieldexport_nodescaleindexes(const int handle, const int nodeCount, const int *const derivativeCount, const int *const elementDerivatives, const int *const nodeIndexes, const int firstScaleIndex)
A buffer type to allow for an array of pointers to a BASIS_TYPE.
integer(intg), parameter, public coordinate_rectangular_cartesian_type
Rectangular Cartesian coordinate system type.
Contains the local information for a global mapping number for a domain mapping.
Contains information on a mesh defined on a region.
integer(intg), parameter field_io_scale_factors_property_type
subroutine fieldio_elementalinfosetattachlocalprocess(ELEMENTAL_INFO_SET, FIELDS, ERR, ERROR,)
Collect the elemental information from each MPI process.
subroutine grow_array_int(array, delta, errorMessage, ERR, ERROR,)
subroutine field_io_create_decompistion(DECOMPOSITION, DECOMPOSITION_USER_NUMBER, DECOMPOSITION_METHOD, MESH, NUMBER_OF_DOMAINS, ERR, ERROR,)
Create decompition.
type(varying_string) function field_io_label_derivative_info_get(GROUP_DERIVATIVES, NUMBER_DERIVATIVES, LABEL_TYPE, ERR, ERROR)
Get the derivative information.
Contains the topology information for the nodes of a domain.
subroutine reallocate_string(array, newSize, errorMessage, ERR, ERROR,)
integer(intg), parameter field_io_variable_label
integer(intg), parameter, public basis_lagrange_hermite_tp_type
Lagrange-Hermite tensor product basis type.
field variable component type pointer for IO
int fieldexport_nodecount(const int handle, const int nodeCount)
This module handles all distributed matrix vector routines.
subroutine grow_array_real(array, delta, errorMessage, ERR, ERROR,)
integer(intg), parameter part_deriv_s1_s4
Cross derivative in the s1 and s4 direction i.e., d^2u/ds1ds4.
integer(intg), parameter field_io_derivative_label
integer(intg), parameter, public basis_collapsed_at_xi1
The Xi direction at the xi=1 end of this Xi direction is collapsed.
int fieldexport_elementnodescales(const int handle, const int isFirstSet, const int scaleCount, const double *const scales)
Implements lists of Field IO operation.
integer(intg), parameter, public basis_cubic_lagrange_interpolation
Cubic Lagrange interpolation specification.
int fieldexport_opensession(const int type, const char *const name, int *const handle)
Converts a string representation of a number to a double precision number.
integer(intg), parameter part_deriv_s2_s4
Cross derivative in the s2 and s4 direction i.e., d^2u/ds2ds4.
subroutine checked_deallocate_basis(array)
subroutine field_io_fortran_file_write_intg(FILE_ID, INTG_DATA, LEN_OF_DATA, ERR, ERROR,)
Write a integer data.
integer(intg), parameter, public basis_quadratic1_hermite_interpolation
Quadratic Hermite (no derivative at xi=0) interpolation specification.
logical function field_io_compare_info_set_components(SET1, SET2)
subroutine reallocate_real(array, newSize, errorMessage, ERR, ERROR,)
subroutine field_io_fill_basis_info(INTERPOLATION_XI, LIST_STR, NUMBER_OF_COMPONENTS, ERR, ERROR,)
Finding basis information.
integer(intg), parameter part_deriv_s1_s2
Cross derivative in the s1 and s2 direction i.e., d^2u/ds1ds2.
integer(intg), parameter part_deriv_s2_s2
Second partial derivative in the s2 direction i.e., d^2u/ds2ds2.
Contains information on the nodes defined on a region.
Contains information for a field variable defined on a field.
subroutine string_to_muti_integers_vs(STRING, NUMBER_OF_INTEGERS, INTG_DATA, ERR, ERROR,)
Searches a list for a given value and returns the position in the list if the value exists...
subroutine, public field_io_fields_import(NAME, METHOD, REGION, MESH, MESH_USER_NUMBER, DECOMPOSITION, DECOMPOSITION_USER_NUMBER, DECOMPOSITION_METHOD, FIELD_VALUES_SET_TYPE, FIELD_SCALING_TYPE, ERR, ERROR,)
Import fields from files into different computational nodes.
type(varying_string) function field_io_get_variable_info_label(COMPONENT, ERR, ERROR)
Get the field information.
integer(intg), parameter part_deriv_s3_s3
Second partial derivative in the s3 direction i.e., d^2u/ds3ds3.
Contains information on the domain mappings (i.e., local and global numberings).
A pointer to the domain decomposition for this domain.
integer(intg), parameter shape_size
size of shape
subroutine checked_deallocate_2d_int(array)
subroutine checked_deallocate_field(array)
subroutine field_io_fortran_file_read_string(FILE_ID, STRING_DATA, FILE_END, ERR, ERROR,)
Read a string using FORTRAN IO.
Converts a string representation of a number to an integer.
Implements lists of base types.
integer(intg), parameter, public basis_cubic_hermite_interpolation
Cubic Hermite interpolation specification.
integer(intg), parameter part_deriv_s2_s4_s4
Cross derivative in the s2, s4 and s4 direction i.e., d^3u/ds2ds4^2.
subroutine checked_deallocate_int(array)
Contains all information about a basis .
subroutine field_io_create_fields(NAME, REGION, DECOMPOSITION, FIELD_VALUES_SET_TYPE, NUMBER_OF_FIELDS,
Create decompsition.
integer(intg), parameter field_io_scale_factors_number_type
Type of scale factor.
subroutine, public basis_create_start(USER_NUMBER, BASIS, ERR, ERROR,)
Starts the creation of a new basis The default values of the BASIS attributes are: ...
This module contains all machine dependent constants for AIX systems.
int fieldexport_coordinatevariable(const int handle, const int variableNumber, int coordinateSystemType, const int componentCount)
Flags an error condition.
subroutine field_io_export_nodal_group_header_fortran(fieldInfoSet, global_number, MAX_NUM_OF_NODAL_DERIVATIVES, my_computational_node_number, sessionHandle, paddingInfo, ERR, ERROR,)
Write the header of a group nodes using FORTRAIN.
integer(intg), dimension(23, 4) partial_derivative_index
Partial derivative index map. PARTIAL_DERIVATIVE_INDEX(idx,nic) gives the order of the partial deriva...
subroutine field_io_import_global_mesh(NAME, REGION, MESH, MESH_USER_NUMBER, MASTER_COMPUTATIONAL_NUMBER, my_computational_node_number, MESH_COMPONENTS_OF_FIELD_COMPONENTS, COMPONENTS_IN_FIELDS, NUMBER_OF_FIELDS, NUMBER_OF_EXNODE_FILES, ERR, ERROR,)
Read the global mesh into one computational node first and then broadcasting to others nodes...
integer(intg), parameter, public basis_linear_lagrange_interpolation
Linear Lagrange interpolation specification.
int fieldexport_group(const int handle, const char *const label)
subroutine field_io_field_info(STRING, LABEL_TYPE, FIELD_TYPE, ERR, ERROR,)
Get the field information.
subroutine, public field_io_elements_export(FIELDS, FILE_NAME, METHOD, ERR, ERROR,)
Export elemental information into multiple files.
integer(intg) function, public computational_node_number_get(ERR, ERROR)
Returns the number/rank of the computational nodes.
subroutine checked_deallocate_elements(array)
int fieldexport_fieldcount(const int handle, const int fieldCount)
Contains the information for the elements of a mesh.
integer(intg), parameter, public basis_linear_interpolation_order
Linear interpolation order.
This module contains all kind definitions.
int fieldexport_coordinatecomponent(const int handle, int coordinateSystemType, const int componentNumber, const int isNodal, const int numberOfXi, const int *const interpolationXi)
subroutine field_io_nodal_info_set_sort(NODAL_INFO_SET, my_computational_node_number, ERR, ERROR,)
Sort nodal information according to the type of field variable component.
subroutine, public field_io_nodes_export(FIELDS, FILE_NAME, METHOD, ERR, ERROR,)
Export nodal information.
integer(intg), parameter part_deriv_s1_s2_s3
Cross derivative in the s1, s2 and s3 direction i.e., d^3u/ds1ds2ds3.
integer(intg), parameter part_deriv_s1_s2_s4
Cross derivative in the s1, s2 and s4 direction i.e., d^3u/ds1ds2ds4.
subroutine, public mpi_error_check(ROUTINE, MPI_ERR_CODE, ERR, ERROR,)
Checks to see if an MPI error has occured during an MPI call and flags a CMISS error it if it has...