45 MODULE interface_routines
48 USE data_point_routines
51 USE generated_mesh_routines
53 USE interface_conditions_routines
76 INTERFACE interface_label_get
77 MODULE PROCEDURE interface_label_get_c
78 MODULE PROCEDURE interface_label_get_vs
81 INTERFACE interface_label_set
82 MODULE PROCEDURE interface_label_set_c
83 MODULE PROCEDURE interface_label_set_vs
86 PUBLIC interface_mesh_add
88 PUBLIC interface_create_start, interface_create_finish
90 PUBLIC interface_coordinate_system_set,interface_coordinate_system_get
92 PUBLIC interface_data_points_get
94 PUBLIC interface_destroy, interface_mesh_connectivity_destroy, interfacepointsconnectivity_destroy
96 PUBLIC interface_label_get,interface_label_set
98 PUBLIC interface_nodes_get
100 PUBLIC interface_mesh_connectivity_create_start, interface_mesh_connectivity_create_finish
102 PUBLIC interface_user_number_find
104 PUBLIC interfaces_finalise,interfaces_initialise
106 PUBLIC interface_mesh_connectivity_element_xi_set,interfacemeshconnectivity_elementnumberset
108 PUBLIC interface_mesh_connectivity_node_number_set
110 PUBLIC interface_mesh_connectivity_basis_set
112 PUBLIC interfacepointsconnectivity_createstart,interfacepointsconnectivity_createfinish
114 PUBLIC interfacepointsconnectivity_datareprojection
116 PUBLIC interfacepointsconnectivity_elementnumberget,interfacepointsconnectivity_elementnumberset
118 PUBLIC interfacepointsconnectivity_pointxiget,interfacepointsconnectivity_pointxiset
120 PUBLIC interfacepointsconnectivity_updatefromprojection
128 SUBROUTINE interface_mesh_add(INTERFACE,MESH,MESH_INDEX,ERR,ERROR,*)
133 INTEGER(INTG),
INTENT(OUT) :: mesh_index
134 INTEGER(INTG),
INTENT(OUT) :: err
137 INTEGER(INTG) :: mesh_idx
138 LOGICAL :: mesh_already_coupled
141 TYPE(
region_type),
POINTER :: coupled_mesh_region,mesh_region
144 NULLIFY(new_coupled_meshes)
146 enters(
"INTERFACE_MESH_ADD",err,error,*999)
148 IF(
ASSOCIATED(interface))
THEN 149 IF(interface%INTERFACE_FINISHED)
THEN 150 CALL flagerror(
"Interface has already been finished.",err,error,*999)
152 IF(
ASSOCIATED(mesh))
THEN 153 IF(mesh%MESH_FINISHED)
THEN 154 mesh_region=>mesh%REGION
155 IF(
ASSOCIATED(mesh_region))
THEN 156 ALLOCATE(new_coupled_meshes(interface%NUMBER_OF_COUPLED_MESHES+1),stat=err)
157 IF(err/=0)
CALL flagerror(
"Could not allocate new coupled meshes.",err,error,*999)
159 IF(interface%NUMBER_OF_COUPLED_MESHES>0)
THEN 160 IF(
ASSOCIATED(interface%COUPLED_MESHES))
THEN 161 mesh_already_coupled=.false.
162 DO mesh_idx=1,interface%NUMBER_OF_COUPLED_MESHES
163 coupled_mesh=>interface%COUPLED_MESHES(mesh_idx)%PTR
164 IF(
ASSOCIATED(coupled_mesh))
THEN 165 coupled_mesh_region=>coupled_mesh%REGION
166 IF(
ASSOCIATED(coupled_mesh_region))
THEN 167 IF(mesh_region%USER_NUMBER==coupled_mesh_region%USER_NUMBER)
THEN 168 IF(mesh%USER_NUMBER==coupled_mesh%USER_NUMBER)
THEN 169 mesh_already_coupled=.true.
174 local_error=
"Coupled interface mesh region for mesh index "// &
176 CALL flagerror(local_error,err,error,*999)
179 local_error=
"Coupled interface mesh for mesh index "//
trim(
number_to_vstring(mesh_idx,
"*",err,error))// &
180 &
" is not associated." 181 CALL flagerror(local_error,err,error,*999)
183 new_coupled_meshes(mesh_idx)%PTR=>interface%COUPLED_MESHES(mesh_idx)%PTR
185 IF(mesh_already_coupled)
THEN 186 local_error=
"The supplied mesh has already been added to the list of coupled meshes at mesh index "// &
188 CALL flagerror(local_error,err,error,*999)
190 DEALLOCATE(interface%COUPLED_MESHES)
192 CALL flagerror(
"Interface coupled meshes is not associated.",err,error,*999)
196 new_coupled_meshes(interface%NUMBER_OF_COUPLED_MESHES+1)%PTR=>mesh
197 interface%COUPLED_MESHES=>new_coupled_meshes
199 interface%NUMBER_OF_COUPLED_MESHES=interface%NUMBER_OF_COUPLED_MESHES+1
200 mesh_index=interface%NUMBER_OF_COUPLED_MESHES
202 CALL flagerror(
"Mesh region is not associated.",err,error,*999)
205 CALL flagerror(
"Mesh has not been finished.",err,error,*999)
208 CALL flagerror(
"Mesh is not associated.",err,error,*999)
212 CALL flagerror(
"Interface is not associated.",err,error,*999)
215 exits(
"INTERFACE_MESH_ADD")
217 999
IF(
ASSOCIATED(new_coupled_meshes))
DEALLOCATE(new_coupled_meshes)
218 errorsexits(
"INTERFACE_MESH_ADD",err,error)
221 END SUBROUTINE interface_mesh_add
228 SUBROUTINE interface_create_finish(INTERFACE,ERR,ERROR,*)
232 INTEGER(INTG),
INTENT(OUT) :: err
237 enters(
"INTERFACE_CREATE_FINISH",err,error,*999)
239 IF(
ASSOCIATED(interface))
THEN 240 IF(interface%INTERFACE_FINISHED)
THEN 241 CALL flagerror(
"Interface has already been finished.",err,error,*999)
243 IF(interface%NUMBER_OF_COUPLED_MESHES<2)
THEN 244 local_error=
"Invalid mesh coupling. Only "//
trim(
number_to_vstring(interface%NUMBER_OF_COUPLED_MESHES,
"*",err,error))// &
245 &
" have been coupled. The number of coupled meshes must be >= 2." 246 CALL flagerror(local_error,err,error,*999)
248 interface%INTERFACE_FINISHED=.true.
251 CALL flagerror(
"Interface is not associated.",err,error,*999)
259 IF(
ASSOCIATED(interface%INTERFACES))
THEN 260 IF(
ASSOCIATED(interface%INTERFACES%PARENT_REGION))
THEN 262 & parent_region%USER_NUMBER,err,error,*999)
264 & parent_region%LABEL,err,error,*999)
266 CALL flagerror(
"Interfaces parent region is not associated.",err,error,*999)
269 CALL flagerror(
"Interface interfaces is not associated.",err,error,*999)
273 exits(
"INTERFACE_CREATE_FINISH")
275 999 errorsexits(
"INTERFACE_CREATE_FINISH",err,error)
277 END SUBROUTINE interface_create_finish
284 SUBROUTINE interface_create_start(USER_NUMBER,PARENT_REGION,INTERFACE,ERR,ERROR,*)
287 INTEGER(INTG),
INTENT(IN) :: user_number
290 INTEGER(INTG),
INTENT(OUT) :: err
293 INTEGER(INTG) :: interface_idx
298 NULLIFY(new_interface)
299 NULLIFY(new_interfaces)
301 enters(
"INTERFACE_CREATE_START",err,error,*998)
303 IF(
ASSOCIATED(parent_region))
THEN 304 IF(
ASSOCIATED(interface))
THEN 305 CALL flagerror(
"Interface is already associated.",err,error,*998)
308 CALL interface_user_number_find(user_number,parent_region,interface,err,error,*998)
309 IF(
ASSOCIATED(interface))
THEN 311 &
" has already been created on region number "//
trim(
number_to_vstring(parent_region%USER_NUMBER,
"*",err,error))//
"." 312 CALL flagerror(local_error,err,error,*998)
316 CALL interface_initialise(new_interface,err,error,*999)
317 new_interface%USER_NUMBER=user_number
318 new_interface%GLOBAL_NUMBER=parent_region%INTERFACES%NUMBER_OF_INTERFACES+1
320 new_interface%LABEL=
char(local_string)
322 new_interface%INTERFACES=>parent_region%INTERFACES
323 new_interface%PARENT_REGION=>parent_region
325 ALLOCATE(new_interfaces(parent_region%INTERFACES%NUMBER_OF_INTERFACES+1),stat=err)
326 IF(err/=0)
CALL flagerror(
"Could not allocate new interfaces.",err,error,*999)
327 DO interface_idx=1,parent_region%INTERFACES%NUMBER_OF_INTERFACES
328 new_interfaces(interface_idx)%PTR=>parent_region%INTERFACES%INTERFACES(interface_idx)%PTR
330 new_interfaces(parent_region%INTERFACES%NUMBER_OF_INTERFACES+1)%PTR=>new_interface
331 IF(
ASSOCIATED(parent_region%INTERFACES%INTERFACES))
DEALLOCATE(parent_region%INTERFACES%INTERFACES)
332 parent_region%INTERFACES%INTERFACES=>new_interfaces
333 parent_region%INTERFACES%NUMBER_OF_INTERFACES=parent_region%INTERFACES%NUMBER_OF_INTERFACES+1
334 interface=>new_interface
338 CALL flagerror(
"Parent region is not associated.",err,error,*998)
341 exits(
"INTERFACE_CREATE_START")
343 999
IF(
ASSOCIATED(new_interfaces))
DEALLOCATE(new_interfaces)
344 CALL interface_finalise(interface,err,error,*998)
345 998 errorsexits(
"INTERFACE_CREATE_START",err,error)
347 END SUBROUTINE interface_create_start
354 SUBROUTINE interface_coordinate_system_get(INTERFACE,COORDINATE_SYSTEM,ERR,ERROR,*)
359 INTEGER(INTG),
INTENT(OUT) :: err
363 enters(
"INTERFACE_COORDINATE_SYSTEM_GET",err,error,*999)
365 IF(
ASSOCIATED(interface))
THEN 366 IF(interface%INTERFACE_FINISHED)
THEN 367 IF(
ASSOCIATED(coordinate_system))
THEN 368 CALL flagerror(
"Coordinate system is already associated.",err,error,*999)
370 coordinate_system=>interface%COORDINATE_SYSTEM
373 CALL flagerror(
"Interface has not been finished.",err,error,*999)
376 CALL flagerror(
"Interface is not associated.",err,error,*999)
379 exits(
"INTERFACE_COORDINATE_SYSTEM_GET")
381 999 errorsexits(
"INTERFACE_COORDINATE_SYSTEM_GET",err,error)
383 END SUBROUTINE interface_coordinate_system_get
391 SUBROUTINE interface_coordinate_system_set(INTERFACE,COORDINATE_SYSTEM,ERR,ERROR,*)
396 INTEGER(INTG),
INTENT(OUT) :: err
400 enters(
"INTERFACE_COORDINATE_SYSTEM_SET",err,error,*999)
402 IF(
ASSOCIATED(interface))
THEN 403 IF(interface%INTERFACE_FINISHED)
THEN 404 CALL flagerror(
"Interface has been finished.",err,error,*999)
406 IF(
ASSOCIATED(coordinate_system))
THEN 407 IF(coordinate_system%COORDINATE_SYSTEM_FINISHED)
THEN 408 interface%COORDINATE_SYSTEM=>coordinate_system
410 CALL flagerror(
"Coordinate system has not been finished.",err,error,*999)
413 CALL flagerror(
"Coordinate system is not associated.",err,error,*999)
417 CALL flagerror(
"Interface is not associated.",err,error,*999)
420 exits(
"INTERFACE_COORDINATE_SYSTEM_SET")
422 999 errorsexits(
"INTERFACE_COORDINATE_SYSTEM_SET",err,error)
424 END SUBROUTINE interface_coordinate_system_set
431 SUBROUTINE interface_data_points_get(INTERFACE,DATA_POINTS,ERR,ERROR,*)
436 INTEGER(INTG),
INTENT(OUT) :: err
440 enters(
"REGION_DATA_POINTS_GET",err,error,*998)
442 IF(
ASSOCIATED(interface))
THEN 443 IF(interface%INTERFACE_FINISHED)
THEN 444 IF(
ASSOCIATED(data_points))
THEN 445 CALL flagerror(
"Data points is already associated.",err,error,*998)
447 data_points=>interface%DATA_POINTS
448 IF(.NOT.
ASSOCIATED(data_points))
CALL flagerror(
"Data points is not associated.",err,error,*999)
451 CALL flagerror(
"Interface has not been finished.",err,error,*998)
454 CALL flagerror(
"Interface is not associated.",err,error,*998)
457 exits(
"INTERFACE_DATA_POINTS_GET")
459 999
NULLIFY(data_points)
460 998 errorsexits(
"INTERFACE_DATA_POINTS_GET",err,error)
463 END SUBROUTINE interface_data_points_get
470 SUBROUTINE interface_destroy(INTERFACE,ERR,ERROR,*)
474 INTEGER(INTG),
INTENT(OUT) :: err
477 INTEGER(INTG) :: interface_idx,interface_position
481 NULLIFY(new_interfaces)
483 enters(
"INTERFACE_DESTROY",err,error,*999)
485 IF(
ASSOCIATED(interface))
THEN 486 interfaces=>interface%INTERFACES
487 IF(
ASSOCIATED(interfaces))
THEN 488 interface_position=interface%GLOBAL_NUMBER
491 CALL interface_finalise(interface,err,error,*999)
494 IF(interfaces%NUMBER_OF_INTERFACES>1)
THEN 495 ALLOCATE(new_interfaces(interfaces%NUMBER_OF_INTERFACES-1),stat=err)
496 IF(err/=0)
CALL flagerror(
"Could not allocate new interface conditions.",err,error,*999)
497 DO interface_idx=1,interfaces%NUMBER_OF_INTERFACES
498 IF(interface_idx<interface_position)
THEN 499 new_interfaces(interface_idx)%PTR=>interfaces%INTERFACES(interface_idx)%PTR
500 ELSE IF(interface_idx>interface_position)
THEN 501 interfaces%INTERFACES(interface_idx)%PTR%GLOBAL_NUMBER=interfaces%INTERFACES(interface_idx)%PTR%GLOBAL_NUMBER-1
502 new_interfaces(interface_idx-1)%PTR=>interfaces%INTERFACES(interface_idx)%PTR
505 IF(
ASSOCIATED(interfaces%INTERFACES))
DEALLOCATE(interfaces%INTERFACES)
506 interfaces%INTERFACES=>new_interfaces
507 interfaces%NUMBER_OF_INTERFACES=interfaces%NUMBER_OF_INTERFACES-1
509 DEALLOCATE(interfaces%INTERFACES)
510 interfaces%NUMBER_OF_INTERFACES=0
514 CALL flagerror(
"Interface interfaces is not associated.",err,error,*999)
517 CALL flagerror(
"Interface is not associated.",err,error,*999)
520 exits(
"INTERFACE_DESTROY")
522 999 errorsexits(
"INTERFACE_DESTROY",err,error)
524 END SUBROUTINE interface_destroy
531 SUBROUTINE interface_finalise(INTERFACE,ERR,ERROR,*)
535 INTEGER(INTG),
INTENT(OUT) :: err
539 enters(
"INTERFACE_FINALISE",err,error,*999)
541 IF(
ASSOCIATED(interface))
THEN 542 IF(
ASSOCIATED(interface%COUPLED_MESHES))
DEALLOCATE(interface%COUPLED_MESHES)
543 IF(
ASSOCIATED(interface%MESH_CONNECTIVITY)) &
544 &
CALL interface_mesh_connectivity_finalise(interface%MESH_CONNECTIVITY,err,error,*999)
545 IF(
ASSOCIATED(interface%pointsConnectivity)) &
546 &
CALL interfacepointsconnectivity_finalise(interface%pointsConnectivity,err,error,*999)
547 IF(
ASSOCIATED(interface%NODES))
CALL nodes_destroy(interface%NODES,err,error,*999)
548 CALL meshes_finalise(interface%MESHES,err,error,*999)
549 CALL fields_finalise(interface%FIELDS,err,error,*999)
550 CALL interface_conditions_finalise(interface%INTERFACE_CONDITIONS,err,error,*999)
551 DEALLOCATE(interface)
554 exits(
"INTERFACE_FINALISE")
556 999 errorsexits(
"INTERFACE_FINALISE",err,error)
558 END SUBROUTINE interface_finalise
565 SUBROUTINE interface_initialise(INTERFACE,ERR,ERROR,*)
569 INTEGER(INTG),
INTENT(OUT) :: err
573 enters(
"INTERFACE_INITIALISE",err,error,*999)
575 IF(
ASSOCIATED(interface))
THEN 576 CALL flagerror(
"Interface is already associated.",err,error,*999)
578 ALLOCATE(interface,stat=err)
579 IF(err/=0)
CALL flagerror(
"Could not allocate interface.",err,error,*999)
580 interface%USER_NUMBER=0
581 interface%GLOBAL_NUMBER=0
582 interface%INTERFACE_FINISHED=.false.
584 NULLIFY(interface%INTERFACES)
585 NULLIFY(interface%PARENT_REGION)
586 interface%NUMBER_OF_COUPLED_MESHES=0
587 NULLIFY(interface%COUPLED_MESHES)
588 NULLIFY(interface%MESH_CONNECTIVITY)
589 NULLIFY(interface%pointsConnectivity)
590 NULLIFY(interface%NODES)
591 NULLIFY(interface%MESHES)
592 NULLIFY(interface%GENERATED_MESHES)
593 NULLIFY(interface%FIELDS)
594 NULLIFY(interface%INTERFACE_CONDITIONS)
595 NULLIFY(interface%COORDINATE_SYSTEM)
596 NULLIFY(interface%DATA_POINTS)
597 CALL meshes_initialise(interface,err,error,*999)
598 CALL generated_meshes_initialise(interface,err,error,*999)
599 CALL fields_initialise(interface,err,error,*999)
600 CALL interface_conditions_initialise(interface,err,error,*999)
603 exits(
"INTERFACE_INITIALISE")
605 999 errorsexits(
"INTERFACE_INITIALISE",err,error)
607 END SUBROUTINE interface_initialise
614 SUBROUTINE interface_label_get_c(INTERFACE,LABEL,ERR,ERROR,*)
618 CHARACTER(LEN=*),
INTENT(OUT) :: label
619 INTEGER(INTG),
INTENT(OUT) :: err
622 INTEGER(INTG) :: c_length,vs_length
624 enters(
"INTERFACE_LABEL_GET_C",err,error,*999)
626 IF(
ASSOCIATED(interface))
THEN 629 IF(c_length>vs_length)
THEN 630 label=
char(interface%LABEL,vs_length)
632 label=
char(interface%LABEL,c_length)
635 CALL flagerror(
"Interface is not associated.",err,error,*999)
638 exits(
"INTERFACE_LABEL_GET_C")
640 999 errorsexits(
"INTERFACE_LABEL_GET_C",err,error)
643 END SUBROUTINE interface_label_get_c
650 SUBROUTINE interface_label_get_vs(INTERFACE,LABEL,ERR,ERROR,*)
655 INTEGER(INTG),
INTENT(OUT) :: err
659 enters(
"INTERFACE_LABEL_GET_VS",err,error,*999)
661 IF(
ASSOCIATED(interface))
THEN 665 CALL flagerror(
"Interface is not associated.",err,error,*999)
668 exits(
"INTERFACE_LABEL_GET_VS")
670 999 errorsexits(
"INTERFACE_LABEL_GET_VS",err,error)
673 END SUBROUTINE interface_label_get_vs
680 SUBROUTINE interface_label_set_c(INTERFACE,LABEL,ERR,ERROR,*)
684 CHARACTER(LEN=*),
INTENT(IN) :: label
685 INTEGER(INTG),
INTENT(OUT) :: err
689 enters(
"INTERFACE_LABEL_SET_C",err,error,*999)
691 IF(
ASSOCIATED(interface))
THEN 692 IF(interface%INTERFACE_FINISHED)
THEN 693 CALL flagerror(
"Interface has been finished.",err,error,*999)
695 interface%LABEL=label
698 CALL flagerror(
"Interface is not associated.",err,error,*999)
701 exits(
"INTERFACE_LABEL_SET_C")
703 999 errorsexits(
"INTERFACE_LABEL_SET_C",err,error)
705 END SUBROUTINE interface_label_set_c
712 SUBROUTINE interface_label_set_vs(INTERFACE,LABEL,ERR,ERROR,*)
717 INTEGER(INTG),
INTENT(OUT) :: err
721 enters(
"INTERFACE_LABEL_SET_VS",err,error,*999)
723 IF(
ASSOCIATED(interface))
THEN 724 IF(interface%INTERFACE_FINISHED)
THEN 725 CALL flagerror(
"Interface has been finished.",err,error,*999)
727 interface%LABEL=label
730 CALL flagerror(
"Interface is not associated.",err,error,*999)
733 exits(
"INTERFACE_LABEL_SET_VS")
735 999 errorsexits(
"INTERFACE_LABEL_SET_VS",err,error)
737 END SUBROUTINE interface_label_set_vs
744 SUBROUTINE interface_nodes_get(INTERFACE,NODES,ERR,ERROR,*)
749 INTEGER(INTG),
INTENT(OUT) :: err
753 enters(
"INTERFACE_NODES_GET",err,error,*998)
755 IF(
ASSOCIATED(interface))
THEN 756 IF(interface%INTERFACE_FINISHED)
THEN 757 IF(
ASSOCIATED(nodes))
THEN 758 CALL flagerror(
"Nodes is already associated.",err,error,*998)
760 nodes=>interface%NODES
761 IF(.NOT.
ASSOCIATED(nodes))
CALL flagerror(
"Nodes is not associated.",err,error,*999)
764 CALL flagerror(
"Interface has not been finished.",err,error,*998)
767 CALL flagerror(
"Interface is not associated.",err,error,*998)
770 exits(
"INTERFACE_NODES_GET")
773 998 errorsexits(
"INTERFACE_NODES_GET",err,error)
776 END SUBROUTINE interface_nodes_get
783 SUBROUTINE interface_mesh_connectivity_create_finish(INTERFACE_MESH_CONNECTIVITY,ERR,ERROR,*)
787 INTEGER(INTG),
INTENT(OUT) :: err
790 INTEGER(INTG) :: interfaceelementidx,coupledmeshidx
793 enters(
"INTERFACE_MESH_CONNECTIVITY_CREATE_FINISH",err,error,*999)
795 IF(
ASSOCIATED(interface_mesh_connectivity))
THEN 796 IF(interface_mesh_connectivity%MESH_CONNECTIVITY_FINISHED)
THEN 797 CALL flagerror(
"Interface meshes connectivity has already been finished.",err,error,*999)
800 DO interfaceelementidx=1,interface_mesh_connectivity%NUMBER_OF_INTERFACE_ELEMENTS
801 DO coupledmeshidx=1,interface_mesh_connectivity%NUMBER_OF_COUPLED_MESHES
802 IF (interface_mesh_connectivity%ELEMENT_CONNECTIVITY(interfaceelementidx,coupledmeshidx)% &
803 & coupled_mesh_element_number==0)
THEN 804 local_error=
"The connectivity from interface element " &
807 CALL flagerror(local_error,err,error,*999)
812 CALL interfacemeshconnectivity_connectedlinescalculate(interface_mesh_connectivity,err,error,*999)
813 interface_mesh_connectivity%MESH_CONNECTIVITY_FINISHED=.true.
816 CALL flagerror(
"Interface meshes connectivity is not associated.",err,error,*999)
819 exits(
"INTERFACE_MESH_CONNECTIVITY_CREATE_FINISH")
821 999 errorsexits(
"INTERFACE_MESH_CONNECTIVITY_CREATE_FINISH",err,error)
823 END SUBROUTINE interface_mesh_connectivity_create_finish
830 SUBROUTINE interface_mesh_connectivity_create_start(INTERFACE,MESH,INTERFACE_MESH_CONNECTIVITY,ERR,ERROR,*)
836 INTEGER(INTG),
INTENT(OUT) :: err
840 enters(
"INTERFACE_MESH_CONNECTIVITY_CREATE_START",err,error,*999)
842 IF(
ASSOCIATED(interface))
THEN 843 IF(interface%INTERFACE_FINISHED)
THEN 844 IF(
ASSOCIATED(interface%MESH_CONNECTIVITY))
THEN 845 CALL flagerror(
"The interface already has a meshes connectivity associated.",err,error,*999)
848 CALL interface_mesh_connectivity_initialise(interface,mesh,err,error,*999)
850 interface_mesh_connectivity=>interface%MESH_CONNECTIVITY
853 CALL flagerror(
"Interface has not been finished.",err,error,*999)
856 CALL flagerror(
"Interface is not associated.",err,error,*999)
859 exits(
"INTERFACE_MESH_CONNECTIVITY_CREATE_START")
861 999 errorsexits(
"INTERFACE_MESH_CONNECTIVITY_CREATE_START",err,error)
864 END SUBROUTINE interface_mesh_connectivity_create_start
871 SUBROUTINE interface_mesh_connectivity_destroy(INTERFACE_MESH_CONNECTIVITY,ERR,ERROR,*)
875 INTEGER(INTG),
INTENT(OUT) :: err
879 enters(
"INTERFACE_MESH_CONNECTIVITY_DESTROY",err,error,*999)
881 IF(
ASSOCIATED(interface_mesh_connectivity))
THEN 882 CALL interface_mesh_connectivity_finalise(interface_mesh_connectivity,err,error,*999)
884 CALL flagerror(
"Interface meshes connectivity is not associated.",err,error,*999)
887 exits(
"INTERFACE_MESH_CONNECTIVITY_DESTROY")
889 999 errorsexits(
"INTERFACE_MESH_CONNECTIVITY_DESTROY",err,error)
891 END SUBROUTINE interface_mesh_connectivity_destroy
898 SUBROUTINE interface_mesh_connectivity_basis_set(INTERFACE_MESH_CONNECTIVITY,BASIS,ERR,ERROR,*)
903 INTEGER(INTG),
INTENT(OUT) :: err
907 INTEGER(INTG) :: interfaceelementidx,coupledmeshidx,numberofinterfaceelementnodes,numberofcoupledmeshxidirections
909 enters(
"INTERFACE_MESH_CONNECTIVITY_BASIS_SET",err,error,*999)
911 IF(
ASSOCIATED(interface_mesh_connectivity))
THEN 912 IF(interface_mesh_connectivity%MESH_CONNECTIVITY_FINISHED)
THEN 913 CALL flagerror(
"Interface mesh connectivity already been finished.",err,error,*999)
915 IF(
ASSOCIATED(interface_mesh_connectivity%BASIS))
THEN 916 CALL flagerror(
"Mesh connectivity basis already associated.",err,error,*999)
918 IF(
ASSOCIATED(basis))
THEN 919 interface_mesh_connectivity%BASIS=>basis
922 numberofcoupledmeshxidirections=interface_mesh_connectivity%INTERFACE_MESH%NUMBER_OF_DIMENSIONS+1
923 numberofinterfaceelementnodes=interface_mesh_connectivity%BASIS%NUMBER_OF_NODES
924 DO interfaceelementidx=1,interface_mesh_connectivity%NUMBER_OF_INTERFACE_ELEMENTS
925 DO coupledmeshidx=1,interface_mesh_connectivity%NUMBER_OF_COUPLED_MESHES
926 element_connectivity=>interface_mesh_connectivity%ELEMENT_CONNECTIVITY(interfaceelementidx,coupledmeshidx)
931 ALLOCATE(element_connectivity%XI(numberofcoupledmeshxidirections,1,numberofinterfaceelementnodes),stat=err)
932 IF(err/=0)
CALL flagerror(
"Could not allocate interface element connectivity.",err,error,*999)
933 element_connectivity%XI=0.0_dp
937 CALL flagerror(
"Basis to set mesh connectivity not associated.",err,error,*999)
942 CALL flagerror(
"Interface mesh connectivity is not associated.",err,error,*999)
945 exits(
"INTERFACE_MESH_CONNECTIVITY_BASIS_SET")
947 999 errorsexits(
"INTERFACE_MESH_CONNECTIVITY_BASIS_SET",err,error)
950 END SUBROUTINE interface_mesh_connectivity_basis_set
957 SUBROUTINE interface_mesh_connectivity_element_xi_set(INTERFACE_MESH_CONNECTIVITY,INTERFACE_MESH_ELEMENT_NUMBER, &
958 & coupled_mesh_index,coupled_mesh_element_number,interface_mesh_local_node_number,interface_mesh_component_number,xi, &
963 INTEGER(INTG),
INTENT(IN) :: interface_mesh_element_number
964 INTEGER(INTG),
INTENT(IN) :: coupled_mesh_index
965 INTEGER(INTG),
INTENT(IN) :: coupled_mesh_element_number
966 INTEGER(INTG),
INTENT(IN) :: interface_mesh_local_node_number
967 INTEGER(INTG),
INTENT(IN) :: interface_mesh_component_number
968 REAL(DP),
INTENT(IN) :: xi(:)
969 INTEGER(INTG),
INTENT(OUT) :: err
972 INTEGER(INTG) :: coupled_mesh_number_of_xi
975 enters(
"INTERFACE_MESH_CONNECTIVITY_ELEMENT_XI_SET",err,error,*999)
977 IF(
ASSOCIATED(interface_mesh_connectivity))
THEN 978 IF(interface_mesh_connectivity%MESH_CONNECTIVITY_FINISHED)
THEN 979 CALL flagerror(
"Interface mesh connectivity already been finished.",err,error,*999)
981 IF(
ALLOCATED(interface_mesh_connectivity%ELEMENT_CONNECTIVITY))
THEN 982 IF((interface_mesh_element_number>0).AND. &
983 & (interface_mesh_element_number<=interface_mesh_connectivity%NUMBER_OF_INTERFACE_ELEMENTS))
THEN 984 IF((coupled_mesh_index>0).AND.(coupled_mesh_index<=interface_mesh_connectivity%NUMBER_OF_COUPLED_MESHES))
THEN 985 IF((coupled_mesh_element_number>0).AND.(coupled_mesh_element_number<= &
986 & interface_mesh_connectivity%INTERFACE%COUPLED_MESHES(coupled_mesh_index)%PTR%NUMBER_OF_ELEMENTS))
THEN 987 IF((interface_mesh_component_number>0).AND. &
988 & (interface_mesh_component_number<=interface_mesh_connectivity%INTERFACE_MESH%NUMBER_OF_COMPONENTS))
THEN 989 IF((interface_mesh_local_node_number>0).AND.(interface_mesh_local_node_number<= &
990 & interface_mesh_connectivity%BASIS%NUMBER_OF_NODES))
THEN 991 element_connectivity=>interface_mesh_connectivity% &
992 & element_connectivity(interface_mesh_element_number,coupled_mesh_index)
993 IF(element_connectivity%COUPLED_MESH_ELEMENT_NUMBER==coupled_mesh_element_number)
THEN 994 coupled_mesh_number_of_xi = interface_mesh_connectivity%INTERFACE%COUPLED_MESHES(coupled_mesh_index)%PTR% &
995 & topology(1)%PTR%ELEMENTS%ELEMENTS(coupled_mesh_element_number)%BASIS%NUMBER_OF_XI
996 IF(
SIZE(xi)==coupled_mesh_number_of_xi)
THEN 998 element_connectivity%XI(1:coupled_mesh_number_of_xi,interface_mesh_component_number, &
999 & interface_mesh_local_node_number)=xi(1:coupled_mesh_number_of_xi)
1001 CALL flagerror(
"The size of the xi array provided does not match the coupled mesh element's' number"// &
1002 &
" of xi.",err,error,*999)
1005 CALL flagerror(
"Coupled mesh element number doesn't match that set to the interface.",err,error,*999)
1008 CALL flagerror(
"Interface local node number is out of range.",err,error,*999)
1011 CALL flagerror(
"Interface component number is out of range.",err,error,*999)
1014 CALL flagerror(
"Coupled mesh element number out of range.",err,error,*999)
1017 CALL flagerror(
"Interface coupled mesh index number out of range.",err,error,*999)
1020 CALL flagerror(
"Interface mesh element number out of range.",err,error,*999)
1023 CALL flagerror(
"Interface elements connectivity array not allocated.",err,error,*999)
1027 CALL flagerror(
"Interface mesh connectivity is not associated.",err,error,*999)
1030 exits(
"INTERFACE_MESH_CONNECTIVITY_ELEMENT_XI_SET")
1032 999 errorsexits(
"INTERFACE_MESH_CONNECTIVITY_ELEMENT_XI_SET",err,error)
1035 END SUBROUTINE interface_mesh_connectivity_element_xi_set
1042 SUBROUTINE interfacemeshconnectivity_elementnumberset(INTERFACE_MESH_CONNECTIVITY,INTERFACE_MESH_ELEMENT_NUMBER, &
1043 & coupled_mesh_index,coupled_mesh_element_number,err,error,*)
1047 INTEGER(INTG),
INTENT(IN) :: interface_mesh_element_number
1048 INTEGER(INTG),
INTENT(IN) :: coupled_mesh_index
1049 INTEGER(INTG),
INTENT(IN) :: coupled_mesh_element_number
1050 INTEGER(INTG),
INTENT(OUT) :: err
1055 enters(
"InterfaceMeshConnectivity_ElementNumberSet",err,error,*999)
1057 IF(
ASSOCIATED(interface_mesh_connectivity))
THEN 1058 IF(interface_mesh_connectivity%MESH_CONNECTIVITY_FINISHED)
THEN 1059 CALL flagerror(
"Interface mesh connectivity has already been finished.",err,error,*999)
1061 IF((interface_mesh_element_number>0).AND.(interface_mesh_element_number<= &
1062 & interface_mesh_connectivity%NUMBER_OF_INTERFACE_ELEMENTS))
THEN 1063 IF((coupled_mesh_index>0).AND.(coupled_mesh_index<=interface_mesh_connectivity%NUMBER_OF_COUPLED_MESHES))
THEN 1064 IF (
ALLOCATED(interface_mesh_connectivity%ELEMENT_CONNECTIVITY))
THEN 1065 element_connectivity=>interface_mesh_connectivity% &
1066 & element_connectivity(interface_mesh_element_number,coupled_mesh_index)
1067 element_connectivity%COUPLED_MESH_ELEMENT_NUMBER=coupled_mesh_element_number
1069 CALL flagerror(
"Interface elements connectivity array not allocated.",err,error,*999)
1072 CALL flagerror(
"Interface coupled mesh index number out of range.",err,error,*999)
1075 CALL flagerror(
"Interface mesh element number out of range.",err,error,*999)
1079 CALL flagerror(
"Interface mesh connectivity is not associated.",err,error,*999)
1082 exits(
"InterfaceMeshConnectivity_ElementNumberSet")
1084 999 errorsexits(
"InterfaceMeshConnectivity_ElementNumberSet",err,error)
1087 END SUBROUTINE interfacemeshconnectivity_elementnumberset
1094 SUBROUTINE interface_mesh_connectivity_node_number_set(NODES,INTERFACE_MESH_NODE_NUMBERS, &
1095 & first_coupled_mesh_index,first_coupled_mesh_node_numbers,second_coupled_mesh_index,second_coupled_mesh_node_numbers, &
1100 INTEGER(INTG),
INTENT(IN) :: interface_mesh_node_numbers(:)
1101 INTEGER(INTG),
INTENT(IN) :: first_coupled_mesh_index,second_coupled_mesh_index
1102 INTEGER(INTG),
INTENT(IN) :: first_coupled_mesh_node_numbers(:),second_coupled_mesh_node_numbers(:)
1103 INTEGER(INTG),
INTENT(OUT) :: err
1106 INTEGER(INTG) :: nodeindex
1108 enters(
"INTERFACE_MESH_CONNECTIVITY_NODE_NUMBER_SET",err,error,*999)
1110 IF(
ASSOCIATED(nodes))
THEN 1111 IF(nodes%INTERFACE%MESH_CONNECTIVITY%MESH_CONNECTIVITY_FINISHED)
THEN 1112 print *,
'CHECK how to circumvent! interface_routines.f90:1133' 1113 CALL flagerror(
"Interface mesh connectivity has already been finished.",err,error,*999)
1116 ALLOCATE(nodes%COUPLED_NODES(2,
SIZE(interface_mesh_node_numbers(:))))
1117 DO nodeindex=1,
SIZE(interface_mesh_node_numbers(:))
1118 nodes%COUPLED_NODES(first_coupled_mesh_index,nodeindex)=first_coupled_mesh_node_numbers(nodeindex)
1119 nodes%COUPLED_NODES(second_coupled_mesh_index,nodeindex)=second_coupled_mesh_node_numbers(nodeindex)
1123 CALL flagerror(
"Nodes are not associated.",err,error,*999)
1126 exits(
"INTERFACE_MESH_CONNECTIVITY_NODE_NUMBER_SET")
1128 999 errorsexits(
"INTERFACE_MESH_CONNECTIVITY_NODE_NUMBER_SET",err,error)
1131 END SUBROUTINE interface_mesh_connectivity_node_number_set
1138 SUBROUTINE interfacemeshconnectivity_connectedlinescalculate(INTERFACE_MESH_CONNECTIVITY,ERR,ERROR,*)
1142 INTEGER(INTG),
INTENT(OUT) :: err
1145 REAL(DP) :: xidifference
1146 INTEGER(INTG) :: coupledmeshidx,interfaceelementidx,coupledmeshxiidx,numberofinterfaceelementnodes,numberofinterfacemeshxi
1150 enters(
"InterfaceMeshConnectivity_ConnectedLinesCalculate",err,error,*999)
1152 DO coupledmeshidx=1,interface_mesh_connectivity%NUMBER_OF_COUPLED_MESHES
1153 DO interfaceelementidx=1,interface_mesh_connectivity%NUMBER_OF_INTERFACE_ELEMENTS
1154 element_connectivity=>interface_mesh_connectivity%ELEMENT_CONNECTIVITY(interfaceelementidx,coupledmeshidx)
1155 numberofinterfaceelementnodes=interface_mesh_connectivity%BASIS%NUMBER_OF_NODES
1156 numberofinterfacemeshxi=interface_mesh_connectivity%INTERFACE_MESH%NUMBER_OF_DIMENSIONS
1157 SELECTCASE(numberofinterfacemeshxi)
1159 DO coupledmeshxiidx=1,interface_mesh_connectivity%INTERFACE%COUPLED_MESHES(coupledmeshidx)%PTR%NUMBER_OF_DIMENSIONS
1161 xidifference=element_connectivity%XI(coupledmeshxiidx,1,1)- &
1162 & element_connectivity%XI(coupledmeshxiidx,1,numberofinterfaceelementnodes)
1164 IF(abs(element_connectivity%XI(coupledmeshxiidx,1,numberofinterfaceelementnodes))<
zero_tolerance)
THEN 1165 element_connectivity%CONNECTED_LINE=3-(coupledmeshxiidx-1)*2
1167 element_connectivity%CONNECTED_LINE=4-(coupledmeshxiidx-1)*2
1172 DO coupledmeshxiidx=1,interface_mesh_connectivity%INTERFACE%COUPLED_MESHES(coupledmeshidx)%PTR%NUMBER_OF_DIMENSIONS
1173 xidifference=element_connectivity%XI(coupledmeshxiidx,1,1)- &
1174 & element_connectivity%XI(coupledmeshxiidx,1,numberofinterfaceelementnodes)
1176 IF(abs(element_connectivity%XI(coupledmeshxiidx,1,numberofinterfaceelementnodes))<
zero_tolerance)
THEN 1177 element_connectivity%CONNECTED_FACE=(coupledmeshxiidx-1)*2+2
1179 element_connectivity%CONNECTED_FACE=(coupledmeshxiidx-1)*2+1
1184 local_error=
"Number of interface mesh dimension of "//
trim(
number_to_vstring(numberofinterfacemeshxi,
"*",err,error))// &
1186 CALL flagerror(local_error,err,error,*999)
1191 exits(
"InterfaceMeshConnectivity_ConnectedLinesCalculate")
1193 999
errors(
"InterfaceMeshConnectivity_ConnectedLinesCalculate",err,error)
1194 exits(
"InterfaceMeshConnectivity_ConnectedLinesCalculate")
1197 END SUBROUTINE interfacemeshconnectivity_connectedlinescalculate
1204 SUBROUTINE interface_mesh_connectivity_finalise(INTERFACE_MESH_CONNECTIVITY,ERR,ERROR,*)
1208 INTEGER(INTG),
INTENT(OUT) :: err
1212 enters(
"INTERFACE_MESH_CONNECTIVITY_FINALISE",err,error,*999)
1214 CALL interfacemeshconnectivity_elementfinalise(interface_mesh_connectivity,err,error,*999)
1215 NULLIFY(interface_mesh_connectivity%INTERFACE)
1216 NULLIFY(interface_mesh_connectivity%INTERFACE_MESH)
1217 NULLIFY(interface_mesh_connectivity%BASIS)
1218 interface_mesh_connectivity%NUMBER_OF_INTERFACE_ELEMENTS=0
1219 interface_mesh_connectivity%NUMBER_OF_COUPLED_MESHES=0
1221 exits(
"INTERFACE_MESH_CONNECTIVITY_FINALISE")
1223 999 errorsexits(
"INTERFACE_MESH_CONNECTIVITY_FINALISE",err,error)
1226 END SUBROUTINE interface_mesh_connectivity_finalise
1233 SUBROUTINE interface_mesh_connectivity_initialise(INTERFACE,MESH,ERR,ERROR,*)
1238 INTEGER(INTG),
INTENT(OUT) :: err
1242 enters(
"INTERFACE_MESH_CONNECTIVITY_INITIALISE",err,error,*999)
1244 IF(
ASSOCIATED(interface))
THEN 1245 IF(
ASSOCIATED(interface%MESH_CONNECTIVITY))
THEN 1246 CALL flagerror(
"Interface mesh connectivity is already associated.",err,error,*999)
1248 ALLOCATE(interface%MESH_CONNECTIVITY,stat=err)
1249 IF(err/=0)
CALL flagerror(
"Could not allocate interface mesh connectivity.",err,error,*999)
1250 interface%MESH_CONNECTIVITY%INTERFACE=>
INTERFACE 1251 interface%MESH_CONNECTIVITY%MESH_CONNECTIVITY_FINISHED=.false.
1252 interface%MESH_CONNECTIVITY%INTERFACE_MESH=>mesh
1253 NULLIFY(interface%MESH_CONNECTIVITY%BASIS)
1254 CALL interfacemeshconnectivity_elementinitialise(interface,err,error,*999)
1257 CALL flagerror(
"Interface is not associated.",err,error,*999)
1260 exits(
"INTERFACE_MESH_CONNECTIVITY_INITIALISE")
1262 999 errorsexits(
"INTERFACE_MESH_CONNECTIVITY_INITIALISE",err,error)
1264 END SUBROUTINE interface_mesh_connectivity_initialise
1271 SUBROUTINE interfacepointsconnectivity_coupledelementscalculate(interfacePointsConnectivity,coupledMeshIdx,err,error,*)
1275 INTEGER(INTG),
INTENT(IN) :: coupledmeshidx
1276 INTEGER(INTG),
INTENT(OUT) :: err
1279 TYPE(
list_type),
POINTER :: elementnumberslist
1280 INTEGER(INTG) :: elementidx,datapointidx,globaldatapointnumber,globalelementnumber,numberofelementdatapoints, &
1281 & numberOfCoupledElements,coupledElementIdx
1282 INTEGER(INTG),
ALLOCATABLE :: elementnumbers(:)
1284 enters(
"InterfacePointsConnectivity_CoupledElementsCalculate",err,error,*999)
1286 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 1287 IF(
ALLOCATED(interfacepointsconnectivity%coupledElements))
THEN 1288 interfacepointsconnectivity%maxNumberOfCoupledElements(coupledmeshidx)=0;
1289 DO elementidx=1,
SIZE(interfacepointsconnectivity%coupledElements,1)
1290 numberofelementdatapoints=interfacepointsconnectivity%interfaceMesh%TOPOLOGY(1)%PTR%dataPoints% &
1291 & elementdatapoint(elementidx)%numberOfProjectedData
1293 NULLIFY(elementnumberslist)
1298 DO datapointidx=1,numberofelementdatapoints
1299 globaldatapointnumber=interfacepointsconnectivity%interfaceMesh%TOPOLOGY(1)%PTR%dataPoints% &
1300 & elementdatapoint(elementidx)%dataIndices(datapointidx)%globalNumber
1301 globalelementnumber=interfacepointsconnectivity%pointsConnectivity(globaldatapointnumber,coupledmeshidx)% &
1302 & coupledmeshelementnumber
1303 CALL list_item_add(elementnumberslist,globalelementnumber,err,error,*999)
1308 IF(
ALLOCATED(interfacepointsconnectivity%coupledElements(elementidx,coupledmeshidx)%elementNumbers)) &
1309 &
DEALLOCATE(interfacepointsconnectivity%coupledElements(elementidx,coupledmeshidx)%elementNumbers)
1310 ALLOCATE(interfacepointsconnectivity%coupledElements(elementidx,coupledmeshidx)% &
1311 & elementnumbers(numberofcoupledelements),stat=err)
1312 IF(err/=0)
CALL flagerror(
"Could not allocate coupled mesh element numbers.",err,error,*999)
1313 DO coupledelementidx=1,numberofcoupledelements
1314 interfacepointsconnectivity%coupledElements(elementidx,coupledmeshidx)%elementNumbers(coupledelementidx)= &
1315 & elementnumbers(coupledelementidx)
1317 interfacepointsconnectivity%coupledElements(elementidx,coupledmeshidx)%numberOfCoupledElements=numberofcoupledelements
1318 IF(
ALLOCATED(elementnumbers))
DEALLOCATE(elementnumbers)
1319 IF(interfacepointsconnectivity%maxNumberOfCoupledElements(coupledmeshidx)<numberofcoupledelements)
THEN 1320 interfacepointsconnectivity%maxNumberOfCoupledElements(coupledmeshidx)=numberofcoupledelements
1324 CALL flagerror(
"Interface points connectivity coupled elements is not allocated.",err,error,*999)
1327 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
1330 exits(
"InterfacePointsConnectivity_CoupledElementsCalculate")
1332 999
errors(
"InterfacePointsConnectivity_CoupledElementsCalculate",err,error)
1333 exits(
"InterfacePointsConnectivity_CoupledElementsCalculate")
1336 END SUBROUTINE interfacepointsconnectivity_coupledelementscalculate
1343 SUBROUTINE interfacepointsconnectivity_coupledelementsfinalise(interfacePointsConnectivity,err,error,*)
1347 INTEGER(INTG),
INTENT(OUT) :: err
1350 INTEGER(INTG) :: elementidx,coupledmeshidx
1352 enters(
"InterfacePointsConnectivity_CoupledElementsFinalise",err,error,*999)
1354 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 1355 IF(
ALLOCATED(interfacepointsconnectivity%coupledElements))
THEN 1356 DO coupledmeshidx=1,
SIZE(interfacepointsconnectivity%coupledElements,2)
1357 DO elementidx=1,
SIZE(interfacepointsconnectivity%coupledElements,1)
1358 interfacepointsconnectivity%coupledElements(elementidx,coupledmeshidx)%numberOfCoupledElements=0
1359 IF(
ALLOCATED(interfacepointsconnectivity%coupledElements(elementidx,coupledmeshidx)%elementNumbers)) &
1360 &
DEALLOCATE(interfacepointsconnectivity%coupledElements(elementidx,coupledmeshidx)%elementNumbers)
1363 DEALLOCATE(interfacepointsconnectivity%coupledElements)
1365 IF(
ALLOCATED(interfacepointsconnectivity%maxNumberOfCoupledElements)) &
1366 &
DEALLOCATE(interfacepointsconnectivity%maxNumberOfCoupledElements)
1368 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
1371 exits(
"InterfacePointsConnectivity_CoupledElementsFinalise")
1373 999
errors(
"InterfacePointsConnectivity_CoupledElementsFinalise",err,error)
1374 exits(
"InterfacePointsConnectivity_CoupledElementsFinalise")
1377 END SUBROUTINE interfacepointsconnectivity_coupledelementsfinalise
1384 SUBROUTINE interfacepointsconnectivity_coupledelementsinitialise(interfacePointsConnectivity,err,error,*)
1388 INTEGER(INTG),
INTENT(OUT) :: err
1391 INTEGER(INTG) :: numberofinterfaceelements,numberofcoupledmeshes,coupledmeshidx,elementidx
1392 INTEGER(INTG) :: dummyerr
1395 enters(
"InterfacePointsConnectivity_CoupledElementsInitialise",err,error,*999)
1397 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 1398 IF(
ALLOCATED(interfacepointsconnectivity%coupledElements))
THEN 1399 CALL flagerror(
"Interface points connectivity coupled elements is already allocated.",err,error,*999)
1401 IF(
ASSOCIATED(interfacepointsconnectivity%interface))
THEN 1402 IF(
ASSOCIATED(interfacepointsconnectivity%interfaceMesh))
THEN 1403 numberofinterfaceelements=interfacepointsconnectivity%interfaceMesh%NUMBER_OF_ELEMENTS
1404 numberofcoupledmeshes=interfacepointsconnectivity%interface%NUMBER_OF_COUPLED_MESHES
1405 ALLOCATE(interfacepointsconnectivity%coupledElements(numberofinterfaceelements,numberofcoupledmeshes),stat=err)
1406 IF(err/=0)
CALL flagerror(
"Could not allocate points connectivity coupled element.",err,error,*999)
1407 DO coupledmeshidx=1,numberofcoupledmeshes
1408 DO elementidx=1,numberofinterfaceelements
1409 interfacepointsconnectivity%coupledElements(elementidx,coupledmeshidx)%numberOfCoupledElements=0
1413 CALL flagerror(
"Interface mesh is not associated.",err,error,*999)
1416 CALL flagerror(
"Interface is not associated.",err,error,*999)
1420 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
1423 exits(
"InterfacePointsConnectivity_CoupledElementsInitialise")
1425 999
CALL interfacepointsconnectivity_coupledelementsfinalise(interfacepointsconnectivity,dummyerr,dummyerror,*998)
1426 998
errors(
"InterfacePointsConnectivity_CoupledElementsInitialise",err,error)
1427 exits(
"InterfacePointsConnectivity_CoupledElementsInitialise")
1430 END SUBROUTINE interfacepointsconnectivity_coupledelementsinitialise
1437 SUBROUTINE interfacepointsconnectivity_createfinish(interfacePointsConnectivity,err,error,*)
1441 INTEGER(INTG),
INTENT(OUT) :: err
1445 INTEGER(INTG) :: coupledmeshidx
1447 enters(
"InterfacePointsConnectivity_CreateFinish",err,error,*999)
1449 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 1450 IF(interfacepointsconnectivity%pointsConnectivityFinished)
THEN 1451 CALL flagerror(
"Interface points connectivity has already been finished.",err,error,*999)
1453 CALL interfacepointsconnectivity_reducedxicalculate(interfacepointsconnectivity,err,error,*999)
1454 interface=>interfacepointsconnectivity%interface
1455 IF(
ASSOCIATED(interface))
THEN 1456 CALL interfacepointsconnectivity_coupledelementsinitialise(interfacepointsconnectivity,err,error,*999)
1457 DO coupledmeshidx=1,interfacepointsconnectivity%interface%NUMBER_OF_COUPLED_MESHES
1458 CALL interfacepointsconnectivity_coupledelementscalculate(interfacepointsconnectivity,coupledmeshidx,err,error,*999)
1461 CALL flagerror(
"Interface is not associated.",err,error,*999)
1463 interfacepointsconnectivity%pointsConnectivityFinished=.true.
1466 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
1469 exits(
"InterfacePointsConnectivity_CreateFinish")
1471 999 errorsexits(
"InterfacePointsConnectivity_CreateFinish",err,error)
1473 END SUBROUTINE interfacepointsconnectivity_createfinish
1480 SUBROUTINE interfacepointsconnectivity_createstart(interface,interfaceMesh,interfacePointsConnectivity,err,error,*)
1484 TYPE(
mesh_type),
POINTER :: interfacemesh
1486 INTEGER(INTG),
INTENT(OUT) :: err
1490 enters(
"InterfacePointsConnectivity_CreateStart",err,error,*999)
1492 IF(
ASSOCIATED(interface))
THEN 1493 IF(interface%INTERFACE_FINISHED)
THEN 1494 IF(
ASSOCIATED(interface%pointsConnectivity))
THEN 1495 CALL flagerror(
"The interface already has a points connectivity associated.",err,error,*999)
1497 IF(
ASSOCIATED(interfacemesh))
THEN 1498 CALL interfacepointsconnectivity_initialise(interface,interfacemesh,err,error,*999)
1500 interfacepointsconnectivity=>interface%pointsConnectivity
1502 CALL flagerror(
"Interface mesh is not associated.",err,error,*999)
1506 CALL flagerror(
"Interface has not been finished.",err,error,*999)
1509 CALL flagerror(
"Interface is not associated.",err,error,*999)
1512 exits(
"InterfacePointsConnectivity_CreateStart")
1514 999 errorsexits(
"InterfacePointsConnectivity_CreateStart",err,error)
1517 END SUBROUTINE interfacepointsconnectivity_createstart
1524 SUBROUTINE interfacepointsconnectivity_datareprojection(interface,interfaceCondition,err,error,*)
1529 INTEGER(INTG),
INTENT(OUT) :: err
1533 TYPE(
field_type),
POINTER :: dependentfieldfixed,dependentfieldprojection
1539 INTEGER(INTG) :: fixedbodyidx,projectionbodyidx,datapointidx
1540 INTEGER(INTG) :: elementnumber,numberofgeometriccomponents
1541 INTEGER(INTG) :: coupledmeshfacelinenumber,component
1543 enters(
"InterfacePointsConnectivity_DataReprojection",err,error,*999)
1545 NULLIFY(interpolatedpoints)
1546 NULLIFY(interpolationparameters)
1550 IF(
ASSOCIATED(interface))
THEN 1551 IF(
ASSOCIATED(interfacecondition))
THEN 1552 interfacepointsconnectivity=>interface%pointsConnectivity
1553 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 1554 datapoints=>interface%DATA_POINTS
1555 IF(
ASSOCIATED(datapoints))
THEN 1558 dependentfieldfixed=>interfacecondition%DEPENDENT%FIELD_VARIABLES(fixedbodyidx)%PTR%FIELD
1559 IF(
ASSOCIATED(dependentfieldfixed))
THEN 1560 numberofgeometriccomponents=dependentfieldfixed%GEOMETRIC_FIELD%VARIABLES(1)%NUMBER_OF_COMPONENTS
1561 CALL field_interpolation_parameters_initialise(dependentfieldfixed,interpolationparameters,err,error,*999, &
1562 & field_geometric_components_type)
1563 CALL field_interpolated_points_initialise(interpolationparameters,interpolatedpoints,err,error,*999, &
1564 & field_geometric_components_type)
1565 interpolatedpoint=>interpolatedpoints(field_u_variable_type)%PTR
1566 DO datapointidx=1,datapoints%NUMBER_OF_DATA_POINTS
1567 elementnumber=interfacepointsconnectivity%pointsConnectivity(datapointidx,fixedbodyidx)% &
1568 & coupledmeshelementnumber
1569 coupledmeshfacelinenumber=dependentfieldfixed%DECOMPOSITION%TOPOLOGY%ELEMENTS% &
1570 & elements(elementnumber)% &
1571 & element_faces(interfacepointsconnectivity%pointsConnectivity(datapointidx,fixedbodyidx)% &
1572 & elementlinefacenumber)
1573 CALL field_interpolation_parameters_face_get(field_values_set_type,coupledmeshfacelinenumber, &
1574 & interpolationparameters(field_u_variable_type)%PTR,err,error,*999,field_geometric_components_type)
1575 CALL field_interpolate_xi(
no_part_deriv,interfacepointsconnectivity%pointsConnectivity(datapointidx, &
1576 & fixedbodyidx)%reducedXi(:),interpolatedpoint,err,error,*999,field_geometric_components_type)
1577 DO component=1,numberofgeometriccomponents
1578 datapoints%DATA_POINTS(datapointidx)%position(component) = interpolatedpoint%VALUES(component,
no_part_deriv)
1582 CALL flagerror(
"Fixed dependent field is not associated.",err,error,*999)
1586 dataprojection=>datapoints%DATA_PROJECTIONS(projectionbodyidx+1)%PTR
1589 IF(
ASSOCIATED(dataprojection))
THEN 1590 dependentfieldprojection=>interfacecondition%DEPENDENT%FIELD_VARIABLES(projectionbodyidx)%PTR%FIELD
1591 IF(
ASSOCIATED(dependentfieldprojection))
THEN 1594 CALL interfacepointsconnectivity_updatefromprojection(interfacepointsconnectivity,dataprojection, &
1595 & projectionbodyidx,err,error,*999)
1597 CALL flagerror(
"Projection dependent field is not associated.",err,error,*999)
1600 CALL flagerror(
"Interface data projection is not associated.",err,error,*999)
1603 CALL flagerror(
"Interface data points is not associated.",err,error,*999)
1606 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
1609 CALL flagerror(
"Interface condition is not associated.",err,error,*999)
1612 CALL flagerror(
"Interface is not associated.",err,error,*999)
1615 exits(
"InterfacePointsConnectivity_DataReprojection")
1617 999
errors(
"InterfacePointsConnectivity_DataReprojection",err,error)
1618 exits(
"InterfacePointsConnectivity_DataReprojection")
1621 END SUBROUTINE interfacepointsconnectivity_datareprojection
1628 SUBROUTINE interfacepointsconnectivity_destroy(interfacePointsConnectivity,err,error,*)
1632 INTEGER(INTG),
INTENT(OUT) :: err
1636 enters(
"InterfacePointsConnectivity_Destroy",err,error,*999)
1638 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 1639 CALL interfacepointsconnectivity_finalise(interfacepointsconnectivity,err,error,*999)
1641 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
1644 exits(
"InterfacePointsConnectivity_Destroy")
1646 999 errorsexits(
"InterfacePointsConnectivity_Destroy",err,error)
1649 END SUBROUTINE interfacepointsconnectivity_destroy
1656 SUBROUTINE interfacepointsconnectivity_elementnumberget(pointsConnectivity,dataPointUserNumber,coupledMeshIndexNumber, &
1657 & meshcomponentnumber,coupledmeshuserelementnumber,err,error,*)
1661 INTEGER(INTG),
INTENT(IN) :: datapointusernumber
1662 INTEGER(INTG),
INTENT(IN) :: coupledmeshindexnumber
1663 INTEGER(INTG),
INTENT(OUT) :: coupledmeshuserelementnumber
1664 INTEGER(INTG),
INTENT(IN) :: meshcomponentnumber
1665 INTEGER(INTG),
INTENT(OUT) :: err
1668 TYPE(
mesh_type),
POINTER :: interfacemesh
1669 INTEGER(INTG) :: datapointglobalnumber
1670 LOGICAL :: datapointexists
1672 enters(
"InterfacePointsConnectivity_ElementNumberGet",err,error,*999)
1674 IF(
ASSOCIATED(pointsconnectivity))
THEN 1675 CALL data_point_check_exists(pointsconnectivity%interface%DATA_POINTS,datapointusernumber,datapointexists, &
1676 & datapointglobalnumber,err,error,*999)
1677 IF(datapointexists)
THEN 1678 interfacemesh=>pointsconnectivity%interfaceMesh
1679 coupledmeshuserelementnumber=pointsconnectivity%pointsConnectivity(datapointglobalnumber,coupledmeshindexnumber)% &
1680 & coupledmeshelementnumber
1683 & (datapointusernumber,
"*",err,error))//
") does not exist.",err,error,*999)
1686 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
1689 exits(
"InterfacePointsConnectivity_ElementNumberGet")
1691 999
errors(
"InterfacePointsConnectivity_ElementNumberGet",err,error)
1692 exits(
"InterfacePointsConnectivity_ElementNumberGet")
1695 END SUBROUTINE interfacepointsconnectivity_elementnumberget
1702 SUBROUTINE interfacepointsconnectivity_elementnumberset(pointsConnectivity,dataPointUserNumber,coupledMeshIndexNumber, &
1703 & coupledmeshuserelementnumber,meshcomponentnumber,err,error,*)
1707 INTEGER(INTG),
INTENT(IN) :: datapointusernumber
1708 INTEGER(INTG),
INTENT(IN) :: coupledmeshindexnumber
1709 INTEGER(INTG),
INTENT(IN) :: coupledmeshuserelementnumber
1710 INTEGER(INTG),
INTENT(IN) :: meshcomponentnumber
1711 INTEGER(INTG),
INTENT(OUT) :: err
1714 INTEGER(INTG) :: datapointglobalnumber,elementmeshnumber
1715 LOGICAL :: datapointexists,elementexists
1717 enters(
"InterfacePointsConnectivity_ElementNumberSet",err,error,*999)
1719 IF(
ASSOCIATED(pointsconnectivity))
THEN 1720 IF(pointsconnectivity%pointsConnectivityFinished)
THEN 1721 CALL flagerror(
"Interface points connectivity has already been finished.",err,error,*999)
1723 CALL data_point_check_exists(pointsconnectivity%interface%DATA_POINTS,datapointusernumber,datapointexists, &
1724 & datapointglobalnumber,err,error,*999)
1725 IF(datapointexists)
THEN 1726 IF ((coupledmeshindexnumber<=pointsconnectivity%interface%DATA_POINTS%NUMBER_OF_DATA_POINTS).OR. &
1727 & (coupledmeshindexnumber>0))
THEN 1728 IF (
ALLOCATED(pointsconnectivity%pointsConnectivity))
THEN 1729 CALL meshtopologyelementcheckexists(pointsconnectivity%INTERFACE%COUPLED_MESHES(coupledmeshindexnumber)%PTR, &
1730 & meshcomponentnumber,coupledmeshuserelementnumber,elementexists,elementmeshnumber,err,error,*999)
1731 IF(elementexists)
THEN 1732 pointsconnectivity%pointsConnectivity(datapointglobalnumber,coupledmeshindexnumber)%coupledMeshElementNumber= &
1736 & (coupledmeshuserelementnumber,
"*",err,error))//
") does not exist.",err,error,*999)
1739 CALL flagerror(
"Interface points connectivity array not allocated.",err,error,*999)
1742 CALL flagerror(
"Interface coupled mesh index number out of range.",err,error,*999)
1746 & (datapointusernumber,
"*",err,error))//
") does not exist.",err,error,*999)
1750 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
1753 exits(
"InterfacePointsConnectivity_ElementNumberSet")
1755 999
errors(
"InterfacePointsConnectivity_ElementNumberSet",err,error)
1756 exits(
"InterfacePointsConnectivity_ElementNumberSet")
1759 END SUBROUTINE interfacepointsconnectivity_elementnumberset
1766 SUBROUTINE interfacepointsconnectivity_finalise(interfacePointsConnectivity,err,error,*)
1770 INTEGER(INTG),
INTENT(OUT) :: err
1773 INTEGER(INTG) :: coupledmeshidx,datapointidx
1775 enters(
"InterfacePointsConnectivity_Finalise",err,error,*999)
1777 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 1778 IF(
ALLOCATED(interfacepointsconnectivity%PointsConnectivity))
THEN 1779 DO coupledmeshidx=1,
size(interfacepointsconnectivity%pointsConnectivity,2)
1780 DO datapointidx=1,
size(interfacepointsconnectivity%pointsConnectivity,1)
1781 CALL interfacepointsconnectivity_pointfinalise(interfacepointsconnectivity%pointsConnectivity(datapointidx, &
1782 & coupledmeshidx),err,error,*999)
1785 DEALLOCATE(interfacepointsconnectivity%pointsConnectivity)
1787 CALL interfacepointsconnectivity_coupledelementsfinalise(interfacepointsconnectivity,err,error,*999)
1788 NULLIFY(interfacepointsconnectivity%interface)
1789 NULLIFY(interfacepointsconnectivity%interfaceMesh)
1790 IF(
ALLOCATED(interfacepointsconnectivity%coupledElements))
DEALLOCATE(interfacepointsconnectivity%coupledElements)
1791 IF(
ALLOCATED(interfacepointsconnectivity%maxNumberOfCoupledElements)) &
1792 &
DEALLOCATE(interfacepointsconnectivity%maxNumberOfCoupledElements)
1793 DEALLOCATE(interfacepointsconnectivity)
1796 exits(
"InterfacePointsConnectivity_Finalise")
1798 999 errorsexits(
"InterfacePointsConnectivity_Finalise",err,error)
1801 END SUBROUTINE interfacepointsconnectivity_finalise
1808 SUBROUTINE interfacepointsconnectivity_pointfinalise(interfacePointConnectivity,err,error,*)
1812 INTEGER(INTG),
INTENT(OUT) :: err
1816 enters(
"InterfacePointsConnectivity_PointFinalise",err,error,*999)
1818 interfacepointconnectivity%coupledMeshElementNumber=0
1819 interfacepointconnectivity%elementLineFaceNumber=0
1820 IF(
ALLOCATED(interfacepointconnectivity%xi))
DEALLOCATE(interfacepointconnectivity%xi)
1821 IF(
ALLOCATED(interfacepointconnectivity%reducedXi))
DEALLOCATE(interfacepointconnectivity%reducedXi)
1823 exits(
"InterfacePointsConnectivity_PointFinalise")
1825 999 errorsexits(
"InterfacePointsConnectivity_PointFinalise",err,error)
1828 END SUBROUTINE interfacepointsconnectivity_pointfinalise
1835 SUBROUTINE interfacepointsconnectivity_fullxicalculate(InterfacePointsConnectivity,coupledMeshIdx,err,error,*)
1839 INTEGER(INTG),
INTENT(IN) :: coupledmeshidx
1840 INTEGER(INTG),
INTENT(OUT) :: err
1843 INTEGER(INTG) :: datapointidx,interfacemeshdimensions,coupledmeshdimensions
1846 TYPE(
mesh_type),
POINTER :: interfacemesh,coupledmesh
1849 enters(
"InterfacePointsConnectivity_FullXiCalculate",err,error,*999)
1851 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 1852 interfacemesh=>interfacepointsconnectivity%interfaceMesh
1853 IF(
ASSOCIATED(interfacemesh))
THEN 1854 interfacemeshdimensions=interfacepointsconnectivity%interfaceMesh%NUMBER_OF_DIMENSIONS
1855 interface=>interfacepointsconnectivity%interface
1856 IF(
ASSOCIATED(interface))
THEN 1857 coupledmesh=>interface%COUPLED_MESHES(coupledmeshidx)%PTR
1858 IF(
ASSOCIATED(coupledmesh))
THEN 1859 coupledmeshdimensions=coupledmesh%NUMBER_OF_DIMENSIONS
1860 IF(interfacemeshdimensions==coupledmeshdimensions)
THEN 1861 DO datapointidx=1,interface%DATA_POINTS%NUMBER_OF_DATA_POINTS
1862 interfacepointsconnectivity%pointsConnectivity(datapointidx,coupledmeshidx)%xi(:)= &
1863 & interfacepointsconnectivity%pointsConnectivity(datapointidx,coupledmeshidx)%reducedXi(:)
1867 SELECT CASE(coupledmeshdimensions)
1869 DO datapointidx=1,interface%DATA_POINTS%NUMBER_OF_DATA_POINTS
1870 pointconnectivity=>interfacepointsconnectivity%pointsConnectivity(datapointidx,coupledmeshidx)
1871 SELECT CASE(pointconnectivity%elementLineFaceNumber)
1873 pointconnectivity%xi(1)=pointconnectivity%reducedXi(1)
1874 pointconnectivity%xi(2)=0.0_dp
1876 pointconnectivity%xi(1)=pointconnectivity%reducedXi(1)
1877 pointconnectivity%xi(2)=1.0_dp
1879 pointconnectivity%xi(1)=0.0_dp
1880 pointconnectivity%xi(2)=pointconnectivity%reducedXi(1)
1882 pointconnectivity%xi(1)=1.0_dp
1883 pointconnectivity%xi(2)=pointconnectivity%reducedXi(1)
1885 localerror=
"Invalid local line number "// &
1887 CALL flagerror(localerror,err,error,*999)
1891 DO datapointidx=1,interface%DATA_POINTS%NUMBER_OF_DATA_POINTS
1892 pointconnectivity=>interfacepointsconnectivity%pointsConnectivity(datapointidx,coupledmeshidx)
1893 SELECT CASE(pointconnectivity%elementLineFaceNumber)
1895 pointconnectivity%xi(1)=1.0_dp
1896 pointconnectivity%xi(2)=pointconnectivity%reducedXi(1)
1897 pointconnectivity%xi(3)=pointconnectivity%reducedXi(2)
1899 pointconnectivity%xi(1)=0.0_dp
1900 pointconnectivity%xi(2)=pointconnectivity%reducedXi(1)
1901 pointconnectivity%xi(3)=pointconnectivity%reducedXi(2)
1903 pointconnectivity%xi(1)=pointconnectivity%reducedXi(1)
1904 pointconnectivity%xi(2)=1.0_dp
1905 pointconnectivity%xi(3)=pointconnectivity%reducedXi(2)
1907 pointconnectivity%xi(1)=pointconnectivity%reducedXi(1)
1908 pointconnectivity%xi(2)=0.0_dp
1909 pointconnectivity%xi(3)=pointconnectivity%reducedXi(2)
1911 pointconnectivity%xi(1)=pointconnectivity%reducedXi(1)
1912 pointconnectivity%xi(2)=pointconnectivity%reducedXi(2)
1913 pointconnectivity%xi(3)=1.0_dp
1915 pointconnectivity%xi(1)=pointconnectivity%reducedXi(1)
1916 pointconnectivity%xi(2)=pointconnectivity%reducedXi(2)
1917 pointconnectivity%xi(3)=0.0_dp
1919 localerror=
"Invalid local face number "// &
1921 CALL flagerror(localerror,err,error,*999)
1925 localerror=
"Invalid coupled mesh dimension "// &
1927 CALL flagerror(localerror,err,error,*999)
1931 CALL flagerror(
"Coupled mesh is not associated.",err,error,*999)
1934 CALL flagerror(
"Interface is not associated.",err,error,*999)
1937 CALL flagerror(
"Interface mesh is not associated.",err,error,*999)
1940 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
1943 exits(
"InterfacePointsConnectivity_FullXiCalculate")
1945 999 errorsexits(
"InterfacePointsConnectivity_FullXiCalculate",err,error)
1948 END SUBROUTINE interfacepointsconnectivity_fullxicalculate
1955 SUBROUTINE interfacepointsconnectivity_initialise(interface,interfaceMesh,err,error,*)
1959 TYPE(
mesh_type),
POINTER :: interfacemesh
1960 INTEGER(INTG),
INTENT(OUT) :: err
1963 INTEGER(INTG) :: datapointidx,meshidx,coupledmeshdimension,interfacemeshdimension
1964 INTEGER(INTG) :: dummyerr
1967 enters(
"InterfacePointsConnectivity_Initialise",err,error,*999)
1969 IF(
ASSOCIATED(interface))
THEN 1970 IF(
ASSOCIATED(interface%pointsConnectivity))
THEN 1971 CALL flagerror(
"Interface has already got points connectivity associated.",err,error,*998)
1974 ALLOCATE(interface%pointsConnectivity,stat=err)
1975 IF(err/=0)
CALL flagerror(
"Could not allocate interface points connectivity.",err,error,*998)
1976 interface%pointsConnectivity%interface=>
interface 1977 interface%pointsConnectivity%pointsConnectivityFinished=.false.
1978 interface%pointsConnectivity%interfaceMesh=>interfacemesh
1979 interfacemeshdimension=interfacemesh%NUMBER_OF_DIMENSIONS
1980 IF(interface%NUMBER_OF_COUPLED_MESHES>0)
THEN 1981 IF(
ASSOCIATED(interface%DATA_POINTS))
THEN 1982 IF(interface%DATA_POINTS%NUMBER_OF_DATA_POINTS>0)
THEN 1983 ALLOCATE(interface%pointsConnectivity%pointsConnectivity(interface%DATA_POINTS%NUMBER_OF_DATA_POINTS, &
1984 & interface%NUMBER_OF_COUPLED_MESHES),stat=err)
1985 IF(err/=0)
CALL flagerror(
"Could not allocate interface point connectivity.",err,error,*999)
1986 DO datapointidx=1,interface%DATA_POINTS%NUMBER_OF_DATA_POINTS
1987 DO meshidx=1,interface%NUMBER_OF_COUPLED_MESHES
1988 coupledmeshdimension=interface%COUPLED_MESHES(meshidx)%PTR%NUMBER_OF_DIMENSIONS
1989 CALL interfacepointsconnectivity_pointinitialise(interface%pointsConnectivity%pointsConnectivity(datapointidx, &
1990 & meshidx),coupledmeshdimension,interfacemeshdimension,err,error,*999)
1994 CALL flagerror(
"Number of interface data points must be > 0.",err,error,*999)
1997 CALL flagerror(
"Interface data points are not associated.",err,error,*999)
2000 CALL flagerror(
"Number of coupled meshes in the interface must be > 0.",err,error,*999)
2002 ALLOCATE(interface%pointsConnectivity%maxNumberOfCoupledElements(interface%NUMBER_OF_COUPLED_MESHES),stat=err)
2003 IF(err/=0)
CALL flagerror(
"Could not allocate interface max number of coupled mesh elements.",err,error,*999)
2004 interface%pointsConnectivity%maxNumberOfCoupledElements=0
2007 CALL flagerror(
"Interface is not associated.",err,error,*999)
2010 exits(
"InterfacePointsConnectivity_Initialise")
2012 999
CALL interfacepointsconnectivity_finalise(interface%pointsConnectivity,dummyerr,dummyerror,*998)
2013 998 errorsexits(
"InterfacePointsConnectivity_Initialise",err,error)
2015 END SUBROUTINE interfacepointsconnectivity_initialise
2022 SUBROUTINE interfacepointsconnectivity_pointinitialise(interfacePointConnectivity,coupledMeshDimension,interfaceMeshDimension, &
2027 INTEGER(INTG),
INTENT(IN) :: coupledmeshdimension,interfacemeshdimension
2028 INTEGER(INTG),
INTENT(OUT) :: err
2031 INTEGER(INTG) :: dummyerr
2034 enters(
"InterfacePointsConnectivity_PointInitialise",err,error,*999)
2036 interfacepointconnectivity%coupledMeshElementNumber=0
2037 interfacepointconnectivity%elementLineFaceNumber=0
2039 ALLOCATE(interfacepointconnectivity%xi(coupledmeshdimension),stat=err)
2040 IF(err/=0)
CALL flagerror(
"Could not allocate interface point connectivity full xi.",err,error,*999)
2041 interfacepointconnectivity%xi=0.0_dp
2042 ALLOCATE(interfacepointconnectivity%reducedXi(interfacemeshdimension),stat=err)
2043 IF(err/=0)
CALL flagerror(
"Could not allocate interface point connectivity reduced xi.",err,error,*999)
2044 interfacepointconnectivity%reducedXi=0.0_dp
2046 exits(
"InterfacePointsConnectivity_PointInitialise")
2048 999
CALL interfacepointsconnectivity_pointfinalise(interfacepointconnectivity,dummyerr,dummyerror,*998)
2049 998 errorsexits(
"InterfacePointsConnectivity_PointInitialise",err,error)
2051 END SUBROUTINE interfacepointsconnectivity_pointinitialise
2058 SUBROUTINE interfacepointsconnectivity_pointxiget(pointsConnectivity,dataPointUserNumber,coupledMeshIndexNumber, &
2063 INTEGER(INTG),
INTENT(IN) :: datapointusernumber
2064 INTEGER(INTG),
INTENT(IN) :: coupledmeshindexnumber
2065 REAL(DP),
INTENT(OUT) :: xi(:)
2066 INTEGER(INTG),
INTENT(OUT) :: err
2069 INTEGER(INTG) :: datapointglobalnumber
2070 LOGICAL :: datapointexists
2072 enters(
"InterfacePointsConnectivity_PointXiGet",err,error,*999)
2075 IF(
ASSOCIATED(pointsconnectivity))
THEN 2076 IF (
ALLOCATED(pointsconnectivity%pointsConnectivity))
THEN 2077 CALL data_point_check_exists(pointsconnectivity%INTERFACE%DATA_POINTS,datapointusernumber,datapointexists, &
2078 & datapointglobalnumber,err,error,*999)
2079 IF(datapointexists)
THEN 2080 IF(
SIZE(xi)>=
SIZE(pointsconnectivity%pointsConnectivity(datapointusernumber,coupledmeshindexnumber)%xi,1))
THEN 2081 xi=pointsconnectivity%pointsConnectivity(datapointusernumber,coupledmeshindexnumber)%xi(:)
2083 CALL flagerror(
"Input xi array size is smaller than points connectivity xi array.",err,error,*999)
2087 & (datapointusernumber,
"*",err,error))//
") does not exist.",err,error,*999)
2090 CALL flagerror(
"Interface points connectivity array not allocated.",err,error,*999)
2093 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
2096 exits(
"InterfacePointsConnectivity_PointXiGet")
2098 999 errorsexits(
"InterfacePointsConnectivity_PointXiGet",err,error)
2101 END SUBROUTINE interfacepointsconnectivity_pointxiget
2108 SUBROUTINE interfacepointsconnectivity_pointxiset(pointsConnectivity,dataPointUserNumber,coupledMeshIndexNumber, &
2113 INTEGER(INTG),
INTENT(IN) :: datapointusernumber
2114 INTEGER(INTG),
INTENT(IN) :: coupledmeshindexnumber
2115 REAL(DP),
INTENT(IN) :: xi(:)
2116 INTEGER(INTG),
INTENT(OUT) :: err
2119 INTEGER(INTG) :: datapointglobalnumber
2120 LOGICAL :: datapointexists
2122 enters(
"InterfacePointsConnectivity_PointXiSet",err,error,*999)
2125 IF(
ASSOCIATED(pointsconnectivity))
THEN 2126 IF(pointsconnectivity%pointsConnectivityFinished)
THEN 2127 CALL flagerror(
"Interface mesh connectivity already been finished.",err,error,*999)
2129 IF (
ALLOCATED(pointsconnectivity%pointsConnectivity))
THEN 2130 CALL data_point_check_exists(pointsconnectivity%INTERFACE%DATA_POINTS,datapointusernumber,datapointexists, &
2131 & datapointglobalnumber,err,error,*999)
2132 IF(datapointexists)
THEN 2133 IF ((coupledmeshindexnumber>pointsconnectivity%interface%NUMBER_OF_COUPLED_MESHES).OR.(coupledmeshindexnumber<0))
THEN 2134 CALL flagerror(
"Interface coupled mesh index number out of range.",err,error,*999)
2136 IF(
SIZE(pointsconnectivity%pointsConnectivity(datapointglobalnumber,coupledmeshindexnumber)%xi,1)== &
2138 pointsconnectivity%pointsConnectivity(datapointglobalnumber,coupledmeshindexnumber)% &
2141 CALL flagerror(
"Input xi dimension does not match full coupled mesh xi dimension.",err,error,*999)
2146 & (datapointusernumber,
"*",err,error))//
") does not exist.",err,error,*999)
2149 CALL flagerror(
"Interface points connectivity array not allocated.",err,error,*999)
2153 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
2156 exits(
"InterfacePointsConnectivity_PointXiSet")
2158 999 errorsexits(
"InterfacePointsConnectivity_PointXiSet",err,error)
2161 END SUBROUTINE interfacepointsconnectivity_pointxiset
2168 SUBROUTINE interfacepointsconnectivity_updatefromprojection(InterfacePointsConnectivity,dataProjection, &
2169 & coupledmeshindex,err,error,*)
2174 INTEGER(INTG),
INTENT(IN) :: coupledmeshindex
2175 INTEGER(INTG),
INTENT(OUT) :: err
2178 INTEGER(INTG) :: datapointidx
2181 enters(
"InterfacePointsConnectivity_UpdateFromProjection",err,error,*999)
2183 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 2184 IF(
ASSOCIATED(dataprojection))
THEN 2185 IF(dataprojection%DATA_PROJECTION_FINISHED)
THEN 2186 WRITE(*,*)
"InterfacePointsConnectivity_UpdateFromProjection" 2187 DO datapointidx=1,
SIZE(dataprojection%DATA_PROJECTION_RESULTS,1)
2188 dataprojectionresult=>dataprojection%DATA_PROJECTION_RESULTS(datapointidx)
2189 interfacepointsconnectivity%pointsConnectivity(datapointidx,coupledmeshindex)%reducedXi(:)= &
2190 & dataprojectionresult%XI
2191 interfacepointsconnectivity%pointsConnectivity(datapointidx,coupledmeshindex)%coupledMeshElementNumber= &
2192 & dataprojectionresult%ELEMENT_NUMBER
2193 IF(dataprojectionresult%ELEMENT_LINE_NUMBER/=0)
THEN 2194 interfacepointsconnectivity%pointsConnectivity(datapointidx,coupledmeshindex)%elementLineFaceNumber= &
2195 & dataprojectionresult%ELEMENT_LINE_NUMBER
2196 ELSEIF(dataprojectionresult%ELEMENT_FACE_NUMBER/=0)
THEN 2197 interfacepointsconnectivity%pointsConnectivity(datapointidx,coupledmeshindex)%elementLineFaceNumber= &
2198 & dataprojectionresult%ELEMENT_FACE_NUMBER
2201 CALL interfacepointsconnectivity_fullxicalculate(interfacepointsconnectivity,coupledmeshindex, &
2204 CALL interfacepointsconnectivity_coupledelementscalculate(interfacepointsconnectivity,coupledmeshindex,err,error,*999)
2206 CALL flagerror(
"Data projection is not finished.",err,error,*999)
2209 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
2212 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
2215 exits(
"InterfacePointsConnectivity_UpdateFromProjection")
2217 999
errors(
"InterfacePointsConnectivity_UpdateFromProjection",err,error)
2218 exits(
"InterfacePointsConnectivity_UpdateFromProjection")
2221 END SUBROUTINE interfacepointsconnectivity_updatefromprojection
2228 SUBROUTINE interfacepointsconnectivity_reducedxicalculate(InterfacePointsConnectivity,err,error,*)
2232 INTEGER(INTG),
INTENT(OUT) :: err
2235 INTEGER(INTG) :: meshidx,datapointidx,xiidx,interfacemeshdimensions,coupledmeshdimensions
2238 enters(
"InterfacePointsConnectivity_ReducedXiCalculate",err,error,*999)
2240 IF(
ASSOCIATED(interfacepointsconnectivity))
THEN 2241 IF(interfacepointsconnectivity%pointsConnectivityFinished)
THEN 2242 CALL flagerror(
"Interface points connectivity has already been finished.",err,error,*999)
2244 interface=>interfacepointsconnectivity%interface
2245 interfacemeshdimensions=interfacepointsconnectivity%interfaceMesh%NUMBER_OF_DIMENSIONS
2246 IF(
ASSOCIATED(interface))
THEN 2247 DO meshidx=1,interface%NUMBER_OF_COUPLED_MESHES
2248 coupledmeshdimensions=interface%COUPLED_MESHES(meshidx)%PTR%NUMBER_OF_DIMENSIONS
2249 IF(interfacemeshdimensions==coupledmeshdimensions)
THEN 2250 DO datapointidx=1,interface%DATA_POINTS%NUMBER_OF_DATA_POINTS
2251 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%reducedXi(:)= &
2252 & interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(:)
2253 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%elementLineFaceNumber=1
2256 SELECT CASE(coupledmeshdimensions)
2258 DO datapointidx=1,interface%DATA_POINTS%NUMBER_OF_DATA_POINTS
2259 DO xiidx=1,coupledmeshdimensions
2260 IF(abs(interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(xiidx)) &
2262 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%elementLineFaceNumber=4-(xiidx-1)*2
2264 ELSEIF(abs(interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(xiidx)-1.0_dp) &
2266 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%elementLineFaceNumber=3-(xiidx-1)*2
2270 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%reducedXi= &
2271 & interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)% &
2275 DO datapointidx=1,interface%DATA_POINTS%NUMBER_OF_DATA_POINTS
2276 DO xiidx=1,coupledmeshdimensions
2277 IF(abs(interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(xiidx)) &
2279 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%elementLineFaceNumber=(xiidx-1)*2+2
2281 ELSE IF(abs(interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(xiidx)-1.0_dp) &
2283 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%elementLineFaceNumber=(xiidx-1)*2+1
2289 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%reducedXi(1)= &
2290 & interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(2)
2291 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%reducedXi(2)= &
2292 & interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(3)
2294 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%reducedXi(1)= &
2295 & interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(1)
2296 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%reducedXi(2)= &
2297 & interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(3)
2299 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%reducedXi(1)= &
2300 & interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(1)
2301 interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%reducedXi(2)= &
2302 & interfacepointsconnectivity%pointsConnectivity(datapointidx,meshidx)%xi(2)
2311 CALL flagerror(
"Interface is not associated.",err,error,*999)
2315 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
2318 exits(
"InterfacePointsConnectivity_ReducedXiCalculate")
2320 999
errors(
"InterfacePointsConnectivity_ReducedXiCalculate",err,error)
2321 exits(
"InterfacePointsConnectivity_ReducedXiCalculate")
2324 END SUBROUTINE interfacepointsconnectivity_reducedxicalculate
2331 SUBROUTINE interface_user_number_find(USER_NUMBER,PARENT_REGION,INTERFACE,ERR,ERROR,*)
2334 INTEGER(INTG),
INTENT(IN) :: user_number
2337 INTEGER(INTG),
INTENT(OUT) :: err
2340 INTEGER(INTG) :: interface_idx
2343 enters(
"INTERFACE_USER_NUMBER_FIND",err,error,*999)
2345 IF(
ASSOCIATED(parent_region))
THEN 2346 IF(
ASSOCIATED(interface))
THEN 2347 CALL flagerror(
"Interface is already associated.",err,error,*999)
2350 IF(
ASSOCIATED(parent_region%INTERFACES))
THEN 2352 DO WHILE(interface_idx<=parent_region%INTERFACES%NUMBER_OF_INTERFACES.AND..NOT.
ASSOCIATED(interface))
2353 IF(parent_region%INTERFACES%INTERFACES(interface_idx)%PTR%USER_NUMBER==user_number)
THEN 2354 interface=>parent_region%INTERFACES%INTERFACES(interface_idx)%PTR
2356 interface_idx=interface_idx+1
2360 local_error=
"The interfaces on parent region number "// &
2362 CALL flagerror(local_error,err,error,*999)
2366 CALL flagerror(
"Parent region is not associated.",err,error,*999)
2369 exits(
"INTERFACE_USER_NUMBER_FIND")
2371 999 errorsexits(
"INTERFACE_USER_NUMBER_FIND",err,error)
2373 END SUBROUTINE interface_user_number_find
2380 SUBROUTINE interfaces_finalise(INTERFACES,ERR,ERROR,*)
2384 INTEGER(INTG),
INTENT(OUT) :: err
2389 enters(
"INTERFACES_FINALISE",err,error,*999)
2391 IF(
ASSOCIATED(interfaces))
THEN 2392 DO WHILE(interfaces%NUMBER_OF_INTERFACES>0)
2393 interface=>interfaces%INTERFACES(1)%PTR
2394 CALL interface_destroy(interface,err,error,*999)
2396 IF(
ASSOCIATED(interfaces%INTERFACES))
DEALLOCATE(interfaces%INTERFACES)
2397 DEALLOCATE(interfaces)
2400 exits(
"INTERFACES_FINALISE")
2402 999 errorsexits(
"INTERFACES_FINALISE",err,error)
2404 END SUBROUTINE interfaces_finalise
2411 SUBROUTINE interfaces_initialise(REGION,ERR,ERROR,*)
2415 INTEGER(INTG),
INTENT(OUT) :: err
2420 enters(
"INTERFACES_INITIALISE",err,error,*998)
2422 IF(
ASSOCIATED(region))
THEN 2423 IF(
ASSOCIATED(region%INTERFACES))
THEN 2425 &
" already has interfaces associated." 2426 CALL flagerror(local_error,err,error,*999)
2428 ALLOCATE(region%INTERFACES,stat=err)
2429 IF(err/=0)
CALL flagerror(
"Could not allocate region interfaces.",err,error,*999)
2430 region%INTERFACES%PARENT_REGION=>region
2431 region%INTERFACES%NUMBER_OF_INTERFACES=0
2432 NULLIFY(region%INTERFACES%INTERFACES)
2435 CALL flagerror(
"Region is not associated.",err,error,*999)
2438 exits(
"INTERFACES_INITIALISE")
2440 999
CALL interfaces_finalise(region%INTERFACES,err,error,*998)
2441 998 errorsexits(
"INTERFACES_INITIALISE",err,error)
2443 END SUBROUTINE interfaces_initialise
2450 SUBROUTINE interfacemeshconnectivity_elementinitialise(INTERFACE,ERR,ERROR,*)
2454 INTEGER(INTG),
INTENT(OUT) :: err
2457 INTEGER(INTG) :: interfaceelementidx,coupledmeshidx
2460 enters(
"InterfaceMeshConnectivity_ElementInitialise",err,error,*999)
2462 IF(
ASSOCIATED(interface))
THEN 2463 IF(
ASSOCIATED(interface%MESH_CONNECTIVITY))
THEN 2464 IF(
ALLOCATED(interface%MESH_CONNECTIVITY%ELEMENT_CONNECTIVITY))
THEN 2465 CALL flagerror(
"Interface mesh element connectivity is already allocated.",err,error,*999)
2467 IF(interface%NUMBER_OF_COUPLED_MESHES>0)
THEN 2468 IF(interface%MESH_CONNECTIVITY%INTERFACE_MESH%NUMBER_OF_ELEMENTS>0)
THEN 2469 interface%MESH_CONNECTIVITY%NUMBER_OF_INTERFACE_ELEMENTS=interface%MESHES%MESHES(1)%PTR%NUMBER_OF_ELEMENTS
2470 interface%MESH_CONNECTIVITY%NUMBER_OF_COUPLED_MESHES=interface%NUMBER_OF_COUPLED_MESHES
2471 ALLOCATE(interface%MESH_CONNECTIVITY%ELEMENT_CONNECTIVITY(interface%MESH_CONNECTIVITY%NUMBER_OF_INTERFACE_ELEMENTS, &
2472 & interface%MESH_CONNECTIVITY%NUMBER_OF_COUPLED_MESHES),stat=err)
2473 IF(err/=0)
CALL flagerror(
"Could not allocate interface element connectivity.",err,error,*999)
2474 DO interfaceelementidx=1,interface%MESH_CONNECTIVITY%NUMBER_OF_INTERFACE_ELEMENTS
2475 DO coupledmeshidx=1,interface%MESH_CONNECTIVITY%NUMBER_OF_COUPLED_MESHES
2476 element_connectivity=>interface%MESH_CONNECTIVITY%ELEMENT_CONNECTIVITY(interfaceelementidx,coupledmeshidx)
2477 element_connectivity%COUPLED_MESH_ELEMENT_NUMBER=0
2478 element_connectivity%CONNECTED_FACE=0
2479 element_connectivity%CONNECTED_LINE=0
2485 CALL flagerror(
"Interface coupled meshes are not associated.",err,error,*999)
2488 CALL flagerror(
"Interface coupled meshes are not associated.",err,error,*999)
2492 CALL flagerror(
"Interface mesh connectivity is not associated.",err,error,*999)
2495 CALL flagerror(
"Interface is not associated.",err,error,*999)
2498 exits(
"InterfaceMeshConnectivity_ElementInitialise")
2500 999 errorsexits(
"InterfaceMeshConnectivity_ElementInitialise",err,error)
2503 END SUBROUTINE interfacemeshconnectivity_elementinitialise
2510 SUBROUTINE interfacemeshconnectivity_elementfinalise(INTERFACE_MESH_CONNECTIVITY,ERR,ERROR,*)
2514 INTEGER(INTG),
INTENT(OUT) :: err
2517 INTEGER(INTG) :: interfaceelementidx,coupledmeshidx
2519 enters(
"InterfaceMeshConnectivity_ElementFinalise",err,error,*999)
2521 DO interfaceelementidx=1,interface_mesh_connectivity%NUMBER_OF_INTERFACE_ELEMENTS
2522 DO coupledmeshidx=1,interface_mesh_connectivity%NUMBER_OF_COUPLED_MESHES
2523 IF(
ALLOCATED(interface_mesh_connectivity%ELEMENT_CONNECTIVITY))
THEN 2524 interface_mesh_connectivity%ELEMENT_CONNECTIVITY(interfaceelementidx,coupledmeshidx)%COUPLED_MESH_ELEMENT_NUMBER=0
2525 IF(
ALLOCATED(interface_mesh_connectivity%ELEMENT_CONNECTIVITY(interfaceelementidx,coupledmeshidx)%XI))
THEN 2526 DEALLOCATE(interface_mesh_connectivity%ELEMENT_CONNECTIVITY(interfaceelementidx,coupledmeshidx)%XI)
2529 CALL flagerror(
"Interface mesh connectivity element connectivity is being deallocated before allocation.", &
2535 DEALLOCATE(interface_mesh_connectivity%ELEMENT_CONNECTIVITY)
2537 exits(
"InterfaceMeshConnectivity_ElementFinalise")
2539 999 errorsexits(
"InterfaceMeshConnectivity_ElementFinalise",err,error)
2542 END SUBROUTINE interfacemeshconnectivity_elementfinalise
2548 END MODULE interface_routines
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
integer(intg), dimension(2) other_xi_directions2
OTHER_XI_DIRECTIONS2(ni) gives the other xi direction for direction ni for a two dimensional element...
Contains information for a region.
Contains information for interfaces on a parent region.
Converts a number to its equivalent varying string representation.
integer(intg), parameter no_part_deriv
No partial derivative i.e., u.
Contains information on the coupling between meshes in an interface.
Contains information on the data points defined on a region.
This module contains all string manipulation and transformation routines.
subroutine, public dataprojection_datapointsprojectionevaluate(DATA_PROJECTION, PROJECTION_FIELD, ERR, ERROR,)
Evaluates data projection.
Contains information for the interface condition data.
integer(intg), parameter, public list_intg_type
Integer data type for a list.
Contains information for a field defined on a region.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
subroutine, public list_remove_duplicates(LIST, ERR, ERROR,)
Removes duplicate entries from a list. A side effect of this is that the list is sorted.
Contains information on a coordinate system.
Detaches the list values from a list and returns them as a pointer to a array of base type before des...
subroutine, public exits(NAME)
Records the exit out of the named procedure.
Contains information about a data projection result.
This module contains all type definitions in order to avoid cyclic module references.
This module handles all data projection routines.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
integer(intg), parameter, public general_output_type
General output type.
subroutine, public list_create_finish(LIST, ERR, ERROR,)
Finishes the creation of a list created with LIST_CREATE_START.
Contains information on a list.
Contains information on a mesh defined on a region.
logical, save, public diagnostics1
.TRUE. if level 1 diagnostic output is active in the current routine
Contains the interpolated value (and the derivatives wrt xi) of a field at a point. Old CMISS name XG.
integer(intg), parameter, public diagnostic_output_type
Diagnostic output type.
Contains information on a data connectivity point.
Contains information on the nodes defined on a region.
subroutine, public list_create_start(LIST, ERR, ERROR,)
Starts the creation of a list and returns a pointer to the created list.
A buffer type to allow for an array of pointers to a INTERFACE_TYPE.
Contains information on the data point coupling/points connectivity between meshes in the an interfac...
Contains information on the mesh connectivity for a given coupled mesh element.
A buffer type to allow for an array of pointers to a MESH_TYPE.
Adds an item to the end of a list.
subroutine, public errors(NAME, ERR, ERROR)
Records the exiting error of the subroutine.
Contains information for the interface data.
Implements lists of base types.
subroutine, public list_data_type_set(LIST, DATA_TYPE, ERR, ERROR,)
Sets/changes the data type for a list.
Contains all information about a basis .
Flags an error condition.
subroutine, public list_initial_size_set(LIST, INITIAL_SIZE, ERR, ERROR,)
Sets/changes the initial size for a list.
real(dp), parameter zero_tolerance
This module contains all kind definitions.