83 INTEGER(INTG),
PARAMETER :: field_independent_type=1
84 INTEGER(INTG),
PARAMETER :: field_dependent_type=2
91 INTEGER(INTG),
PARAMETER :: field_scalar_dimension_type=1
92 INTEGER(INTG),
PARAMETER :: field_vector_dimension_type=2
93 INTEGER(INTG),
PARAMETER :: field_tensor_dimension_type=3
100 INTEGER(INTG),
PARAMETER :: field_geometric_type=1
101 INTEGER(INTG),
PARAMETER :: field_fibre_type=2
102 INTEGER(INTG),
PARAMETER :: field_general_type=3
103 INTEGER(INTG),
PARAMETER :: field_material_type=4
104 INTEGER(INTG),
PARAMETER :: field_geometric_general_type=5
111 INTEGER(INTG),
PARAMETER :: field_constant_interpolation=1
112 INTEGER(INTG),
PARAMETER :: field_element_based_interpolation=2
113 INTEGER(INTG),
PARAMETER :: field_node_based_interpolation=3
114 INTEGER(INTG),
PARAMETER :: field_grid_point_based_interpolation=4
115 INTEGER(INTG),
PARAMETER :: field_gauss_point_based_interpolation=5
116 INTEGER(INTG),
PARAMETER :: field_data_point_based_interpolation=6
124 INTEGER(INTG),
PARAMETER :: field_number_of_variable_types=48
125 INTEGER(INTG),
PARAMETER :: field_number_of_variable_subtypes=4
126 INTEGER(INTG),
PARAMETER :: field_u_variable_type=1
127 INTEGER(INTG),
PARAMETER :: field_deludeln_variable_type=2
128 INTEGER(INTG),
PARAMETER :: field_deludelt_variable_type=3
129 INTEGER(INTG),
PARAMETER :: field_del2udelt2_variable_type=4
130 INTEGER(INTG),
PARAMETER :: field_v_variable_type=5
131 INTEGER(INTG),
PARAMETER :: field_delvdeln_variable_type=6
132 INTEGER(INTG),
PARAMETER :: field_delvdelt_variable_type=7
133 INTEGER(INTG),
PARAMETER :: field_del2vdelt2_variable_type=8
134 INTEGER(INTG),
PARAMETER :: field_u1_variable_type=9
135 INTEGER(INTG),
PARAMETER :: field_delu1deln_variable_type=10
136 INTEGER(INTG),
PARAMETER :: field_delu1delt_variable_type=11
137 INTEGER(INTG),
PARAMETER :: field_del2u1delt2_variable_type=12
138 INTEGER(INTG),
PARAMETER :: field_u2_variable_type=13
139 INTEGER(INTG),
PARAMETER :: field_delu2deln_variable_type=14
140 INTEGER(INTG),
PARAMETER :: field_delu2delt_variable_type=15
141 INTEGER(INTG),
PARAMETER :: field_del2u2delt2_variable_type=16
142 INTEGER(INTG),
PARAMETER :: field_u3_variable_type=17
143 INTEGER(INTG),
PARAMETER :: field_delu3deln_variable_type=18
144 INTEGER(INTG),
PARAMETER :: field_delu3delt_variable_type=19
145 INTEGER(INTG),
PARAMETER :: field_del2u3delt2_variable_type=20
146 INTEGER(INTG),
PARAMETER :: field_u4_variable_type=21
147 INTEGER(INTG),
PARAMETER :: field_delu4deln_variable_type=22
148 INTEGER(INTG),
PARAMETER :: field_delu4delt_variable_type=23
149 INTEGER(INTG),
PARAMETER :: field_del2u4delt2_variable_type=24
150 INTEGER(INTG),
PARAMETER :: field_u5_variable_type=25
151 INTEGER(INTG),
PARAMETER :: field_delu5deln_variable_type=26
152 INTEGER(INTG),
PARAMETER :: field_delu5delt_variable_type=27
153 INTEGER(INTG),
PARAMETER :: field_del2u5delt2_variable_type=28
154 INTEGER(INTG),
PARAMETER :: field_u6_variable_type=29
155 INTEGER(INTG),
PARAMETER :: field_delu6deln_variable_type=30
156 INTEGER(INTG),
PARAMETER :: field_delu6delt_variable_type=31
157 INTEGER(INTG),
PARAMETER :: field_del2u6delt2_variable_type=32
158 INTEGER(INTG),
PARAMETER :: field_u7_variable_type=33
159 INTEGER(INTG),
PARAMETER :: field_delu7deln_variable_type=34
160 INTEGER(INTG),
PARAMETER :: field_delu7delt_variable_type=35
161 INTEGER(INTG),
PARAMETER :: field_del2u7delt2_variable_type=36
162 INTEGER(INTG),
PARAMETER :: field_u8_variable_type=37
163 INTEGER(INTG),
PARAMETER :: field_delu8deln_variable_type=38
164 INTEGER(INTG),
PARAMETER :: field_delu8delt_variable_type=39
165 INTEGER(INTG),
PARAMETER :: field_del2u8delt2_variable_type=40
166 INTEGER(INTG),
PARAMETER :: field_u9_variable_type=41
167 INTEGER(INTG),
PARAMETER :: field_delu9deln_variable_type=42
168 INTEGER(INTG),
PARAMETER :: field_delu9delt_variable_type=43
169 INTEGER(INTG),
PARAMETER :: field_del2u9delt2_variable_type=44
170 INTEGER(INTG),
PARAMETER :: field_u10_variable_type=45
171 INTEGER(INTG),
PARAMETER :: field_delu10deln_variable_type=46
172 INTEGER(INTG),
PARAMETER :: field_delu10delt_variable_type=47
173 INTEGER(INTG),
PARAMETER :: field_del2u10delt2_variable_type=48
180 INTEGER(INTG),
PARAMETER :: field_constant_dof_type=1
181 INTEGER(INTG),
PARAMETER :: field_element_dof_type=2
182 INTEGER(INTG),
PARAMETER :: field_node_dof_type=3
183 INTEGER(INTG),
PARAMETER :: field_grid_point_dof_type=4
184 INTEGER(INTG),
PARAMETER :: field_gauss_point_dof_type=5
185 INTEGER(INTG),
PARAMETER :: field_data_point_dof_type=6
192 INTEGER(INTG),
PARAMETER :: field_intg_type=1
193 INTEGER(INTG),
PARAMETER :: field_sp_type=2
194 INTEGER(INTG),
PARAMETER :: field_dp_type=3
195 INTEGER(INTG),
PARAMETER :: field_l_type=4
202 INTEGER(INTG),
PARAMETER :: field_separated_component_dof_order=1
203 INTEGER(INTG),
PARAMETER :: field_contiguous_component_dof_order=2
210 INTEGER(INTG),
PARAMETER :: field_number_of_set_types=99
211 INTEGER(INTG),
PARAMETER :: field_values_set_type=1
212 INTEGER(INTG),
PARAMETER :: field_boundary_conditions_set_type=2
213 INTEGER(INTG),
PARAMETER :: field_initial_values_set_type=3
214 INTEGER(INTG),
PARAMETER :: field_incremental_values_set_type=4
215 INTEGER(INTG),
PARAMETER :: field_analytic_values_set_type=5
216 INTEGER(INTG),
PARAMETER :: field_previous_values_set_type=6
217 INTEGER(INTG),
PARAMETER :: field_mean_predicted_displacement_set_type=7
218 INTEGER(INTG),
PARAMETER :: field_velocity_values_set_type=8
219 INTEGER(INTG),
PARAMETER :: field_initial_velocity_set_type=9
220 INTEGER(INTG),
PARAMETER :: field_previous_velocity_set_type=9
221 INTEGER(INTG),
PARAMETER :: field_mean_predicted_velocity_set_type=10
222 INTEGER(INTG),
PARAMETER :: field_acceleration_values_set_type=11
223 INTEGER(INTG),
PARAMETER :: field_initial_acceleration_set_type=12
224 INTEGER(INTG),
PARAMETER :: field_previous_acceleration_set_type=12
225 INTEGER(INTG),
PARAMETER :: field_mean_predicted_acceleration_set_type=13
226 INTEGER(INTG),
PARAMETER :: field_predicted_displacement_set_type=14
227 INTEGER(INTG),
PARAMETER :: field_predicted_velocity_set_type=15
228 INTEGER(INTG),
PARAMETER :: field_predicted_acceleration_set_type=16
229 INTEGER(INTG),
PARAMETER :: field_residual_set_type=17
230 INTEGER(INTG),
PARAMETER :: field_previous_residual_set_type=18
231 INTEGER(INTG),
PARAMETER :: field_mesh_displacement_set_type=19
232 INTEGER(INTG),
PARAMETER :: field_mesh_velocity_set_type=20
233 INTEGER(INTG),
PARAMETER :: field_boundary_set_type=21
234 INTEGER(INTG),
PARAMETER :: field_input_data1_set_type=22
235 INTEGER(INTG),
PARAMETER :: field_input_data2_set_type=23
236 INTEGER(INTG),
PARAMETER :: field_input_data3_set_type=24
237 INTEGER(INTG),
PARAMETER :: field_input_vel1_set_type=25
238 INTEGER(INTG),
PARAMETER :: field_input_vel2_set_type=26
239 INTEGER(INTG),
PARAMETER :: field_input_vel3_set_type=27
240 INTEGER(INTG),
PARAMETER :: field_input_label_set_type=28
241 INTEGER(INTG),
PARAMETER :: field_pressure_values_set_type=29
242 INTEGER(INTG),
PARAMETER :: field_previous_pressure_set_type=30
243 INTEGER(INTG),
PARAMETER :: field_relative_velocity_set_type=31
244 INTEGER(INTG),
PARAMETER :: field_negative_mesh_velocity_set_type=32
245 INTEGER(INTG),
PARAMETER :: field_previous_iteration_values_set_type=33
246 INTEGER(INTG),
PARAMETER :: field_impermeable_flag_values_set_type=34
247 INTEGER(INTG),
PARAMETER :: field_integrated_neumann_set_type=35
248 INTEGER(INTG),
PARAMETER :: field_upwind_values_set_type=36
249 INTEGER(INTG),
PARAMETER :: field_previous_upwind_values_set_type=37
256 INTEGER(INTG),
PARAMETER :: field_no_scaling=0
257 INTEGER(INTG),
PARAMETER :: field_unit_scaling=1
258 INTEGER(INTG),
PARAMETER :: field_arc_length_scaling=2
259 INTEGER(INTG),
PARAMETER :: field_arithmetic_mean_scaling=3
260 INTEGER(INTG),
PARAMETER :: field_geometric_mean_scaling=4
261 INTEGER(INTG),
PARAMETER :: field_harmonic_mean_scaling=5
268 INTEGER(INTG),
PARAMETER :: field_all_components_type=1
269 INTEGER(INTG),
PARAMETER :: field_geometric_components_type=2
270 INTEGER(INTG),
PARAMETER :: field_nongeometric_components_type=3
279 INTERFACE field_componentinterpolationcheck
280 MODULE PROCEDURE field_component_interpolation_check
281 END INTERFACE field_componentinterpolationcheck
283 INTERFACE field_componentinterpolationget
284 MODULE PROCEDURE field_component_interpolation_get
285 END INTERFACE field_componentinterpolationget
287 INTERFACE field_componentinterpolationset
288 MODULE PROCEDURE field_component_interpolation_set
289 END INTERFACE field_componentinterpolationset
291 INTERFACE field_componentinterpolationsetandlock
292 MODULE PROCEDURE field_component_interpolation_set_and_lock
293 END INTERFACE field_componentinterpolationsetandlock
296 INTERFACE field_component_label_get
297 MODULE PROCEDURE field_component_label_get_c
298 MODULE PROCEDURE field_component_label_get_vs
299 END INTERFACE field_component_label_get
302 INTERFACE field_componentlabelget
303 MODULE PROCEDURE field_component_label_get_c
304 MODULE PROCEDURE field_component_label_get_vs
305 END INTERFACE field_componentlabelget
308 INTERFACE field_component_label_set
309 MODULE PROCEDURE field_component_label_set_c
310 MODULE PROCEDURE field_component_label_set_vs
311 END INTERFACE field_component_label_set
314 INTERFACE field_componentlabelset
315 MODULE PROCEDURE field_component_label_set_c
316 MODULE PROCEDURE field_component_label_set_vs
317 END INTERFACE field_componentlabelset
320 INTERFACE field_component_label_set_and_lock
321 MODULE PROCEDURE field_component_label_set_and_lock_c
322 MODULE PROCEDURE field_component_label_set_and_lock_vs
323 END INTERFACE field_component_label_set_and_lock
326 INTERFACE field_componentlabelsetandlock
327 MODULE PROCEDURE field_component_label_set_and_lock_c
328 MODULE PROCEDURE field_component_label_set_and_lock_vs
329 END INTERFACE field_componentlabelsetandlock
331 INTERFACE field_componentmeshcomponentcheck
332 MODULE PROCEDURE field_component_mesh_component_check
333 END INTERFACE field_componentmeshcomponentcheck
335 INTERFACE field_componentmeshcomponentget
336 MODULE PROCEDURE field_component_mesh_component_get
337 END INTERFACE field_componentmeshcomponentget
339 INTERFACE field_componentmeshcomponentset
340 MODULE PROCEDURE field_component_mesh_component_set
341 END INTERFACE field_componentmeshcomponentset
343 INTERFACE field_componentmeshcomponentsetandlock
344 MODULE PROCEDURE field_component_mesh_component_set_and_lock
345 END INTERFACE field_componentmeshcomponentsetandlock
348 INTERFACE field_component_values_initialise
349 MODULE PROCEDURE field_component_values_initialise_intg
350 MODULE PROCEDURE field_component_values_initialise_sp
351 MODULE PROCEDURE field_component_values_initialise_dp
352 MODULE PROCEDURE field_component_values_initialise_l
353 END INTERFACE field_component_values_initialise
356 INTERFACE field_componentvaluesinitialise
357 MODULE PROCEDURE field_component_values_initialise_intg
358 MODULE PROCEDURE field_component_values_initialise_sp
359 MODULE PROCEDURE field_component_values_initialise_dp
360 MODULE PROCEDURE field_component_values_initialise_l
361 END INTERFACE field_componentvaluesinitialise
363 INTERFACE field_coordinatesystemget
364 MODULE PROCEDURE field_coordinate_system_get
365 END INTERFACE field_coordinatesystemget
367 INTERFACE field_createfinish
368 MODULE PROCEDURE field_create_finish
369 END INTERFACE field_createfinish
372 INTERFACE field_create_start
373 MODULE PROCEDURE field_create_start_interface
374 MODULE PROCEDURE field_create_start_region
375 END INTERFACE field_create_start
378 INTERFACE field_createstart
379 MODULE PROCEDURE field_create_start_interface
380 MODULE PROCEDURE field_create_start_region
381 END INTERFACE field_createstart
383 INTERFACE field_destroy
384 MODULE PROCEDURE field_destroy
385 END INTERFACE field_destroy
387 INTERFACE field_datatypecheck
388 MODULE PROCEDURE field_data_type_check
389 END INTERFACE field_datatypecheck
391 INTERFACE field_datatypeget
392 MODULE PROCEDURE field_data_type_get
393 END INTERFACE field_datatypeget
395 INTERFACE field_datatypeset
396 MODULE PROCEDURE field_data_type_set
397 END INTERFACE field_datatypeset
399 INTERFACE field_datatypesetandlock
400 MODULE PROCEDURE field_data_type_set_and_lock
401 END INTERFACE field_datatypesetandlock
403 INTERFACE field_dependenttypecheck
404 MODULE PROCEDURE field_dependent_type_check
405 END INTERFACE field_dependenttypecheck
407 INTERFACE field_dependenttypeget
408 MODULE PROCEDURE field_dependent_type_get
409 END INTERFACE field_dependenttypeget
411 INTERFACE field_dependenttypeset
412 MODULE PROCEDURE field_dependent_type_set
413 END INTERFACE field_dependenttypeset
415 INTERFACE field_dependenttypesetandlock
416 MODULE PROCEDURE field_dependent_type_set_and_lock
417 END INTERFACE field_dependenttypesetandlock
419 INTERFACE field_dimensioncheck
420 MODULE PROCEDURE field_dimension_check
421 END INTERFACE field_dimensioncheck
423 INTERFACE field_dimensionget
424 MODULE PROCEDURE field_dimension_get
425 END INTERFACE field_dimensionget
427 INTERFACE field_dimensionset
428 MODULE PROCEDURE field_dimension_set
429 END INTERFACE field_dimensionset
431 INTERFACE field_dimensionsetandlock
432 MODULE PROCEDURE field_dimension_set_and_lock
433 END INTERFACE field_dimensionsetandlock
435 INTERFACE field_dofordertypecheck
436 MODULE PROCEDURE field_dof_order_type_check
437 END INTERFACE field_dofordertypecheck
439 INTERFACE field_dofordertypeget
440 MODULE PROCEDURE field_dof_order_type_get
441 END INTERFACE field_dofordertypeget
443 INTERFACE field_dofordertypeset
444 MODULE PROCEDURE field_dof_order_type_set
445 END INTERFACE field_dofordertypeset
447 INTERFACE field_dofordertypesetandlock
448 MODULE PROCEDURE field_dof_order_type_set_and_lock
449 END INTERFACE field_dofordertypesetandlock
451 INTERFACE field_geometricfieldget
452 MODULE PROCEDURE field_geometric_field_get
453 END INTERFACE field_geometricfieldget
455 INTERFACE field_geometricfieldset
456 MODULE PROCEDURE field_geometric_field_set
457 END INTERFACE field_geometricfieldset
459 INTERFACE field_geometricfieldsetandlock
460 MODULE PROCEDURE field_geometric_field_set_and_lock
461 END INTERFACE field_geometricfieldsetandlock
463 INTERFACE field_interpolategauss
464 MODULE PROCEDURE field_interpolate_gauss
465 END INTERFACE field_interpolategauss
467 INTERFACE field_interpolatexi
468 MODULE PROCEDURE field_interpolate_xi
469 END INTERFACE field_interpolatexi
471 INTERFACE field_interpolatenode
472 MODULE PROCEDURE field_interpolate_node
473 END INTERFACE field_interpolatenode
475 INTERFACE field_interpolatefieldnode
476 MODULE PROCEDURE field_interpolate_field_node
477 END INTERFACE field_interpolatefieldnode
479 INTERFACE field_interpolatelocalfacegauss
480 MODULE PROCEDURE field_interpolate_local_face_gauss
481 END INTERFACE field_interpolatelocalfacegauss
483 INTERFACE field_interpolatedpointmetricscalculate
484 MODULE PROCEDURE field_interpolated_point_metrics_calculate
485 END INTERFACE field_interpolatedpointmetricscalculate
487 INTERFACE field_interpolatedpointsfinalise
488 MODULE PROCEDURE field_interpolated_points_finalise
489 END INTERFACE field_interpolatedpointsfinalise
491 INTERFACE field_interpolatedpointsinitialise
492 MODULE PROCEDURE field_interpolated_points_initialise
493 END INTERFACE field_interpolatedpointsinitialise
495 INTERFACE field_interpolationparameterselementget
496 MODULE PROCEDURE field_interpolation_parameters_element_get
497 END INTERFACE field_interpolationparameterselementget
499 INTERFACE field_interpolationparametersfinalise
500 MODULE PROCEDURE field_interpolation_parameters_finalise
501 END INTERFACE field_interpolationparametersfinalise
503 INTERFACE field_interpolationparametersinitialise
504 MODULE PROCEDURE field_interpolation_parameters_initialise
505 END INTERFACE field_interpolationparametersinitialise
507 INTERFACE field_interpolationparametersfaceget
508 MODULE PROCEDURE field_interpolation_parameters_face_get
509 END INTERFACE field_interpolationparametersfaceget
511 INTERFACE field_interpolationparameterslineget
512 MODULE PROCEDURE field_interpolation_parameters_line_get
513 END INTERFACE field_interpolationparameterslineget
516 INTERFACE field_label_get
517 MODULE PROCEDURE field_label_get_c
518 MODULE PROCEDURE field_label_get_vs
519 END INTERFACE field_label_get
522 INTERFACE field_labelget
523 MODULE PROCEDURE field_label_get_c
524 MODULE PROCEDURE field_label_get_vs
525 END INTERFACE field_labelget
528 INTERFACE field_label_set
529 MODULE PROCEDURE field_label_set_c
530 MODULE PROCEDURE field_label_set_vs
531 END INTERFACE field_label_set
534 INTERFACE field_labelset
535 MODULE PROCEDURE field_label_set_c
536 MODULE PROCEDURE field_label_set_vs
537 END INTERFACE field_labelset
540 INTERFACE field_label_set_and_lock
541 MODULE PROCEDURE field_label_set_and_lock_c
542 MODULE PROCEDURE field_label_set_and_lock_vs
543 END INTERFACE field_label_set_and_lock
546 INTERFACE field_labelsetandlock
547 MODULE PROCEDURE field_label_set_and_lock_c
548 MODULE PROCEDURE field_label_set_and_lock_vs
549 END INTERFACE field_labelsetandlock
551 INTERFACE field_meshdecompositionget
552 MODULE PROCEDURE field_mesh_decomposition_get
553 END INTERFACE field_meshdecompositionget
555 INTERFACE field_meshdecompositionset
556 MODULE PROCEDURE field_mesh_decomposition_set
557 END INTERFACE field_meshdecompositionset
559 INTERFACE field_meshdecompositionsetandlock
560 MODULE PROCEDURE field_mesh_decomposition_set_and_lock
561 END INTERFACE field_meshdecompositionsetandlock
563 INTERFACE field_numberofcomponentscheck
564 MODULE PROCEDURE field_number_of_components_check
565 END INTERFACE field_numberofcomponentscheck
567 INTERFACE field_numberofcomponentsget
568 MODULE PROCEDURE field_number_of_components_get
569 END INTERFACE field_numberofcomponentsget
571 INTERFACE field_numberofcomponentsset
572 MODULE PROCEDURE field_number_of_components_set
573 END INTERFACE field_numberofcomponentsset
575 INTERFACE field_numberofcomponentssetandlock
576 MODULE PROCEDURE field_number_of_components_set_and_lock
577 END INTERFACE field_numberofcomponentssetandlock
579 INTERFACE field_numberofvariablescheck
580 MODULE PROCEDURE field_number_of_variables_check
581 END INTERFACE field_numberofvariablescheck
583 INTERFACE field_numberofvariablesget
584 MODULE PROCEDURE field_number_of_variables_get
585 END INTERFACE field_numberofvariablesget
587 INTERFACE field_numberofvariablesset
588 MODULE PROCEDURE field_number_of_variables_set
589 END INTERFACE field_numberofvariablesset
591 INTERFACE field_numberofvariablessetandlock
592 MODULE PROCEDURE field_number_of_variables_set_and_lock
593 END INTERFACE field_numberofvariablessetandlock
596 INTERFACE field_parameter_sets_add
597 MODULE PROCEDURE field_parameter_sets_add_dp
598 MODULE PROCEDURE field_parameter_sets_add_dp1
599 END INTERFACE field_parameter_sets_add
602 INTERFACE field_parametersetsadd
603 MODULE PROCEDURE field_parameter_sets_add_dp
604 MODULE PROCEDURE field_parameter_sets_add_dp1
605 END INTERFACE field_parametersetsadd
607 INTERFACE field_parametersetscopy
608 MODULE PROCEDURE field_parameter_sets_copy
609 END INTERFACE field_parametersetscopy
611 INTERFACE field_parametersetdestroy
612 MODULE PROCEDURE field_parameter_set_destroy
613 END INTERFACE field_parametersetdestroy
615 INTERFACE field_parametersetget
616 MODULE PROCEDURE field_parameter_set_get
617 END INTERFACE field_parametersetget
620 INTERFACE field_parameter_set_add_constant
621 MODULE PROCEDURE field_parameter_set_add_constant_intg
622 MODULE PROCEDURE field_parameter_set_add_constant_sp
623 MODULE PROCEDURE field_parameter_set_add_constant_dp
624 MODULE PROCEDURE field_parameter_set_add_constant_l
625 END INTERFACE field_parameter_set_add_constant
628 INTERFACE field_parametersetaddconstant
629 MODULE PROCEDURE field_parameter_set_add_constant_intg
630 MODULE PROCEDURE field_parameter_set_add_constant_sp
631 MODULE PROCEDURE field_parameter_set_add_constant_dp
632 MODULE PROCEDURE field_parameter_set_add_constant_l
633 END INTERFACE field_parametersetaddconstant
636 INTERFACE field_parameter_set_add_local_dof
637 MODULE PROCEDURE field_parameter_set_add_local_dof_intg
638 MODULE PROCEDURE field_parameter_set_add_local_dof_sp
639 MODULE PROCEDURE field_parameter_set_add_local_dof_dp
640 MODULE PROCEDURE field_parameter_set_add_local_dof_l
641 END INTERFACE field_parameter_set_add_local_dof
644 INTERFACE field_parametersetaddlocaldof
645 MODULE PROCEDURE field_parameter_set_add_local_dof_intg
646 MODULE PROCEDURE field_parameter_set_add_local_dof_sp
647 MODULE PROCEDURE field_parameter_set_add_local_dof_dp
648 MODULE PROCEDURE field_parameter_set_add_local_dof_l
649 END INTERFACE field_parametersetaddlocaldof
652 INTERFACE field_parameter_set_add_element
653 MODULE PROCEDURE field_parameter_set_add_element_intg
654 MODULE PROCEDURE field_parameter_set_add_element_sp
655 MODULE PROCEDURE field_parameter_set_add_element_dp
656 MODULE PROCEDURE field_parameter_set_add_element_l
657 END INTERFACE field_parameter_set_add_element
660 INTERFACE field_parametersetaddelement
661 MODULE PROCEDURE field_parameter_set_add_element_intg
662 MODULE PROCEDURE field_parameter_set_add_element_sp
663 MODULE PROCEDURE field_parameter_set_add_element_dp
664 MODULE PROCEDURE field_parameter_set_add_element_l
665 END INTERFACE field_parametersetaddelement
668 INTERFACE field_parameter_set_add_local_element
669 MODULE PROCEDURE field_parameter_set_add_local_element_intg
670 MODULE PROCEDURE field_parameter_set_add_local_element_sp
671 MODULE PROCEDURE field_parameter_set_add_local_element_dp
672 MODULE PROCEDURE field_parameter_set_add_local_element_l
673 END INTERFACE field_parameter_set_add_local_element
676 INTERFACE field_parametersetaddlocalelement
677 MODULE PROCEDURE field_parameter_set_add_local_element_intg
678 MODULE PROCEDURE field_parameter_set_add_local_element_sp
679 MODULE PROCEDURE field_parameter_set_add_local_element_dp
680 MODULE PROCEDURE field_parameter_set_add_local_element_l
681 END INTERFACE field_parametersetaddlocalelement
684 INTERFACE field_parameter_set_add_node
685 MODULE PROCEDURE field_parameter_set_add_node_intg
686 MODULE PROCEDURE field_parameter_set_add_node_sp
687 MODULE PROCEDURE field_parameter_set_add_node_dp
688 MODULE PROCEDURE field_parameter_set_add_node_l
689 END INTERFACE field_parameter_set_add_node
692 INTERFACE field_parametersetaddnode
693 MODULE PROCEDURE field_parameter_set_add_node_intg
694 MODULE PROCEDURE field_parameter_set_add_node_sp
695 MODULE PROCEDURE field_parameter_set_add_node_dp
696 MODULE PROCEDURE field_parameter_set_add_node_l
697 END INTERFACE field_parametersetaddnode
700 INTERFACE field_parameter_set_add_local_node
701 MODULE PROCEDURE field_parameter_set_add_local_node_intg
702 MODULE PROCEDURE field_parameter_set_add_local_node_sp
703 MODULE PROCEDURE field_parameter_set_add_local_node_dp
704 MODULE PROCEDURE field_parameter_set_add_local_node_l
705 END INTERFACE field_parameter_set_add_local_node
708 INTERFACE field_parametersetaddlocalnode
709 MODULE PROCEDURE field_parameter_set_add_local_node_intg
710 MODULE PROCEDURE field_parameter_set_add_local_node_sp
711 MODULE PROCEDURE field_parameter_set_add_local_node_dp
712 MODULE PROCEDURE field_parameter_set_add_local_node_l
713 END INTERFACE field_parametersetaddlocalnode
715 INTERFACE field_parametersetcreate
716 MODULE PROCEDURE field_parameter_set_create
717 END INTERFACE field_parametersetcreate
719 INTERFACE field_parametersetcreated
720 MODULE PROCEDURE field_parameter_set_created
721 END INTERFACE field_parametersetcreated
724 INTERFACE field_parameter_set_data_get
725 MODULE PROCEDURE field_parameter_set_data_get_intg
726 MODULE PROCEDURE field_parameter_set_data_get_sp
727 MODULE PROCEDURE field_parameter_set_data_get_dp
728 MODULE PROCEDURE field_parameter_set_data_get_l
729 END INTERFACE field_parameter_set_data_get
732 INTERFACE field_parametersetdataget
733 MODULE PROCEDURE field_parameter_set_data_get_intg
734 MODULE PROCEDURE field_parameter_set_data_get_sp
735 MODULE PROCEDURE field_parameter_set_data_get_dp
736 MODULE PROCEDURE field_parameter_set_data_get_l
737 END INTERFACE field_parametersetdataget
740 INTERFACE field_parameter_set_data_restore
741 MODULE PROCEDURE field_parameter_set_data_restore_intg
742 MODULE PROCEDURE field_parameter_set_data_restore_sp
743 MODULE PROCEDURE field_parameter_set_data_restore_dp
744 MODULE PROCEDURE field_parameter_set_data_restore_l
745 END INTERFACE field_parameter_set_data_restore
748 INTERFACE field_parametersetdatarestore
749 MODULE PROCEDURE field_parameter_set_data_restore_intg
750 MODULE PROCEDURE field_parameter_set_data_restore_sp
751 MODULE PROCEDURE field_parameter_set_data_restore_dp
752 MODULE PROCEDURE field_parameter_set_data_restore_l
753 END INTERFACE field_parametersetdatarestore
756 INTERFACE field_parameter_set_get_constant
757 MODULE PROCEDURE field_parameter_set_get_constant_intg
758 MODULE PROCEDURE field_parameter_set_get_constant_sp
759 MODULE PROCEDURE field_parameter_set_get_constant_dp
760 MODULE PROCEDURE field_parameter_set_get_constant_l
761 END INTERFACE field_parameter_set_get_constant
764 INTERFACE field_parametersetgetconstant
765 MODULE PROCEDURE field_parameter_set_get_constant_intg
766 MODULE PROCEDURE field_parameter_set_get_constant_sp
767 MODULE PROCEDURE field_parameter_set_get_constant_dp
768 MODULE PROCEDURE field_parameter_set_get_constant_l
769 END INTERFACE field_parametersetgetconstant
772 INTERFACE field_parametersetgetdatapoint
773 MODULE PROCEDURE field_parametersetgetdatapointintg
774 MODULE PROCEDURE field_parametersetgetdatapointsp
775 MODULE PROCEDURE field_parametersetgetdatapointdp
776 MODULE PROCEDURE field_parametersetgetdatapointl
777 END INTERFACE field_parametersetgetdatapoint
780 INTERFACE field_parameter_set_get_element
781 MODULE PROCEDURE field_parameter_set_get_element_intg
782 MODULE PROCEDURE field_parameter_set_get_element_sp
783 MODULE PROCEDURE field_parameter_set_get_element_dp
784 MODULE PROCEDURE field_parameter_set_get_element_l
785 END INTERFACE field_parameter_set_get_element
788 INTERFACE field_parametersetgetelement
789 MODULE PROCEDURE field_parameter_set_get_element_intg
790 MODULE PROCEDURE field_parameter_set_get_element_sp
791 MODULE PROCEDURE field_parameter_set_get_element_dp
792 MODULE PROCEDURE field_parameter_set_get_element_l
793 END INTERFACE field_parametersetgetelement
796 INTERFACE field_parameter_set_get_local_dof
797 MODULE PROCEDURE field_parameter_set_get_local_dof_intg
798 MODULE PROCEDURE field_parameter_set_get_local_dof_sp
799 MODULE PROCEDURE field_parameter_set_get_local_dof_dp
800 MODULE PROCEDURE field_parameter_set_get_local_dof_l
801 END INTERFACE field_parameter_set_get_local_dof
804 INTERFACE field_parametersetgetlocaldof
805 MODULE PROCEDURE field_parameter_set_get_local_dof_intg
806 MODULE PROCEDURE field_parameter_set_get_local_dof_sp
807 MODULE PROCEDURE field_parameter_set_get_local_dof_dp
808 MODULE PROCEDURE field_parameter_set_get_local_dof_l
809 END INTERFACE field_parametersetgetlocaldof
812 INTERFACE field_parameter_set_get_node
813 MODULE PROCEDURE field_parameter_set_get_node_intg
814 MODULE PROCEDURE field_parameter_set_get_node_sp
815 MODULE PROCEDURE field_parameter_set_get_node_dp
816 MODULE PROCEDURE field_parameter_set_get_node_l
817 END INTERFACE field_parameter_set_get_node
820 INTERFACE field_parametersetgetnode
821 MODULE PROCEDURE field_parameter_set_get_node_intg
822 MODULE PROCEDURE field_parameter_set_get_node_sp
823 MODULE PROCEDURE field_parameter_set_get_node_dp
824 MODULE PROCEDURE field_parameter_set_get_node_l
825 END INTERFACE field_parametersetgetnode
828 INTERFACE field_parametersetgetlocalnode
829 MODULE PROCEDURE field_parametersetgetlocalnode_intg
830 MODULE PROCEDURE field_parametersetgetlocalnode_sp
831 MODULE PROCEDURE field_parametersetgetlocalnode_dp
832 MODULE PROCEDURE field_parametersetgetlocalnode_l
833 END INTERFACE field_parametersetgetlocalnode
836 INTERFACE field_parametersetgetlocalelement
837 MODULE PROCEDURE field_parametersetgetlocalelement_intg
838 MODULE PROCEDURE field_parametersetgetlocalelement_sp
839 MODULE PROCEDURE field_parametersetgetlocalelement_dp
840 MODULE PROCEDURE field_parametersetgetlocalelement_l
841 END INTERFACE field_parametersetgetlocalelement
844 INTERFACE field_parametersetgetgausspoint
845 MODULE PROCEDURE field_parametersetgetgausspointdp
846 END INTERFACE field_parametersetgetgausspoint
849 INTERFACE field_parameter_set_get_gauss_point
850 MODULE PROCEDURE field_parametersetgetgausspointdp
851 END INTERFACE field_parameter_set_get_gauss_point
854 INTERFACE field_parametersetgetlocalgausspoint
855 MODULE PROCEDURE field_parametersetgetlocalgausspointdp
856 END INTERFACE field_parametersetgetlocalgausspoint
858 INTERFACE field_parametersetoutput
859 MODULE PROCEDURE field_parameter_set_output
860 END INTERFACE field_parametersetoutput
862 INTERFACE field_parametersetupdatefinish
863 MODULE PROCEDURE field_parameter_set_update_finish
864 END INTERFACE field_parametersetupdatefinish
866 INTERFACE field_parametersetupdatestart
867 MODULE PROCEDURE field_parameter_set_update_start
868 END INTERFACE field_parametersetupdatestart
871 INTERFACE field_parameter_set_update_constant
872 MODULE PROCEDURE field_parameter_set_update_constant_intg
873 MODULE PROCEDURE field_parameter_set_update_constant_sp
874 MODULE PROCEDURE field_parameter_set_update_constant_dp
875 MODULE PROCEDURE field_parameter_set_update_constant_l
876 END INTERFACE field_parameter_set_update_constant
879 INTERFACE field_parametersetupdateconstant
880 MODULE PROCEDURE field_parameter_set_update_constant_intg
881 MODULE PROCEDURE field_parameter_set_update_constant_sp
882 MODULE PROCEDURE field_parameter_set_update_constant_dp
883 MODULE PROCEDURE field_parameter_set_update_constant_l
884 END INTERFACE field_parametersetupdateconstant
887 INTERFACE field_parametersetupdatedatapoint
888 MODULE PROCEDURE field_parametersetupdatedatapointintg
889 MODULE PROCEDURE field_parametersetupdatedatapointsp
890 MODULE PROCEDURE field_parametersetupdatedatapointdp
891 MODULE PROCEDURE field_parametersetupdatedatapointl
892 END INTERFACE field_parametersetupdatedatapoint
895 INTERFACE field_parameter_set_update_local_dof
896 MODULE PROCEDURE field_parameter_set_update_local_dof_intg
897 MODULE PROCEDURE field_parameter_set_update_local_dof_sp
898 MODULE PROCEDURE field_parameter_set_update_local_dof_dp
899 MODULE PROCEDURE field_parameter_set_update_local_dof_l
900 END INTERFACE field_parameter_set_update_local_dof
903 INTERFACE field_parametersetupdatelocaldof
904 MODULE PROCEDURE field_parameter_set_update_local_dof_intg
905 MODULE PROCEDURE field_parameter_set_update_local_dof_sp
906 MODULE PROCEDURE field_parameter_set_update_local_dof_dp
907 MODULE PROCEDURE field_parameter_set_update_local_dof_l
908 END INTERFACE field_parametersetupdatelocaldof
911 INTERFACE field_parameter_set_update_local_dofs
912 MODULE PROCEDURE field_parameter_set_update_local_dofs_dp
913 END INTERFACE field_parameter_set_update_local_dofs
916 INTERFACE field_parametersetupdatelocaldofs
917 MODULE PROCEDURE field_parameter_set_update_local_dofs_dp
918 END INTERFACE field_parametersetupdatelocaldofs
921 INTERFACE field_parameter_set_update_element
922 MODULE PROCEDURE field_parameter_set_update_element_intg
923 MODULE PROCEDURE field_parameter_set_update_element_sp
924 MODULE PROCEDURE field_parameter_set_update_element_dp
925 MODULE PROCEDURE field_parameter_set_update_element_l
926 END INTERFACE field_parameter_set_update_element
929 INTERFACE field_parametersetupdateelement
930 MODULE PROCEDURE field_parameter_set_update_element_intg
931 MODULE PROCEDURE field_parameter_set_update_element_sp
932 MODULE PROCEDURE field_parameter_set_update_element_dp
933 MODULE PROCEDURE field_parameter_set_update_element_l
934 END INTERFACE field_parametersetupdateelement
937 INTERFACE field_parameter_set_update_local_element
938 MODULE PROCEDURE field_parametersetupdatelocalelementintg
939 MODULE PROCEDURE field_parameter_set_update_local_element_sp
940 MODULE PROCEDURE field_parameter_set_update_local_element_dp
941 MODULE PROCEDURE field_parameter_set_update_local_element_l
942 END INTERFACE field_parameter_set_update_local_element
945 INTERFACE field_parametersetupdatelocalelement
946 MODULE PROCEDURE field_parametersetupdatelocalelementintg
947 MODULE PROCEDURE field_parameter_set_update_local_element_sp
948 MODULE PROCEDURE field_parameter_set_update_local_element_dp
949 MODULE PROCEDURE field_parameter_set_update_local_element_l
950 END INTERFACE field_parametersetupdatelocalelement
953 INTERFACE field_parameter_set_update_node
954 MODULE PROCEDURE field_parameter_set_update_node_intg
955 MODULE PROCEDURE field_parameter_set_update_node_sp
956 MODULE PROCEDURE field_parameter_set_update_node_dp
957 MODULE PROCEDURE field_parameter_set_update_node_l
958 END INTERFACE field_parameter_set_update_node
961 INTERFACE field_parametersetupdatenode
962 MODULE PROCEDURE field_parameter_set_update_node_intg
963 MODULE PROCEDURE field_parameter_set_update_node_sp
964 MODULE PROCEDURE field_parameter_set_update_node_dp
965 MODULE PROCEDURE field_parameter_set_update_node_l
966 END INTERFACE field_parametersetupdatenode
969 INTERFACE field_parameter_set_update_local_node
970 MODULE PROCEDURE field_parameter_set_update_local_node_intg
971 MODULE PROCEDURE field_parameter_set_update_local_node_sp
972 MODULE PROCEDURE field_parameter_set_update_local_node_dp
973 MODULE PROCEDURE field_parameter_set_update_local_node_l
974 END INTERFACE field_parameter_set_update_local_node
977 INTERFACE field_parametersetupdatelocalnode
978 MODULE PROCEDURE field_parameter_set_update_local_node_intg
979 MODULE PROCEDURE field_parameter_set_update_local_node_sp
980 MODULE PROCEDURE field_parameter_set_update_local_node_dp
981 MODULE PROCEDURE field_parameter_set_update_local_node_l
982 END INTERFACE field_parametersetupdatelocalnode
985 INTERFACE field_parametersetupdategausspoint
986 MODULE PROCEDURE field_parametersetupdategausspointintg
987 MODULE PROCEDURE field_parametersetupdategausspointsp
988 MODULE PROCEDURE field_parametersetupdategausspointdp
989 MODULE PROCEDURE field_parametersetupdategausspointl
990 END INTERFACE field_parametersetupdategausspoint
993 INTERFACE field_parameter_set_update_gauss_point
994 MODULE PROCEDURE field_parametersetupdategausspointintg
995 MODULE PROCEDURE field_parametersetupdategausspointsp
996 MODULE PROCEDURE field_parametersetupdategausspointdp
997 MODULE PROCEDURE field_parametersetupdategausspointl
998 END INTERFACE field_parameter_set_update_gauss_point
1001 INTERFACE field_parametersetupdatelocalgausspoint
1002 MODULE PROCEDURE field_parametersetupdatelocalgausspointdp
1003 END INTERFACE field_parametersetupdatelocalgausspoint
1006 INTERFACE field_parametersetupdateelementdatapoint
1007 MODULE PROCEDURE field_parametersetupdateelementdatapointdp
1008 END INTERFACE field_parametersetupdateelementdatapoint
1011 INTERFACE field_parameter_set_interpolate_single_xi
1012 MODULE PROCEDURE field_parametersetinterpolatesinglexidp
1013 END INTERFACE field_parameter_set_interpolate_single_xi
1016 INTERFACE field_parametersetinterpolatesinglexi
1017 MODULE PROCEDURE field_parametersetinterpolatesinglexidp
1018 END INTERFACE field_parametersetinterpolatesinglexi
1021 INTERFACE field_parameter_set_interpolate_multiple_xi
1022 MODULE PROCEDURE field_parametersetinterpolatemultiplexidp
1023 END INTERFACE field_parameter_set_interpolate_multiple_xi
1026 INTERFACE field_parametersetinterpolatemultiplexi
1027 MODULE PROCEDURE field_parametersetinterpolatemultiplexidp
1028 END INTERFACE field_parametersetinterpolatemultiplexi
1031 INTERFACE field_parameter_set_interpolate_single_gauss
1032 MODULE PROCEDURE field_parametersetinterpolatesinglegaussdp
1033 END INTERFACE field_parameter_set_interpolate_single_gauss
1036 INTERFACE field_parametersetinterpolatesinglegauss
1037 MODULE PROCEDURE field_parametersetinterpolatesinglegaussdp
1038 END INTERFACE field_parametersetinterpolatesinglegauss
1041 INTERFACE field_parameter_set_interpolate_multiple_gauss
1042 MODULE PROCEDURE field_parametersetinterpolatemultiplegaussdp
1043 END INTERFACE field_parameter_set_interpolate_multiple_gauss
1046 INTERFACE field_parametersetinterpoaltemultiplegauss
1047 MODULE PROCEDURE field_parametersetinterpolatemultiplegaussdp
1048 END INTERFACE field_parametersetinterpoaltemultiplegauss
1050 INTERFACE field_parametersetvectorget
1051 MODULE PROCEDURE field_parameter_set_vector_get
1052 END INTERFACE field_parametersetvectorget
1054 INTERFACE field_physicalpointsfinalise
1055 MODULE PROCEDURE field_physical_points_finalise
1056 END INTERFACE field_physicalpointsfinalise
1058 INTERFACE field_physicalpointsinitialise
1059 MODULE PROCEDURE field_physical_points_initialise
1060 END INTERFACE field_physicalpointsinitialise
1062 INTERFACE field_regionget
1063 MODULE PROCEDURE field_region_get
1064 END INTERFACE field_regionget
1066 INTERFACE field_scalingtypecheck
1067 MODULE PROCEDURE field_scaling_type_check
1068 END INTERFACE field_scalingtypecheck
1070 INTERFACE field_scalingtypeget
1071 MODULE PROCEDURE field_scaling_type_get
1072 END INTERFACE field_scalingtypeget
1074 INTERFACE field_scalingtypeset
1075 MODULE PROCEDURE field_scaling_type_set
1076 END INTERFACE field_scalingtypeset
1078 INTERFACE field_scalingtypesetandlock
1079 MODULE PROCEDURE field_scaling_type_set_and_lock
1080 END INTERFACE field_scalingtypesetandlock
1082 INTERFACE field_typecheck
1083 MODULE PROCEDURE field_type_check
1084 END INTERFACE field_typecheck
1086 INTERFACE field_typeget
1087 MODULE PROCEDURE field_type_get
1088 END INTERFACE field_typeget
1090 INTERFACE field_typeset
1091 MODULE PROCEDURE field_type_set
1092 END INTERFACE field_typeset
1094 INTERFACE field_typesetandlock
1095 MODULE PROCEDURE field_type_set_and_lock
1096 END INTERFACE field_typesetandlock
1099 INTERFACE field_user_number_find
1100 MODULE PROCEDURE field_user_number_find_interface
1101 MODULE PROCEDURE field_user_number_find_region
1102 END INTERFACE field_user_number_find
1105 INTERFACE field_usernumberfind
1106 MODULE PROCEDURE field_user_number_find_interface
1107 MODULE PROCEDURE field_user_number_find_region
1108 END INTERFACE field_usernumberfind
1111 INTERFACE field_user_number_to_field
1112 MODULE PROCEDURE field_user_number_to_field_interface
1113 MODULE PROCEDURE field_user_number_to_field_region
1114 END INTERFACE field_user_number_to_field
1117 INTERFACE field_usernumbertofield
1118 MODULE PROCEDURE field_user_number_to_field_interface
1119 MODULE PROCEDURE field_user_number_to_field_region
1120 END INTERFACE field_usernumbertofield
1122 INTERFACE field_variableget
1123 MODULE PROCEDURE field_variable_get
1124 END INTERFACE field_variableget
1127 INTERFACE field_variable_label_get
1128 MODULE PROCEDURE field_variable_label_get_c
1129 MODULE PROCEDURE field_variable_label_get_vs
1130 END INTERFACE field_variable_label_get
1133 INTERFACE field_variablelabelget
1134 MODULE PROCEDURE field_variable_label_get_c
1135 MODULE PROCEDURE field_variable_label_get_vs
1136 END INTERFACE field_variablelabelget
1139 INTERFACE field_variable_label_set
1140 MODULE PROCEDURE field_variable_label_set_c
1141 MODULE PROCEDURE field_variable_label_set_vs
1142 END INTERFACE field_variable_label_set
1145 INTERFACE field_variablelabelset
1146 MODULE PROCEDURE field_variable_label_set_c
1147 MODULE PROCEDURE field_variable_label_set_vs
1148 END INTERFACE field_variablelabelset
1151 INTERFACE field_variable_label_set_and_lock
1152 MODULE PROCEDURE field_variable_label_set_and_lock_c
1153 MODULE PROCEDURE field_variable_label_set_and_lock_vs
1154 END INTERFACE field_variable_label_set_and_lock
1157 INTERFACE field_variablelabelsetandlock
1158 MODULE PROCEDURE field_variable_label_set_and_lock_c
1159 MODULE PROCEDURE field_variable_label_set_and_lock_vs
1160 END INTERFACE field_variablelabelsetandlock
1162 INTERFACE field_variabletypecheck
1163 MODULE PROCEDURE field_variable_type_check
1164 END INTERFACE field_variabletypecheck
1166 INTERFACE field_variabletypescheck
1167 MODULE PROCEDURE field_variable_types_check
1168 END INTERFACE field_variabletypescheck
1170 INTERFACE field_variabletypesget
1171 MODULE PROCEDURE field_variable_types_get
1172 END INTERFACE field_variabletypesget
1174 INTERFACE field_variabletypesset
1175 MODULE PROCEDURE field_variable_types_set
1176 END INTERFACE field_variabletypesset
1178 INTERFACE field_variabletypessetandlock
1179 MODULE PROCEDURE field_variable_types_set_and_lock
1180 END INTERFACE field_variabletypessetandlock
1183 INTERFACE fields_initialise
1184 MODULE PROCEDURE fields_initialise_interface
1185 MODULE PROCEDURE fields_initialise_region
1186 END INTERFACE fields_initialise
1188 PUBLIC field_independent_type,field_dependent_type
1190 PUBLIC field_scalar_dimension_type,field_vector_dimension_type,field_tensor_dimension_type
1192 PUBLIC field_geometric_type,field_fibre_type,field_general_type,field_material_type,field_geometric_general_type
1194 PUBLIC field_constant_interpolation,field_element_based_interpolation,field_node_based_interpolation, &
1195 & field_grid_point_based_interpolation,field_gauss_point_based_interpolation,field_data_point_based_interpolation
1197 PUBLIC field_constant_dof_type,field_element_dof_type,field_node_dof_type,field_grid_point_dof_type,field_gauss_point_dof_type, &
1198 & field_data_point_dof_type
1200 PUBLIC field_number_of_variable_types,field_number_of_variable_subtypes,field_number_of_set_types, &
1201 & field_u_variable_type,field_deludeln_variable_type,field_deludelt_variable_type, &
1202 & field_del2udelt2_variable_type,field_v_variable_type,field_delvdeln_variable_type,field_delvdelt_variable_type, &
1203 & field_del2vdelt2_variable_type,&
1204 & field_u1_variable_type,field_delu1deln_variable_type,field_delu1delt_variable_type,field_del2u1delt2_variable_type,&
1205 & field_u2_variable_type,field_delu2deln_variable_type,field_delu2delt_variable_type,field_del2u2delt2_variable_type,&
1206 & field_u3_variable_type,field_delu3deln_variable_type,field_delu3delt_variable_type,field_del2u3delt2_variable_type,&
1207 & field_u4_variable_type,field_delu4deln_variable_type,field_delu4delt_variable_type,field_del2u4delt2_variable_type,&
1208 & field_u5_variable_type,field_delu5deln_variable_type,field_delu5delt_variable_type,field_del2u5delt2_variable_type,&
1209 & field_u6_variable_type,field_delu6deln_variable_type,field_delu6delt_variable_type,field_del2u6delt2_variable_type,&
1210 & field_u7_variable_type,field_delu7deln_variable_type,field_delu7delt_variable_type,field_del2u7delt2_variable_type,&
1211 & field_u8_variable_type,field_delu8deln_variable_type,field_delu8delt_variable_type,field_del2u8delt2_variable_type,&
1212 & field_u9_variable_type,field_delu9deln_variable_type,field_delu9delt_variable_type,field_del2u9delt2_variable_type,&
1213 & field_u10_variable_type,field_delu10deln_variable_type,field_delu10delt_variable_type,field_del2u10delt2_variable_type
1215 PUBLIC field_intg_type,field_sp_type,field_dp_type,field_l_type
1217 PUBLIC field_separated_component_dof_order,field_contiguous_component_dof_order
1219 PUBLIC field_values_set_type,field_boundary_conditions_set_type,field_initial_values_set_type,field_incremental_values_set_type, &
1220 & field_analytic_values_set_type,field_previous_values_set_type,field_mean_predicted_displacement_set_type, &
1221 & field_velocity_values_set_type,field_initial_velocity_set_type,field_previous_velocity_set_type, &
1222 & field_mean_predicted_velocity_set_type,field_acceleration_values_set_type,field_initial_acceleration_set_type, &
1223 & field_previous_acceleration_set_type,field_mean_predicted_acceleration_set_type,field_predicted_displacement_set_type, &
1224 & field_predicted_velocity_set_type,field_predicted_acceleration_set_type,field_residual_set_type, &
1225 & field_previous_residual_set_type,field_mesh_displacement_set_type,field_mesh_velocity_set_type,field_boundary_set_type, &
1226 & field_input_data1_set_type, field_input_data2_set_type, field_input_data3_set_type, field_pressure_values_set_type, &
1227 & field_previous_pressure_set_type, field_relative_velocity_set_type, field_negative_mesh_velocity_set_type, &
1228 & field_previous_iteration_values_set_type, &
1229 & field_input_vel1_set_type,field_input_vel2_set_type,field_input_vel3_set_type,field_input_label_set_type, &
1230 & field_impermeable_flag_values_set_type,field_integrated_neumann_set_type,field_upwind_values_set_type, &
1231 & field_previous_upwind_values_set_type
1233 PUBLIC field_no_scaling,field_unit_scaling,field_arc_length_scaling,field_harmonic_mean_scaling,field_arithmetic_mean_scaling, &
1234 & field_geometric_mean_scaling
1236 PUBLIC field_all_components_type,field_geometric_components_type,field_nongeometric_components_type
1238 PUBLIC field_coordinate_system_get
1240 PUBLIC field_coordinatesystemget
1242 PUBLIC field_component_dof_get_constant,field_component_dof_get_user_element,field_component_dof_get_user_node, &
1243 & field_componentdofgetuserdatapoint
1245 PUBLIC field_component_interpolation_check,field_component_interpolation_get,field_component_interpolation_set, &
1246 & field_component_interpolation_set_and_lock
1248 PUBLIC field_componentinterpolationcheck,field_componentinterpolationget,field_componentinterpolationset, &
1249 & field_componentinterpolationsetandlock
1251 PUBLIC field_component_label_get,field_component_label_set,field_component_label_set_and_lock
1253 PUBLIC field_componentlabelget,field_componentlabelset,field_componentlabelsetandlock
1255 PUBLIC field_component_mesh_component_check,field_component_mesh_component_get,field_component_mesh_component_set, &
1256 & field_component_mesh_component_set_and_lock
1258 PUBLIC field_componentmeshcomponentcheck,field_componentmeshcomponentget,field_componentmeshcomponentset, &
1259 & field_componentmeshcomponentsetandlock
1261 PUBLIC field_component_values_initialise
1263 PUBLIC field_componentvaluesinitialise
1265 PUBLIC field_create_finish,field_create_start
1267 PUBLIC field_createfinish,field_createstart
1269 PUBLIC field_dataprojectionset
1271 PUBLIC field_data_type_check,field_data_type_get,field_data_type_set,field_data_type_set_and_lock
1273 PUBLIC field_datatypecheck,field_datatypeget,field_datatypeset,field_datatypesetandlock
1275 PUBLIC field_destroy
1277 PUBLIC field_geometricgeneralfieldget
1279 PUBLIC field_dependent_type_check,field_dependent_type_get,field_dependent_type_set,field_dependent_type_set_and_lock
1281 PUBLIC field_dependenttypecheck,field_dependenttypeget,field_dependenttypeset,field_dependenttypesetandlock
1283 PUBLIC field_dimension_check,field_dimension_get,field_dimension_set,field_dimension_set_and_lock
1285 PUBLIC field_dimensioncheck,field_dimensionget,field_dimensionset,field_dimensionsetandlock
1287 PUBLIC field_dof_order_type_check,field_dof_order_type_get,field_dof_order_type_set,field_dof_order_type_set_and_lock
1289 PUBLIC field_dofordertypecheck,field_dofordertypeget,field_dofordertypeset,field_dofordertypesetandlock
1291 PUBLIC field_geometric_field_get,field_geometric_field_set,field_geometric_field_set_and_lock
1293 PUBLIC field_geometricfieldget,field_geometricfieldset,field_geometricfieldsetandlock
1295 PUBLIC field_geometricparameterselementlinelengthget, field_geometricparameterselementvolumeget
1297 PUBLIC field_interpolate_gauss,field_interpolate_xi,field_interpolate_node,field_interpolate_field_node, &
1298 & field_interpolate_local_face_gauss
1300 PUBLIC field_interpolategauss,field_interpolatexi,field_interpolatenode,field_interpolatefieldnode,field_interpolatelocalfacegauss
1302 PUBLIC field_positionnormaltangentscalculateintptmetric,field_positionnormaltangentscalculatenode
1304 PUBLIC field_interpolated_point_metrics_calculate
1306 PUBLIC field_interpolatedpointmetricscalculate,field_interpolatedpointsmetricsfinalise,field_interpolatedpointsmetricsinitialise
1308 PUBLIC field_interpolated_points_finalise,field_interpolated_points_initialise
1310 PUBLIC field_interpolatedpointsfinalise,field_interpolatedpointsinitialise
1312 PUBLIC field_interpolation_parameters_element_get,field_interpolation_parameters_finalise, &
1313 & field_interpolation_parameters_initialise,field_interpolation_parameters_line_get, &
1314 & field_interpolation_parameters_face_get
1316 PUBLIC field_interpolationparametersfinalise,field_interpolationparametersinitialise
1318 PUBLIC field_interpolationparameterselementget,field_interpolationparametersfaceget,field_interpolationparameterslineget
1320 PUBLIC field_interpolationparametersscalefactorselementget,field_interpolationparametersscalefactorslineget, &
1321 & field_interpolationparametersscalefactorsfaceget
1323 PUBLIC field_label_get,field_label_set,field_label_set_and_lock
1325 PUBLIC field_mesh_decomposition_get,field_mesh_decomposition_set,field_mesh_decomposition_set_and_lock
1327 PUBLIC field_meshdecompositionget,field_meshdecompositionset,field_meshdecompositionsetandlock
1329 PUBLIC field_number_of_components_check,field_number_of_components_get,field_number_of_components_set, &
1330 & field_number_of_components_set_and_lock
1332 PUBLIC field_numberofcomponentscheck,field_numberofcomponentsget,field_numberofcomponentsset,field_numberofcomponentssetandlock
1334 PUBLIC field_number_of_variables_check,field_number_of_variables_get,field_number_of_variables_set, &
1335 & field_number_of_variables_set_and_lock
1337 PUBLIC field_numberofvariablescheck,field_numberofvariablesget,field_numberofvariablesset,field_numberofvariablessetandlock
1339 PUBLIC field_parameter_sets_add
1341 PUBLIC field_parametersetsadd
1343 PUBLIC field_parameter_sets_copy
1345 PUBLIC field_parametersetscopy
1347 PUBLIC field_parameter_set_destroy
1349 PUBLIC field_parametersetdestroy
1351 PUBLIC field_parameterstofieldparameterscopy
1353 PUBLIC field_parameter_set_get
1355 PUBLIC field_parametersetget
1357 PUBLIC field_parameter_set_add_constant,field_parameter_set_add_local_dof,field_parameter_set_add_element, &
1358 & field_parameter_set_add_local_element,field_parameter_set_add_node,field_parameter_set_add_local_node
1360 PUBLIC field_parametersetaddconstant,field_parametersetaddlocaldof,field_parametersetaddelement, &
1361 & field_parametersetaddlocalelement,field_parametersetaddnode,field_parametersetaddlocalnode
1363 PUBLIC field_parameter_set_create
1365 PUBLIC field_parametersetcreate
1367 PUBLIC field_parameter_set_created
1369 PUBLIC field_parametersetensurecreated,field_parametersetcreated
1371 PUBLIC field_parameter_set_data_get,field_parameter_set_data_restore
1373 PUBLIC field_parametersetdataget,field_parametersetdatarestore
1375 PUBLIC field_parameter_set_get_constant,field_parameter_set_get_element, &
1376 & field_parameter_set_get_local_dof,field_parameter_set_get_node, &
1377 & field_parameter_set_get_gauss_point
1379 PUBLIC field_parametersetgetconstant,field_parametersetgetdatapoint,field_parametersetgetelement, &
1380 & field_parametersetgetlocalelement,field_parametersetgetlocaldof,field_parametersetgetnode, &
1381 & field_parametersetgetlocalnode,field_parametersetgetgausspoint,field_parametersetgetlocalgausspoint
1383 PUBLIC field_parameter_set_output
1385 PUBLIC field_parametersetoutput
1387 PUBLIC field_parameter_set_update_finish,field_parameter_set_update_start
1389 PUBLIC field_parametersetupdatefinish,field_parametersetupdatestart
1391 PUBLIC field_parameter_set_update_constant,field_parameter_set_update_local_dof,field_parameter_set_update_local_dofs, &
1392 & field_parameter_set_update_element,field_parameter_set_update_local_element,field_parameter_set_update_node, &
1393 & field_parameter_set_update_local_node,field_parameter_set_update_gauss_point
1395 PUBLIC field_parametersetupdateconstant,field_parametersetupdatedatapoint,field_parametersetupdateelement, &
1396 & field_parametersetupdatelocalelement,field_parametersetupdateelementdatapoint,field_parametersetupdategausspoint, &
1397 & field_parametersetupdatelocalgausspoint,field_parametersetupdatelocaldof,field_parametersetupdatelocaldofs, &
1398 & field_parametersetupdatenode,field_parametersetupdatelocalnode
1400 PUBLIC field_parametersetnodescalefactorget,field_parametersetnodescalefactorset, &
1401 & field_parametersetnodescalefactorsget,field_parametersetnodescalefactorsset, &
1402 & field_parametersetnodenumberofscalefactordofsget
1404 PUBLIC field_parameter_set_interpolate_single_xi, field_parameter_set_interpolate_multiple_xi
1406 PUBLIC field_parametersetinterpolatesinglexi,field_parametersetinterpolatemultiplexi
1408 PUBLIC field_parameter_set_interpolate_single_gauss, field_parameter_set_interpolate_multiple_gauss
1410 PUBLIC field_parametersetinterpolatesinglegauss,field_parametersetinterpoaltemultiplegauss
1412 PUBLIC field_parameter_set_vector_get
1414 PUBLIC field_parametersetvectorget
1416 PUBLIC field_physical_points_finalise,field_physical_points_initialise
1418 PUBLIC field_physicalpointsfinalise,field_physicalpointsinitialise
1420 PUBLIC field_region_get
1422 PUBLIC field_regionget
1424 PUBLIC field_scaling_type_check,field_scaling_type_get,field_scaling_type_set,field_scaling_type_set_and_lock
1426 PUBLIC field_scalingtypecheck,field_scalingtypeget,field_scalingtypeset,field_scalingtypesetandlock
1428 PUBLIC field_type_check,field_type_get,field_type_set,field_type_set_and_lock
1430 PUBLIC field_typecheck,field_typeget,field_typeset,field_typesetandlock
1432 PUBLIC field_user_number_find, field_user_number_to_field
1434 PUBLIC field_usernumberfind,field_usernumbertofield
1436 PUBLIC field_variable_get
1438 PUBLIC field_variableget
1440 PUBLIC field_variable_label_get,field_variable_label_set,field_variable_label_set_and_lock
1442 PUBLIC field_variablelabelget,field_variablelabelset,field_variablelabelsetandlock
1444 PUBLIC field_variable_type_check
1446 PUBLIC field_variabletypecheck
1448 PUBLIC field_variable_types_check,field_variable_types_get,field_variable_types_set,field_variable_types_set_and_lock
1450 PUBLIC field_variabletypescheck,field_variabletypesget,field_variabletypesset,field_variabletypessetandlock
1452 PUBLIC fields_finalise,fields_initialise
1454 PUBLIC mesh_embedding_push_data, mesh_embedding_pull_gauss_point_data, field_parameter_set_get_gauss_point_coord
1463 SUBROUTINE field_component_interpolation_check(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,INTERPOLATION_TYPE,ERR,ERROR,*)
1467 INTEGER(INTG),
INTENT(IN) :: variable_type
1468 INTEGER(INTG),
INTENT(IN) :: component_number
1469 INTEGER(INTG),
INTENT(IN) :: interpolation_type
1470 INTEGER(INTG),
INTENT(OUT) :: err
1476 enters(
"FIELD_COMPONENT_INTERPOLATION_CHECK",err,error,*999)
1478 IF(
ASSOCIATED(field))
THEN 1479 IF(field%FIELD_FINISHED)
THEN 1480 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 1481 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1482 IF(
ASSOCIATED(field_variable))
THEN 1483 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 1484 SELECT CASE(interpolation_type)
1485 CASE(field_constant_interpolation)
1486 IF(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE/=field_constant_interpolation)
THEN 1487 local_error=
"Invalid interpolation type. The interpolation type for component number "// &
1491 &
trim(
number_to_vstring(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
1492 &
" which is not constant interpolation." 1493 CALL flagerror(local_error,err,error,*999)
1495 CASE(field_element_based_interpolation)
1496 IF(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE/=field_element_based_interpolation)
THEN 1497 local_error=
"Invalid interpolation type. The interpolation type for component number "// &
1501 &
trim(
number_to_vstring(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
1502 &
" which is not element based interpolation." 1503 CALL flagerror(local_error,err,error,*999)
1505 CASE(field_node_based_interpolation)
1506 IF(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE/=field_node_based_interpolation)
THEN 1507 local_error=
"Invalid interpolation type. The interpolation type for component number "// &
1511 &
trim(
number_to_vstring(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
1512 &
" which is not node based interpolation." 1513 CALL flagerror(local_error,err,error,*999)
1515 CASE(field_grid_point_based_interpolation)
1516 IF(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE/=field_grid_point_based_interpolation)
THEN 1517 local_error=
"Invalid interpolation type. The interpolation type for component number "// &
1521 &
trim(
number_to_vstring(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
1522 &
" which is not grid point based interpolation." 1523 CALL flagerror(local_error,err,error,*999)
1525 CASE(field_gauss_point_based_interpolation)
1526 IF(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE/=field_gauss_point_based_interpolation)
THEN 1527 local_error=
"Invalid interpolation type. The interpolation type for component number "// &
1531 &
trim(
number_to_vstring(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
1532 &
" which is not Gauss point based interpolation." 1533 CALL flagerror(local_error,err,error,*999)
1535 CASE(field_data_point_based_interpolation)
1536 IF(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE/=field_data_point_based_interpolation)
THEN 1537 local_error=
"Invalid interpolation type. The interpolation type for component number "// &
1541 &
trim(
number_to_vstring(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
1542 &
" which is not data point based interpolation." 1543 CALL flagerror(local_error,err,error,*999)
1546 local_error=
"The specified interpolation type of "//
trim(
number_to_vstring(interpolation_type,
"*",err,error))// &
1548 CALL flagerror(local_error,err,error,*999)
1556 CALL flagerror(local_error,err,error,*999)
1560 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 1561 CALL flagerror(local_error,err,error,*999)
1565 &
" is invalid. The variable type must be between 1 and "// &
1567 CALL flagerror(local_error,err,error,*999)
1571 &
" has not been finished." 1572 CALL flagerror(local_error,err,error,*999)
1575 CALL flagerror(
"Field is not associated.",err,error,*999)
1578 exits(
"FIELD_COMPONENT_INTERPOLATION_CHECK")
1580 999 errorsexits(
"FIELD_COMPONENT_INTERPOLATION_CHECK",err,error)
1582 END SUBROUTINE field_component_interpolation_check
1589 SUBROUTINE field_component_interpolation_get(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,INTERPOLATION_TYPE,ERR,ERROR,*)
1593 INTEGER(INTG),
INTENT(IN) :: variable_type
1594 INTEGER(INTG),
INTENT(IN) :: component_number
1595 INTEGER(INTG),
INTENT(OUT) :: interpolation_type
1596 INTEGER(INTG),
INTENT(OUT) :: err
1602 enters(
"FIELD_COMPONENT_INTERPOLATION_GET",err,error,*999)
1604 IF(
ASSOCIATED(field))
THEN 1605 IF(field%FIELD_FINISHED)
THEN 1606 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 1607 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1608 IF(
ASSOCIATED(field_variable))
THEN 1609 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 1610 interpolation_type=field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE
1617 CALL flagerror(local_error,err,error,*999)
1621 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 1622 CALL flagerror(local_error,err,error,*999)
1626 &
" is invalid. The variable type must be between 1 and "// &
1628 CALL flagerror(local_error,err,error,*999)
1632 &
" has not been finished." 1633 CALL flagerror(local_error,err,error,*999)
1636 CALL flagerror(
"Field is not associated.",err,error,*999)
1639 exits(
"FIELD_COMPONENT_INTERPOLATION_GET")
1641 999 errorsexits(
"FIELD_COMPONENT_INTERPOLATION_GET",err,error)
1643 END SUBROUTINE field_component_interpolation_get
1650 SUBROUTINE field_component_interpolation_set(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,INTERPOLATION_TYPE,ERR,ERROR,*)
1654 INTEGER(INTG),
INTENT(IN) :: variable_type
1655 INTEGER(INTG),
INTENT(IN) :: component_number
1656 INTEGER(INTG),
INTENT(IN) :: interpolation_type
1657 INTEGER(INTG),
INTENT(OUT) :: err
1662 enters(
"FIELD_COMPONENT_INTERPOLATION_SET",err,error,*999)
1664 IF(
ASSOCIATED(field))
THEN 1665 IF(field%FIELD_FINISHED)
THEN 1666 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 1667 CALL flagerror(local_error,err,error,*999)
1669 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 1670 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 1671 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 1672 IF(component_number>=1.AND.component_number<=field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type))
THEN 1673 IF(field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED(component_number,variable_type))
THEN 1674 local_error=
"The interpolation type has been locked for component number "// &
1678 CALL flagerror(local_error,err,error,*999)
1680 SELECT CASE(interpolation_type)
1681 CASE(field_constant_interpolation)
1682 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_number,variable_type)=interpolation_type
1683 CASE(field_element_based_interpolation)
1684 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_number,variable_type)=interpolation_type
1685 CASE(field_node_based_interpolation)
1686 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_number,variable_type)=interpolation_type
1687 CASE(field_grid_point_based_interpolation)
1688 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_number,variable_type)=interpolation_type
1689 CASE(field_gauss_point_based_interpolation)
1690 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_number,variable_type)=interpolation_type
1691 CASE(field_data_point_based_interpolation)
1692 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_number,variable_type)=interpolation_type
1694 local_error=
"The specified interpolation type of "// &
1696 CALL flagerror(local_error,err,error,*999)
1703 &
trim(
number_to_vstring(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type),
"*",err,error))// &
1705 CALL flagerror(local_error,err,error,*999)
1709 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 1710 CALL flagerror(local_error,err,error,*999)
1714 &
" is invalid. The variable type must be between 1 and "// &
1716 CALL flagerror(local_error,err,error,*999)
1719 local_error=
"Field create values cache is not associated for field number "// &
1721 CALL flagerror(local_error,err,error,*999)
1725 CALL flagerror(
"Field is not associated.",err,error,*999)
1728 exits(
"FIELD_COMPONENT_INTERPOLATION_SET")
1730 999 errorsexits(
"FIELD_COMPONENT_INTERPOLATION_SET",err,error)
1732 END SUBROUTINE field_component_interpolation_set
1739 SUBROUTINE field_component_interpolation_set_and_lock(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,INTERPOLATION_TYPE,ERR,ERROR,*)
1743 INTEGER(INTG),
INTENT(IN) :: variable_type
1744 INTEGER(INTG),
INTENT(IN) :: component_number
1745 INTEGER(INTG),
INTENT(IN) :: interpolation_type
1746 INTEGER(INTG),
INTENT(OUT) :: err
1751 enters(
"FIELD_COMPONENT_INTERPOLATION_SET_AND_LOCK",err,error,*999)
1753 CALL field_component_interpolation_set(field,variable_type,component_number,interpolation_type,err,error,*999)
1754 IF(
ASSOCIATED(field))
THEN 1755 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 1756 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED(component_number,variable_type)=.true.
1758 local_error=
"Field create values cache is not associated for field number "// &
1760 CALL flagerror(local_error,err,error,*999)
1763 CALL flagerror(
"Field is not associated.",err,error,*999)
1766 exits(
"FIELD_COMPONENT_INTERPOLATION_SET_AND_LOCK")
1768 999 errorsexits(
"FIELD_COMPONENT_INTERPOLATION_SET_AND_LOCK",err,error)
1770 END SUBROUTINE field_component_interpolation_set_and_lock
1777 SUBROUTINE field_component_dof_get_constant(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,LOCAL_DOF,GLOBAL_DOF,ERR,ERROR,*)
1781 INTEGER(INTG),
INTENT(IN) :: variable_type
1782 INTEGER(INTG),
INTENT(IN) :: component_number
1783 INTEGER(INTG),
INTENT(OUT) :: local_dof
1784 INTEGER(INTG),
INTENT(OUT) :: global_dof
1785 INTEGER(INTG),
INTENT(OUT) :: err
1791 enters(
"FIELD_COMPONENT_DOF_GET_CONSTANT",err,error,*999)
1793 IF(
ASSOCIATED(field))
THEN 1794 IF(field%FIELD_FINISHED)
THEN 1795 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 1796 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
1797 IF(
ASSOCIATED(field_variable))
THEN 1798 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 1799 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
1800 CASE(field_constant_interpolation)
1801 IF(
ASSOCIATED(field_variable%DOMAIN_MAPPING))
THEN 1802 local_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
1803 global_dof=field_variable%DOMAIN_MAPPING%LOCAL_TO_GLOBAL_MAP(local_dof)
1805 local_error=
"The field variable domain mapping is not associated for variable type "// &
1808 CALL flagerror(local_error,err,error,*999)
1810 CASE(field_element_based_interpolation)
1811 local_error=
"Can not get the dof by constant for component number "// &
1814 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 1815 CALL flagerror(local_error,err,error,*999)
1816 CASE(field_node_based_interpolation)
1817 local_error=
"Can not get the dof by constant for component number "// &
1821 CALL flagerror(local_error,err,error,*999)
1822 CASE(field_grid_point_based_interpolation)
1823 local_error=
"Can not get the dof by constant for component number "// &
1826 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 1827 CALL flagerror(local_error,err,error,*999)
1828 CASE(field_gauss_point_based_interpolation)
1829 local_error=
"Can not get the dof by constant for component number "// &
1832 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 1833 CALL flagerror(local_error,err,error,*999)
1834 CASE(field_data_point_based_interpolation)
1835 local_error=
"Can not get the dof by constant for component number "// &
1838 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 1839 CALL flagerror(local_error,err,error,*999)
1842 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
1846 CALL flagerror(local_error,err,error,*999)
1854 CALL flagerror(local_error,err,error,*999)
1857 local_error=
"The specified field variable type of "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
1858 &
" has not been defined on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 1859 CALL flagerror(local_error,err,error,*999)
1862 local_error=
"The specified variable type of "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
1863 &
" is invalid. The variable type must be between 1 and "// &
1865 CALL flagerror(local_error,err,error,*999)
1869 &
" has not been finished." 1870 CALL flagerror(local_error,err,error,*999)
1873 CALL flagerror(
"Field is not associated.",err,error,*999)
1876 exits(
"FIELD_COMPONENT_DOF_GET_CONSTANT")
1878 999 errorsexits(
"FIELD_COMPONENT_DOF_GET_CONSTANT",err,error)
1880 END SUBROUTINE field_component_dof_get_constant
1887 SUBROUTINE field_componentdofgetuserdatapoint(field,variableType,userDataPointNumber,componentNumber,localDof, &
1888 & globaldof,err,error,*)
1892 INTEGER(INTG),
INTENT(IN) :: variabletype
1893 INTEGER(INTG),
INTENT(IN) :: userdatapointnumber
1894 INTEGER(INTG),
INTENT(IN) :: componentnumber
1895 INTEGER(INTG),
INTENT(OUT) :: localdof
1896 INTEGER(INTG),
INTENT(OUT) :: globaldof
1897 INTEGER(INTG),
INTENT(OUT) :: err
1900 LOGICAL :: ghostdatapoint,userdatapointexists
1901 INTEGER(INTG) :: decompositionlocaldatapointnumber
1907 enters(
"Field_componentDofGetUserDataPoint",err,error,*999)
1909 IF(
ASSOCIATED(field))
THEN 1910 IF(field%FIELD_FINISHED)
THEN 1911 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 1912 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
1913 IF(
ASSOCIATED(fieldvariable))
THEN 1914 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 1915 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
1916 CASE(field_constant_interpolation)
1917 localerror=
"Can not get the dof by user data point for component number "// &
1922 CASE(field_element_based_interpolation)
1923 localerror=
"Can not get the dof by user data point for component number "// &
1926 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 1927 CALL flagerror(localerror,err,error,*999)
1928 CASE(field_node_based_interpolation)
1929 localerror=
"Can not get the dof by user data point for component number "// &
1933 CALL flagerror(localerror,err,error,*999)
1934 CASE(field_grid_point_based_interpolation)
1935 localerror=
"Can not get the dof by user data point for component number "// &
1938 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 1939 CALL flagerror(localerror,err,error,*999)
1940 CASE(field_gauss_point_based_interpolation)
1941 localerror=
"Can not get the dof by user data point for component number "// &
1944 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 1945 CALL flagerror(localerror,err,error,*999)
1946 CASE(field_data_point_based_interpolation)
1947 decomposition=>fieldvariable%COMPONENTS(componentnumber)%DOMAIN%DECOMPOSITION
1948 IF(
ASSOCIATED(decomposition))
THEN 1949 decompositiontopology=>decomposition%TOPOLOGY
1950 userdatapointexists=.true.
1951 IF(
ASSOCIATED(decompositiontopology))
THEN 1952 CALL decompositiontopology_datapointcheckexists(decompositiontopology,userdatapointnumber,userdatapointexists, &
1953 & decompositionlocaldatapointnumber,ghostdatapoint,err,error,*999)
1954 IF(userdatapointexists)
THEN 1955 localdof=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
1956 & data_point_param2dof_map%DATA_POINTS(decompositionlocaldatapointnumber)
1957 globaldof=fieldvariable%DOMAIN_MAPPING%LOCAL_TO_GLOBAL_MAP(localdof)
1959 localerror=
"The specified user data point number of "// &
1961 &
" does not exist in the domain for field component number "// &
1965 CALL flagerror(localerror,err,error,*999)
1968 CALL flagerror(
"Decomposition topology is not associated.",err,error,*999)
1971 CALL flagerror(
"Decomposition is not associated.",err,error,*999)
1975 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
1979 CALL flagerror(localerror,err,error,*999)
1987 CALL flagerror(localerror,err,error,*999)
1990 localerror=
"The specified field variable type of "//
trim(
number_to_vstring(variabletype,
"*",err,error))// &
1991 &
" has not been defined on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 1992 CALL flagerror(localerror,err,error,*999)
1995 localerror=
"The specified variable type of "//
trim(
number_to_vstring(variabletype,
"*",err,error))// &
1996 &
" is invalid. The variable type must be between 1 and "// &
1998 CALL flagerror(localerror,err,error,*999)
2002 &
" has not been finished." 2003 CALL flagerror(localerror,err,error,*999)
2006 CALL flagerror(
"Field is not associated.",err,error,*999)
2009 exits(
"Field_componentDofGetUserDataPoint")
2011 999 errorsexits(
"Field_componentDofGetUserDataPoint",err,error)
2013 END SUBROUTINE field_componentdofgetuserdatapoint
2020 SUBROUTINE field_component_dof_get_user_element(FIELD,VARIABLE_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER,LOCAL_DOF, &
2021 & global_dof,err,error,*)
2025 INTEGER(INTG),
INTENT(IN) :: variable_type
2026 INTEGER(INTG),
INTENT(IN) :: user_element_number
2027 INTEGER(INTG),
INTENT(IN) :: component_number
2028 INTEGER(INTG),
INTENT(OUT) :: local_dof
2029 INTEGER(INTG),
INTENT(OUT) :: global_dof
2030 INTEGER(INTG),
INTENT(OUT) :: err
2033 INTEGER(INTG) :: decomposition_local_element_number
2034 LOGICAL :: ghost_element,user_element_exists
2040 enters(
"FIELD_COMPONENT_DOF_GET_USER_ELEMENT",err,error,*999)
2042 IF(
ASSOCIATED(field))
THEN 2043 IF(field%FIELD_FINISHED)
THEN 2044 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 2045 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
2046 IF(
ASSOCIATED(field_variable))
THEN 2047 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 2048 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
2049 CASE(field_constant_interpolation)
2050 local_error=
"Can not get the dof by user element for component number "// &
2054 CALL flagerror(local_error,err,error,*999)
2055 CASE(field_element_based_interpolation)
2056 decomposition=>field%DECOMPOSITION
2057 IF(
ASSOCIATED(decomposition))
THEN 2058 decomposition_topology=>decomposition%TOPOLOGY
2059 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
2060 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
2061 IF(user_element_exists)
THEN 2062 IF(
ASSOCIATED(field_variable%DOMAIN_MAPPING))
THEN 2063 local_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
2064 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
2065 global_dof=field_variable%DOMAIN_MAPPING%LOCAL_TO_GLOBAL_MAP(local_dof)
2067 CALL flagerror(
"The field variable domain mapping is not associated.",err,error,*999)
2070 local_error=
"The specified user element number of "// &
2072 &
" does not exist in the decomposition for field component number "// &
2076 CALL flagerror(local_error,err,error,*999)
2079 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
2081 CASE(field_node_based_interpolation)
2082 local_error=
"Can not get the dof by user element for component number "// &
2086 CALL flagerror(local_error,err,error,*999)
2087 CASE(field_grid_point_based_interpolation)
2088 local_error=
"Can not get the dof by user element for component number "// &
2091 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 2092 CALL flagerror(local_error,err,error,*999)
2093 CASE(field_gauss_point_based_interpolation)
2094 local_error=
"Can not get the dof by user element for component number "// &
2097 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 2098 CALL flagerror(local_error,err,error,*999)
2099 CASE(field_data_point_based_interpolation)
2100 local_error=
"Can not get the dof by user element for component number "// &
2103 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 2104 CALL flagerror(local_error,err,error,*999)
2107 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
2111 CALL flagerror(local_error,err,error,*999)
2119 CALL flagerror(local_error,err,error,*999)
2122 local_error=
"The specified field variable type of "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
2123 &
" has not been defined on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 2124 CALL flagerror(local_error,err,error,*999)
2127 local_error=
"The specified variable type of "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
2128 &
" is invalid. The variable type must be between 1 and "// &
2130 CALL flagerror(local_error,err,error,*999)
2134 &
" has not been finished." 2135 CALL flagerror(local_error,err,error,*999)
2138 CALL flagerror(
"Field is not associated.",err,error,*999)
2141 exits(
"FIELD_COMPONENT_DOF_GET_USER_ELEMENT")
2143 999 errorsexits(
"FIELD_COMPONENT_DOF_GET_USER_ELEMENT",err,error)
2145 END SUBROUTINE field_component_dof_get_user_element
2151 SUBROUTINE field_component_dof_get_user_node(FIELD,VARIABLE_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER,USER_NODE_NUMBER, &
2152 & component_number,local_dof,global_dof,err,error,*)
2156 INTEGER(INTG),
INTENT(IN) :: variable_type
2157 INTEGER(INTG),
INTENT(IN) :: version_number
2158 INTEGER(INTG),
INTENT(IN) :: derivative_number
2159 INTEGER(INTG),
INTENT(IN) :: user_node_number
2160 INTEGER(INTG),
INTENT(IN) :: component_number
2161 INTEGER(INTG),
INTENT(OUT) :: local_dof
2162 INTEGER(INTG),
INTENT(OUT) :: global_dof
2163 INTEGER(INTG),
INTENT(OUT) :: err
2166 INTEGER(INTG) :: domain_local_node_number
2167 LOGICAL :: ghost_node,user_node_exists
2173 enters(
"FIELD_COMPONENT_DOF_GET_USER_NODE",err,error,*999)
2175 IF(
ASSOCIATED(field))
THEN 2176 IF(field%FIELD_FINISHED)
THEN 2177 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 2178 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
2179 IF(
ASSOCIATED(field_variable))
THEN 2180 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 2181 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
2182 CASE(field_constant_interpolation)
2183 local_error=
"Can not get the dof by user node for component number "// &
2187 CALL flagerror(local_error,err,error,*999)
2188 CASE(field_element_based_interpolation)
2189 local_error=
"Can not get the dof by user node for component number "// &
2192 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 2193 CALL flagerror(local_error,err,error,*999)
2194 CASE(field_node_based_interpolation)
2195 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
2196 IF(
ASSOCIATED(domain))
THEN 2197 domain_topology=>domain%TOPOLOGY
2198 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
2199 & domain_local_node_number,ghost_node,err,error,*999)
2200 IF(user_node_exists)
THEN 2201 IF(
ASSOCIATED(field_variable%DOMAIN_MAPPING))
THEN 2202 IF(derivative_number>0.AND.derivative_number<=field_variable%COMPONENTS(component_number)% &
2203 & param_to_dof_map%NODE_PARAM2DOF_MAP%NODES(domain_local_node_number)%NUMBER_OF_DERIVATIVES) &
2205 local_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
2206 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
2207 & versions(version_number)
2208 global_dof=field_variable%DOMAIN_MAPPING%LOCAL_TO_GLOBAL_MAP(local_dof)
2211 &
" is invalid for user node number "// &
2217 & node_param2dof_map%NODES(domain_local_node_number)%NUMBER_OF_DERIVATIVES, &
2218 &
"*",err,error))//
" derivatives." 2219 CALL flagerror(local_error,err,error,*999)
2222 CALL flagerror(
"The field variable domain mapping is not associated.",err,error,*999)
2225 local_error=
"The specified user node number of "// &
2227 &
" does not exist in the domain for field component number "// &
2231 CALL flagerror(local_error,err,error,*999)
2234 CALL flagerror(
"Field variable component domain is not associated.",err,error,*999)
2236 CASE(field_grid_point_based_interpolation)
2237 local_error=
"Can not get the dof by user node for component number "// &
2240 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 2241 CALL flagerror(local_error,err,error,*999)
2242 CASE(field_gauss_point_based_interpolation)
2243 local_error=
"Can not get the dof by user node for component number "// &
2246 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 2247 CALL flagerror(local_error,err,error,*999)
2248 CASE(field_data_point_based_interpolation)
2249 local_error=
"Can not get the dof by user node for component number "// &
2252 &
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 2253 CALL flagerror(local_error,err,error,*999)
2256 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
2260 CALL flagerror(local_error,err,error,*999)
2268 CALL flagerror(local_error,err,error,*999)
2271 local_error=
"The specified field variable type of "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
2272 &
" has not been defined on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 2273 CALL flagerror(local_error,err,error,*999)
2276 local_error=
"The specified variable type of "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
2277 &
" is invalid. The variable type must be between 1 and "// &
2279 CALL flagerror(local_error,err,error,*999)
2283 &
" has not been finished." 2284 CALL flagerror(local_error,err,error,*999)
2287 CALL flagerror(
"Field is not associated.",err,error,*999)
2290 exits(
"FIELD_COMPONENT_DOF_GET_USER_NODE")
2292 999 errorsexits(
"FIELD_COMPONENT_DOF_GET_USER_NODE",err,error)
2294 END SUBROUTINE field_component_dof_get_user_node
2301 SUBROUTINE field_component_label_get_c(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,LABEL,ERR,ERROR,*)
2305 INTEGER(INTG),
INTENT(IN) :: variable_type
2306 INTEGER(INTG),
INTENT(IN) :: component_number
2307 CHARACTER(LEN=*),
INTENT(OUT) :: label
2308 INTEGER(INTG),
INTENT(OUT) :: err
2311 INTEGER(INTG) :: c_length,vs_length
2315 enters(
"FIELD_COMPONENT_LABEL_GET_C",err,error,*999)
2317 IF(
ASSOCIATED(field))
THEN 2318 IF(field%FIELD_FINISHED)
THEN 2319 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 2320 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
2321 IF(
ASSOCIATED(field_variable))
THEN 2322 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 2324 vs_length=
len_trim(field_variable%COMPONENTS(component_number)%COMPONENT_LABEL)
2325 IF(c_length>vs_length)
THEN 2326 label=
char(
len_trim(field_variable%COMPONENTS(component_number)%COMPONENT_LABEL))
2328 label=
char(field_variable%COMPONENTS(component_number)%COMPONENT_LABEL,c_length)
2336 CALL flagerror(local_error,err,error,*999)
2340 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 2341 CALL flagerror(local_error,err,error,*999)
2345 &
" is invalid. The variable type must be between 1 and "// &
2347 CALL flagerror(local_error,err,error,*999)
2350 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 2351 CALL flagerror(local_error,err,error,*999)
2354 CALL flagerror(
"Field is not associated.",err,error,*999)
2357 exits(
"FIELD_COMPONENT_LABEL_GET_C")
2359 999 errorsexits(
"FIELD_COMPONENT_LABEL_GET_C",err,error)
2361 END SUBROUTINE field_component_label_get_c
2368 SUBROUTINE field_component_label_get_vs(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,LABEL,ERR,ERROR,*)
2372 INTEGER(INTG),
INTENT(IN) :: variable_type
2373 INTEGER(INTG),
INTENT(IN) :: component_number
2375 INTEGER(INTG),
INTENT(OUT) :: err
2381 enters(
"FIELD_COMPONENT_LABEL_GET_VS",err,error,*999)
2383 IF(
ASSOCIATED(field))
THEN 2384 IF(field%FIELD_FINISHED)
THEN 2385 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 2386 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
2387 IF(
ASSOCIATED(field_variable))
THEN 2388 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 2389 label=field_variable%COMPONENTS(component_number)%COMPONENT_LABEL
2396 CALL flagerror(local_error,err,error,*999)
2400 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 2401 CALL flagerror(local_error,err,error,*999)
2405 &
" is invalid. The variable type must be between 1 and "// &
2407 CALL flagerror(local_error,err,error,*999)
2410 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 2411 CALL flagerror(local_error,err,error,*999)
2414 CALL flagerror(
"Field is not associated.",err,error,*999)
2417 exits(
"FIELD_COMPONENT_LABEL_GET_VS")
2419 999 errorsexits(
"FIELD_COMPONENT_LABEL_GET_VS",err,error)
2421 END SUBROUTINE field_component_label_get_vs
2428 SUBROUTINE field_component_label_set_c(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,LABEL,ERR,ERROR,*)
2432 INTEGER(INTG),
INTENT(IN) :: variable_type
2433 INTEGER(INTG),
INTENT(IN) :: component_number
2434 CHARACTER(LEN=*),
INTENT(IN) :: label
2435 INTEGER(INTG),
INTENT(OUT) :: err
2440 enters(
"FIELD_COMPONENT_LABEL_SET_C",err,error,*999)
2442 IF(
ASSOCIATED(field))
THEN 2443 IF(field%FIELD_FINISHED)
THEN 2444 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 2445 CALL flagerror(local_error,err,error,*999)
2447 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 2448 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 2449 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 2450 IF(component_number>=1.AND.component_number<=field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type))
THEN 2451 IF(field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED(component_number,variable_type))
THEN 2452 local_error=
"The component label has been locked for component number "// &
2456 CALL flagerror(local_error,err,error,*999)
2458 field%CREATE_VALUES_CACHE%COMPONENT_LABELS(component_number,variable_type)=label
2464 &
trim(
number_to_vstring(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type),
"*",err,error))// &
2466 CALL flagerror(local_error,err,error,*999)
2470 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 2471 CALL flagerror(local_error,err,error,*999)
2475 &
" is invalid. The variable type must be between 1 and "// &
2477 CALL flagerror(local_error,err,error,*999)
2480 local_error=
"Field create values cache is not associated for field number "// &
2482 CALL flagerror(local_error,err,error,*999)
2486 CALL flagerror(
"Field is not associated.",err,error,*999)
2489 exits(
"FIELD_COMPONENT_LABEL_SET_C")
2491 999 errorsexits(
"FIELD_COMPONENT_LABEL_SET_C",err,error)
2493 END SUBROUTINE field_component_label_set_c
2500 SUBROUTINE field_component_label_set_vs(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,LABEL,ERR,ERROR,*)
2504 INTEGER(INTG),
INTENT(IN) :: variable_type
2505 INTEGER(INTG),
INTENT(IN) :: component_number
2507 INTEGER(INTG),
INTENT(OUT) :: err
2512 enters(
"FIELD_VARIABLE_LABEL_SET_VS",err,error,*999)
2514 IF(
ASSOCIATED(field))
THEN 2515 IF(field%FIELD_FINISHED)
THEN 2516 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 2517 CALL flagerror(local_error,err,error,*999)
2519 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 2520 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 2521 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 2522 IF(component_number>=1.AND.component_number<=field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type))
THEN 2523 IF(field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED(component_number,variable_type))
THEN 2524 local_error=
"The component label has been locked for component number "// &
2528 CALL flagerror(local_error,err,error,*999)
2530 field%CREATE_VALUES_CACHE%COMPONENT_LABELS(component_number,variable_type)=label
2536 &
trim(
number_to_vstring(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type),
"*",err,error))// &
2538 CALL flagerror(local_error,err,error,*999)
2542 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 2543 CALL flagerror(local_error,err,error,*999)
2547 &
" is invalid. The variable type must be between 1 and "// &
2549 CALL flagerror(local_error,err,error,*999)
2552 local_error=
"Field create values cache is not associated for field number "// &
2554 CALL flagerror(local_error,err,error,*999)
2558 CALL flagerror(
"Field is not associated.",err,error,*999)
2561 exits(
"FIELD_COMPONENT_LABEL_SET_VS")
2563 999 errorsexits(
"FIELD_COMPONENT_LABEL_SET_VS",err,error)
2565 END SUBROUTINE field_component_label_set_vs
2572 SUBROUTINE field_component_label_set_and_lock_c(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,LABEL,ERR,ERROR,*)
2576 INTEGER(INTG),
INTENT(IN) :: variable_type
2577 INTEGER(INTG),
INTENT(IN) :: component_number
2578 CHARACTER(LEN=*),
INTENT(IN) :: label
2579 INTEGER(INTG),
INTENT(OUT) :: err
2584 enters(
"FIELD_COMPONENT_LABEL_SET_AND_LOCK_C",err,error,*999)
2586 CALL field_component_label_set(field,variable_type,component_number,label,err,error,*999)
2587 IF(
ASSOCIATED(field))
THEN 2588 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 2589 field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED(component_number,variable_type)=.true.
2591 local_error=
"Field create values cache is not associated for field number "// &
2593 CALL flagerror(local_error,err,error,*999)
2596 CALL flagerror(
"Field is not associated.",err,error,*999)
2599 exits(
"FIELD_COMPONENT_LABEL_SET_AND_LOCK_C")
2601 999 errorsexits(
"FIELD_COMPONENT_LABEL_SET_AND_LOCK_C",err,error)
2603 END SUBROUTINE field_component_label_set_and_lock_c
2610 SUBROUTINE field_component_label_set_and_lock_vs(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,LABEL,ERR,ERROR,*)
2614 INTEGER(INTG),
INTENT(IN) :: variable_type
2615 INTEGER(INTG),
INTENT(IN) :: component_number
2617 INTEGER(INTG),
INTENT(OUT) :: err
2622 enters(
"FIELD_COMPONENT_LABEL_SET_AND_LOCK_VS",err,error,*999)
2624 CALL field_component_label_set(field,variable_type,component_number,label,err,error,*999)
2625 IF(
ASSOCIATED(field))
THEN 2626 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 2627 field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED(component_number,variable_type)=.true.
2629 local_error=
"Field create values cache is not associated for field number "// &
2631 CALL flagerror(local_error,err,error,*999)
2634 CALL flagerror(
"Field is not associated.",err,error,*999)
2637 exits(
"FIELD_COMPONENT_LABEL_SET_AND_LOCK_VS")
2639 999 errorsexits(
"FIELD_COMPONENT_LABEL_SET_AND_LOCK_VS",err,error)
2641 END SUBROUTINE field_component_label_set_and_lock_vs
2648 SUBROUTINE field_component_mesh_component_check(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,MESH_COMPONENT,ERR,ERROR,*)
2652 INTEGER(INTG),
INTENT(IN) :: variable_type
2653 INTEGER(INTG),
INTENT(IN) :: component_number
2654 INTEGER(INTG),
INTENT(IN) :: mesh_component
2655 INTEGER(INTG),
INTENT(OUT) :: err
2661 enters(
"FIELD_COMPONENT_MESH_COMPONENT_CHECK",err,error,*999)
2663 IF(
ASSOCIATED(field))
THEN 2664 IF(field%FIELD_FINISHED)
THEN 2665 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 2666 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
2667 IF(
ASSOCIATED(field_variable))
THEN 2668 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 2669 IF(field_variable%COMPONENTS(component_number)%MESH_COMPONENT_NUMBER/=mesh_component)
THEN 2670 local_error=
"Invalid mesh component number. The mesh component number for component number "// &
2674 &
trim(
number_to_vstring(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
2675 &
" which is does correspond to the specified mesh component number of "// &
2677 CALL flagerror(local_error,err,error,*999)
2685 CALL flagerror(local_error,err,error,*999)
2689 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 2690 CALL flagerror(local_error,err,error,*999)
2693 local_error=
"The specified field variable type of "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
2694 &
" is invalid. The field variable type must be > 1 and <= "// &
2696 CALL flagerror(local_error,err,error,*999)
2699 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 2700 CALL flagerror(local_error,err,error,*999)
2703 CALL flagerror(
"Field is not associated.",err,error,*999)
2706 exits(
"FIELD_COMPONENT_MESH_COMPONENT_CHECK")
2708 999 errorsexits(
"FIELD_COMPONENT_MESH_COMPONENT_CHECK",err,error)
2710 END SUBROUTINE field_component_mesh_component_check
2717 SUBROUTINE field_component_mesh_component_get(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,MESH_COMPONENT,ERR,ERROR,*)
2721 INTEGER(INTG),
INTENT(IN) :: variable_type
2722 INTEGER(INTG),
INTENT(IN) :: component_number
2723 INTEGER(INTG),
INTENT(OUT) :: mesh_component
2724 INTEGER(INTG),
INTENT(OUT) :: err
2730 enters(
"FIELD_COMPONENT_MESH_COMPONENT_GET",err,error,*999)
2732 IF(
ASSOCIATED(field))
THEN 2733 IF(field%FIELD_FINISHED)
THEN 2734 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 2735 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
2736 IF(
ASSOCIATED(field_variable))
THEN 2737 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 2738 mesh_component=field_variable%COMPONENTS(component_number)%MESH_COMPONENT_NUMBER
2745 CALL flagerror(local_error,err,error,*999)
2749 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 2750 CALL flagerror(local_error,err,error,*999)
2753 local_error=
"The specified field variable type of "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
2754 &
" is invalid. The field variable type must be > 1 and <= "// &
2756 CALL flagerror(local_error,err,error,*999)
2759 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 2760 CALL flagerror(local_error,err,error,*999)
2763 CALL flagerror(
"Field is not associated.",err,error,*999)
2766 exits(
"FIELD_COMPONENT_MESH_COMPONENT_GET")
2768 999 errorsexits(
"FIELD_COMPONENT_MESH_COMPONENT_GET",err,error)
2770 END SUBROUTINE field_component_mesh_component_get
2777 SUBROUTINE field_component_mesh_component_set(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,MESH_COMPONENT_NUMBER,ERR,ERROR,*)
2781 INTEGER(INTG),
INTENT(IN) :: variable_type
2782 INTEGER(INTG),
INTENT(IN) :: component_number
2783 INTEGER(INTG),
INTENT(IN) :: mesh_component_number
2784 INTEGER(INTG),
INTENT(OUT) :: err
2791 enters(
"FIELD_COMPONENT_MESH_COMPONENT_SET",err,error,*999)
2793 IF(
ASSOCIATED(field))
THEN 2794 IF(field%FIELD_FINISHED)
THEN 2795 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 2796 CALL flagerror(local_error,err,error,*999)
2798 decomposition=>field%DECOMPOSITION
2799 IF(
ASSOCIATED(decomposition))
THEN 2800 mesh=>decomposition%MESH
2801 IF(
ASSOCIATED(mesh))
THEN 2802 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 2803 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 2804 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 2805 IF(component_number>=1.AND.component_number<=field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type))
THEN 2806 IF(field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED(component_number,variable_type))
THEN 2807 local_error=
"The mesh component has been locked for component number "// &
2811 CALL flagerror(local_error,err,error,*999)
2813 SELECT CASE(field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_number,variable_type))
2822 CASE(field_element_based_interpolation,field_node_based_interpolation,field_grid_point_based_interpolation, &
2823 & field_gauss_point_based_interpolation, field_constant_interpolation,field_data_point_based_interpolation)
2824 IF(mesh_component_number>0.AND.mesh_component_number<=mesh%NUMBER_OF_COMPONENTS)
THEN 2825 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(component_number,variable_type)=mesh_component_number
2827 local_error=
"Mesh component number "//
trim(
number_to_vstring(mesh_component_number,
"*",err,error))// &
2828 &
" is invalid. The component number must be between 1 and "// &
2831 CALL flagerror(local_error,err,error,*999)
2835 & interpolation_type(component_number,variable_type),
"*",err,error))// &
2839 CALL flagerror(local_error,err,error,*999)
2846 &
trim(
number_to_vstring(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type),
"*",err,error))// &
2848 CALL flagerror(local_error,err,error,*999)
2852 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 2853 CALL flagerror(local_error,err,error,*999)
2856 local_error=
"The specified field variable type of "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
2857 &
" is invalid. The field variable type must be > 1 and <= "// &
2859 CALL flagerror(local_error,err,error,*999)
2862 CALL flagerror(
"Field create values cache is not associated.",err,error,*999)
2865 local_error=
"The decomposition mesh is not associated for field number "// &
2867 CALL flagerror(local_error,err,error,*999)
2870 local_error=
"The decomposition is not associated for field number "// &
2872 CALL flagerror(local_error,err,error,*999)
2876 CALL flagerror(
"Field is not associated.",err,error,*999)
2879 exits(
"FIELD_COMPONENT_MESH_COMPONENT_SET")
2881 999 errorsexits(
"FIELD_COMPONENT_MESH_COMPONENT_SET",err,error)
2883 END SUBROUTINE field_component_mesh_component_set
2890 SUBROUTINE field_component_mesh_component_set_and_lock(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,MESH_COMPONENT_NUMBER,ERR,ERROR,*)
2894 INTEGER(INTG),
INTENT(IN) :: variable_type
2895 INTEGER(INTG),
INTENT(IN) :: component_number
2896 INTEGER(INTG),
INTENT(IN) :: mesh_component_number
2897 INTEGER(INTG),
INTENT(OUT) :: err
2902 enters(
"FIELD_COMPONENT_MESH_COMPONENT_SET_AND_LOCK",err,error,*999)
2904 CALL field_component_mesh_component_set(field,variable_type,component_number,mesh_component_number,err,error,*999)
2905 IF(
ASSOCIATED(field))
THEN 2906 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 2907 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED(component_number,variable_type)=.true.
2909 local_error=
"Field create values cache is not associated for field number "// &
2911 CALL flagerror(local_error,err,error,*999)
2914 CALL flagerror(
"Field is not associated.",err,error,*999)
2918 999 errorsexits(
"FIELD_COMPONENT_MESH_COMPONENT_SET_AND_LOCK",err,error)
2920 END SUBROUTINE field_component_mesh_component_set_and_lock
2927 SUBROUTINE field_component_values_initialise_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
2931 INTEGER(INTG),
INTENT(IN) :: variable_type
2932 INTEGER(INTG),
INTENT(IN) :: field_set_type
2933 INTEGER(INTG),
INTENT(IN) :: component_number
2934 INTEGER(INTG),
INTENT(IN) ::
VALUE 2935 INTEGER(INTG),
INTENT(OUT) :: err
2938 INTEGER(INTG) :: element_idx,derivative_idx,version_idx,field_dof,node_idx,partial_deriv_idx,gauss_point_idx,max_ngp
2939 INTEGER(INTG),
POINTER :: field_parameters(:)
2948 enters(
"FIELD_COMPONENT_VALUES_INITIALISE_INTG",err,error,*999)
2950 NULLIFY(field_parameters)
2952 IF(
ASSOCIATED(field))
THEN 2953 IF(field%FIELD_FINISHED)
THEN 2955 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 2956 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
2957 IF(
ASSOCIATED(field_variable))
THEN 2959 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 2961 IF(component_number>0.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 2963 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 2964 field_parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
2965 IF(
ASSOCIATED(field_parameter_set))
THEN 2970 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
2971 CASE(field_constant_interpolation)
2972 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
2973 field_parameters(field_dof)=
VALUE 2974 CASE(field_element_based_interpolation)
2975 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
2976 IF(
ASSOCIATED(component_domain))
THEN 2977 domain_topology=>component_domain%TOPOLOGY
2978 IF(
ASSOCIATED(domain_topology))
THEN 2979 domain_elements=>domain_topology%ELEMENTS
2980 IF(
ASSOCIATED(domain_elements))
THEN 2981 DO element_idx=1,domain_elements%TOTAL_NUMBER_OF_ELEMENTS
2982 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
2983 & element_param2dof_map%ELEMENTS(element_idx)
2984 field_parameters(field_dof)=
VALUE 2987 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
2990 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
2993 CALL flagerror(
"Domain is not associated.",err,error,*999)
2995 CASE(field_node_based_interpolation)
2996 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
2997 IF(
ASSOCIATED(component_domain))
THEN 2998 domain_topology=>component_domain%TOPOLOGY
2999 IF(
ASSOCIATED(domain_topology))
THEN 3000 domain_nodes=>domain_topology%NODES
3001 IF(
ASSOCIATED(domain_nodes))
THEN 3002 DO node_idx=1,domain_nodes%TOTAL_NUMBER_OF_NODES
3003 DO derivative_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
3004 DO version_idx=1,domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
3005 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3006 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(derivative_idx)%VERSIONS(version_idx)
3007 partial_deriv_idx= &
3008 & domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%PARTIAL_DERIVATIVE_INDEX
3009 SELECT CASE(partial_deriv_idx)
3011 field_parameters(field_dof)=
VALUE 3013 field_parameters(field_dof)=1_intg
3014 CASE(part_deriv_s1_s1)
3015 field_parameters(field_dof)=0_intg
3017 field_parameters(field_dof)=1_intg
3018 CASE(part_deriv_s2_s2)
3019 field_parameters(field_dof)=0_intg
3020 CASE(part_deriv_s1_s2)
3021 field_parameters(field_dof)=0_intg
3023 field_parameters(field_dof)=1_intg
3024 CASE(part_deriv_s3_s3)
3025 field_parameters(field_dof)=0_intg
3026 CASE(part_deriv_s1_s3)
3027 field_parameters(field_dof)=0_intg
3028 CASE(part_deriv_s2_s3)
3029 field_parameters(field_dof)=0_intg
3030 CASE(part_deriv_s1_s2_s3)
3031 field_parameters(field_dof)=0_intg
3033 local_error=
"The partial derivative index of "// &
3037 CALL flagerror(local_error,err,error,*999)
3043 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
3046 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3049 CALL flagerror(
"Domain is not associated.",err,error,*999)
3051 CASE(field_grid_point_based_interpolation)
3052 CALL flagerror(
"Not implemented.",err,error,*999)
3053 CASE(field_gauss_point_based_interpolation)
3054 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3055 IF(
ASSOCIATED(component_domain))
THEN 3056 domain_topology=>component_domain%TOPOLOGY
3057 IF(
ASSOCIATED(domain_topology))
THEN 3058 domain_elements=>domain_topology%ELEMENTS
3059 IF(
ASSOCIATED(domain_elements))
THEN 3061 max_ngp=
SIZE(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3062 & gauss_point_param2dof_map%GAUSS_POINTS,1)
3063 DO element_idx=1,domain_elements%TOTAL_NUMBER_OF_ELEMENTS
3064 DO gauss_point_idx=1,max_ngp
3065 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3066 & gauss_point_param2dof_map%GAUSS_POINTS(gauss_point_idx,element_idx)
3067 field_parameters(field_dof)=
VALUE 3071 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
3074 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3077 CALL flagerror(
"Domain is not associated.",err,error,*999)
3079 CASE(field_data_point_based_interpolation)
3080 CALL flagerror(
"Not implemented.",err,error,*999)
3083 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
3084 &
" is invalid for component number "// &
3088 CALL flagerror(local_error,err,error,*999)
3093 local_error=
"The field parameter set type of "//
trim(
number_to_vstring(field_set_type,
"*",err,error))// &
3094 &
" has not been created on variable type "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
3096 CALL flagerror(local_error,err,error,*999)
3099 local_error=
"The field parameter set type of "//
trim(
number_to_vstring(field_set_type,
"*",err,error))// &
3100 &
" is invalid. The field parameter set type must be between 1 and "// &
3102 CALL flagerror(local_error,err,error,*999)
3105 local_error=
"The field variable component number of "// &
3109 &
". The number of components must be between 1 and "// &
3111 CALL flagerror(local_error,err,error,*999)
3114 local_error=
"The field variable data type of "//
trim(
number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
3115 &
" does not match the integer data type of the specified value." 3116 CALL flagerror(local_error,err,error,*999)
3121 CALL flagerror(local_error,err,error,*999)
3125 &
" is invalid. The field variable type must be between 1 and "// &
3127 CALL flagerror(local_error,err,error,*999)
3131 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 3132 CALL flagerror(local_error,err,error,*999)
3135 CALL flagerror(
"Field is not associated.",err,error,*999)
3138 exits(
"FIELD_COMPONENT_VALUES_INITIALISE_INTG")
3140 999 errorsexits(
"FIELD_COMPONENT_VALUES_INITIALISE_INTG",err,error)
3142 END SUBROUTINE field_component_values_initialise_intg
3149 SUBROUTINE field_component_values_initialise_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
3153 INTEGER(INTG),
INTENT(IN) :: variable_type
3154 INTEGER(INTG),
INTENT(IN) :: field_set_type
3155 INTEGER(INTG),
INTENT(IN) :: component_number
3156 REAL(SP),
INTENT(IN) ::
VALUE 3157 INTEGER(INTG),
INTENT(OUT) :: err
3160 INTEGER(INTG) :: element_idx,derivative_idx,version_idx,field_dof,node_idx,partial_deriv_idx,gauss_point_idx,max_ngp
3161 REAL(SP),
POINTER :: field_parameters(:)
3170 enters(
"FIELD_COMPONENT_VALUES_INITIALISE_SP",err,error,*999)
3172 NULLIFY(field_parameters)
3174 IF(
ASSOCIATED(field))
THEN 3175 IF(field%FIELD_FINISHED)
THEN 3177 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 3178 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
3179 IF(
ASSOCIATED(field_variable))
THEN 3181 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 3183 IF(component_number>0.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 3185 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 3186 field_parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
3187 IF(
ASSOCIATED(field_parameter_set))
THEN 3192 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
3193 CASE(field_constant_interpolation)
3194 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
3195 field_parameters(field_dof)=
VALUE 3196 CASE(field_element_based_interpolation)
3197 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3198 IF(
ASSOCIATED(component_domain))
THEN 3199 domain_topology=>component_domain%TOPOLOGY
3200 IF(
ASSOCIATED(domain_topology))
THEN 3201 domain_elements=>domain_topology%ELEMENTS
3202 IF(
ASSOCIATED(domain_elements))
THEN 3203 DO element_idx=1,domain_elements%TOTAL_NUMBER_OF_ELEMENTS
3204 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3205 & element_param2dof_map%ELEMENTS(element_idx)
3206 field_parameters(field_dof)=
VALUE 3209 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
3212 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3215 CALL flagerror(
"Domain is not associated.",err,error,*999)
3217 CASE(field_node_based_interpolation)
3218 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3219 IF(
ASSOCIATED(component_domain))
THEN 3220 domain_topology=>component_domain%TOPOLOGY
3221 IF(
ASSOCIATED(domain_topology))
THEN 3222 domain_nodes=>domain_topology%NODES
3223 IF(
ASSOCIATED(domain_nodes))
THEN 3224 DO node_idx=1,domain_nodes%TOTAL_NUMBER_OF_NODES
3225 DO derivative_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
3226 DO version_idx=1,domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
3227 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3228 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(derivative_idx)%VERSIONS(version_idx)
3229 partial_deriv_idx= &
3230 & domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%PARTIAL_DERIVATIVE_INDEX
3231 SELECT CASE(partial_deriv_idx)
3233 field_parameters(field_dof)=
VALUE 3235 field_parameters(field_dof)=1.0_sp
3236 CASE(part_deriv_s1_s1)
3237 field_parameters(field_dof)=0.0_sp
3239 field_parameters(field_dof)=1.0_sp
3240 CASE(part_deriv_s2_s2)
3241 field_parameters(field_dof)=0.0_sp
3242 CASE(part_deriv_s1_s2)
3243 field_parameters(field_dof)=0.0_sp
3245 field_parameters(field_dof)=1.0_sp
3246 CASE(part_deriv_s3_s3)
3247 field_parameters(field_dof)=0.0_sp
3248 CASE(part_deriv_s1_s3)
3249 field_parameters(field_dof)=0.0_sp
3250 CASE(part_deriv_s2_s3)
3251 field_parameters(field_dof)=0.0_sp
3252 CASE(part_deriv_s1_s2_s3)
3253 field_parameters(field_dof)=0.0_sp
3255 local_error=
"The partial derivative index of "// &
3259 CALL flagerror(local_error,err,error,*999)
3265 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
3268 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3271 CALL flagerror(
"Domain is not associated.",err,error,*999)
3273 CASE(field_grid_point_based_interpolation)
3274 CALL flagerror(
"Not implemented.",err,error,*999)
3275 CASE(field_gauss_point_based_interpolation)
3276 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3277 IF(
ASSOCIATED(component_domain))
THEN 3278 domain_topology=>component_domain%TOPOLOGY
3279 IF(
ASSOCIATED(domain_topology))
THEN 3280 domain_elements=>domain_topology%ELEMENTS
3281 IF(
ASSOCIATED(domain_elements))
THEN 3283 max_ngp=
SIZE(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3284 & gauss_point_param2dof_map%GAUSS_POINTS,1)
3285 DO element_idx=1,domain_elements%TOTAL_NUMBER_OF_ELEMENTS
3286 DO gauss_point_idx=1,max_ngp
3287 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3288 & gauss_point_param2dof_map%GAUSS_POINTS(gauss_point_idx,element_idx)
3289 field_parameters(field_dof)=
VALUE 3293 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
3296 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3299 CALL flagerror(
"Domain is not associated.",err,error,*999)
3303 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
3304 &
" is invalid for component number "// &
3308 CALL flagerror(local_error,err,error,*999)
3313 local_error=
"The field parameter set type of "//
trim(
number_to_vstring(field_set_type,
"*",err,error))// &
3314 &
" has not been created on variable type "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
3316 CALL flagerror(local_error,err,error,*999)
3319 local_error=
"The field parameter set type of "//
trim(
number_to_vstring(field_set_type,
"*",err,error))// &
3320 &
" is invalid. The field parameter set type must be between 1 and "// &
3322 CALL flagerror(local_error,err,error,*999)
3325 local_error=
"The field variable component number of "// &
3329 &
". The number of components must be between 1 and "// &
3331 CALL flagerror(local_error,err,error,*999)
3334 local_error=
"The field variable data type of "//
trim(
number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
3335 &
" does not match the single precision data type of the specified value." 3336 CALL flagerror(local_error,err,error,*999)
3341 CALL flagerror(local_error,err,error,*999)
3345 &
" is invalid. The field variable type must be between 1 and "// &
3347 CALL flagerror(local_error,err,error,*999)
3350 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 3351 CALL flagerror(local_error,err,error,*999)
3354 CALL flagerror(
"Field is not associated.",err,error,*999)
3357 exits(
"FIELD_COMPONENT_VALUES_INITIALISE_SP")
3359 999 errorsexits(
"FIELD_COMPONENT_VALUES_INITIALISE_SP",err,error)
3361 END SUBROUTINE field_component_values_initialise_sp
3368 SUBROUTINE field_component_values_initialise_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
3372 INTEGER(INTG),
INTENT(IN) :: variable_type
3373 INTEGER(INTG),
INTENT(IN) :: field_set_type
3374 INTEGER(INTG),
INTENT(IN) :: component_number
3375 REAL(DP),
INTENT(IN) ::
VALUE 3376 INTEGER(INTG),
INTENT(OUT) :: err
3379 INTEGER(INTG) :: elementidx,derivative_idx,version_idx,field_dof,node_idx,partial_deriv_idx,gauss_point_idx,max_ngp, &
3380 & dataPointIdx,localDataPointNumber
3381 REAL(DP),
POINTER :: field_parameters(:)
3391 enters(
"FIELD_COMPONENT_VALUES_INITIALISE_DP",err,error,*999)
3393 NULLIFY(field_parameters)
3395 IF(
ASSOCIATED(field))
THEN 3396 IF(field%FIELD_FINISHED)
THEN 3398 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 3399 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
3400 IF(
ASSOCIATED(field_variable))
THEN 3402 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 3404 IF(component_number>0.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 3406 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 3407 field_parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
3408 IF(
ASSOCIATED(field_parameter_set))
THEN 3413 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
3414 CASE(field_constant_interpolation)
3415 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
3416 field_parameters(field_dof)=
VALUE 3417 CASE(field_element_based_interpolation)
3418 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3419 IF(
ASSOCIATED(component_domain))
THEN 3420 domain_topology=>component_domain%TOPOLOGY
3421 IF(
ASSOCIATED(domain_topology))
THEN 3422 domain_elements=>domain_topology%ELEMENTS
3423 IF(
ASSOCIATED(domain_elements))
THEN 3424 DO elementidx=1,domain_elements%TOTAL_NUMBER_OF_ELEMENTS
3425 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3426 & element_param2dof_map%ELEMENTS(elementidx)
3427 field_parameters(field_dof)=
VALUE 3430 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
3433 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3436 CALL flagerror(
"Domain is not associated.",err,error,*999)
3438 CASE(field_node_based_interpolation)
3439 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3440 IF(
ASSOCIATED(component_domain))
THEN 3441 domain_topology=>component_domain%TOPOLOGY
3442 IF(
ASSOCIATED(domain_topology))
THEN 3443 domain_nodes=>domain_topology%NODES
3444 IF(
ASSOCIATED(domain_nodes))
THEN 3445 DO node_idx=1,domain_nodes%TOTAL_NUMBER_OF_NODES
3446 DO derivative_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
3447 DO version_idx=1,domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
3448 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3449 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(derivative_idx)%VERSIONS(version_idx)
3450 partial_deriv_idx= &
3451 & domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%PARTIAL_DERIVATIVE_INDEX
3452 SELECT CASE(partial_deriv_idx)
3454 field_parameters(field_dof)=
VALUE 3456 field_parameters(field_dof)=1.0_dp
3457 CASE(part_deriv_s1_s1)
3458 field_parameters(field_dof)=0.0_dp
3460 field_parameters(field_dof)=1.0_dp
3461 CASE(part_deriv_s2_s2)
3462 field_parameters(field_dof)=0.0_dp
3463 CASE(part_deriv_s1_s2)
3464 field_parameters(field_dof)=0.0_dp
3466 field_parameters(field_dof)=1.0_dp
3467 CASE(part_deriv_s3_s3)
3468 field_parameters(field_dof)=0.0_dp
3469 CASE(part_deriv_s1_s3)
3470 field_parameters(field_dof)=0.0_dp
3471 CASE(part_deriv_s2_s3)
3472 field_parameters(field_dof)=0.0_dp
3473 CASE(part_deriv_s1_s2_s3)
3474 field_parameters(field_dof)=0.0_dp
3476 local_error=
"The partial derivative index of "// &
3480 CALL flagerror(local_error,err,error,*999)
3486 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
3489 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3492 CALL flagerror(
"Domain is not associated.",err,error,*999)
3494 CASE(field_grid_point_based_interpolation)
3495 CALL flagerror(
"Not implemented.",err,error,*999)
3496 CASE(field_gauss_point_based_interpolation)
3497 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3498 IF(
ASSOCIATED(component_domain))
THEN 3499 domain_topology=>component_domain%TOPOLOGY
3500 IF(
ASSOCIATED(domain_topology))
THEN 3501 domain_elements=>domain_topology%ELEMENTS
3502 IF(
ASSOCIATED(domain_elements))
THEN 3504 max_ngp=
SIZE(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3505 & gauss_point_param2dof_map%GAUSS_POINTS,1)
3506 DO elementidx=1,domain_elements%TOTAL_NUMBER_OF_ELEMENTS
3507 DO gauss_point_idx=1,max_ngp
3508 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3509 & gauss_point_param2dof_map%GAUSS_POINTS(gauss_point_idx,elementidx)
3510 field_parameters(field_dof)=
VALUE 3514 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
3517 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3520 CALL flagerror(
"Domain is not associated.",err,error,*999)
3522 CASE(field_data_point_based_interpolation)
3523 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3524 IF(
ASSOCIATED(component_domain))
THEN 3525 domain_topology=>component_domain%TOPOLOGY
3526 IF(
ASSOCIATED(domain_topology))
THEN 3527 domain_elements=>domain_topology%ELEMENTS
3528 IF(
ASSOCIATED(domain_elements))
THEN 3529 decompositiondata=>field_variable%COMPONENTS(component_number)%DOMAIN%DECOMPOSITION%TOPOLOGY%dataPoints
3530 IF(
ASSOCIATED(decompositiondata))
THEN 3531 DO elementidx=1,domain_elements%TOTAL_NUMBER_OF_ELEMENTS
3532 DO datapointidx=1,decompositiondata%elementDataPoint(elementidx)%numberOfProjectedData
3533 localdatapointnumber=decompositiondata%elementDataPoint(elementidx)%dataIndices(datapointidx)% &
3535 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3536 & data_point_param2dof_map%DATA_POINTS(localdatapointnumber)
3537 field_parameters(field_dof)=
VALUE 3541 CALL flagerror(
"Decomposition data point topology is not associated.",err,error,*999)
3545 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
3548 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3551 CALL flagerror(
"Domain is not associated.",err,error,*999)
3555 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
3556 &
" is invalid for component number "// &
3560 CALL flagerror(local_error,err,error,*999)
3565 local_error=
"The field parameter set type of "//
trim(
number_to_vstring(field_set_type,
"*",err,error))// &
3566 &
" has not been created on variable type "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
3568 CALL flagerror(local_error,err,error,*999)
3571 local_error=
"The field parameter set type of "//
trim(
number_to_vstring(field_set_type,
"*",err,error))// &
3572 &
" is invalid. The field parameter set type must be between 1 and "// &
3574 CALL flagerror(local_error,err,error,*999)
3577 local_error=
"The field variable component number of "// &
3581 &
". The number of components must be between 1 and "// &
3583 CALL flagerror(local_error,err,error,*999)
3586 local_error=
"The field variable data type of "//
trim(
number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
3587 &
" does not match the double precision data type of the specified value." 3588 CALL flagerror(local_error,err,error,*999)
3593 CALL flagerror(local_error,err,error,*999)
3597 &
" is invalid. The field variable type must be between 1 and "// &
3599 CALL flagerror(local_error,err,error,*999)
3602 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 3603 CALL flagerror(local_error,err,error,*999)
3606 CALL flagerror(
"Field is not associated.",err,error,*999)
3609 exits(
"FIELD_COMPONENT_VALUES_INITIALISE_DP")
3611 999 errorsexits(
"FIELD_COMPONENT_VALUES_INITIALISE_DP",err,error)
3613 END SUBROUTINE field_component_values_initialise_dp
3620 SUBROUTINE field_component_values_initialise_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
3624 INTEGER(INTG),
INTENT(IN) :: variable_type
3625 INTEGER(INTG),
INTENT(IN) :: field_set_type
3626 INTEGER(INTG),
INTENT(IN) :: component_number
3627 LOGICAL,
INTENT(IN) ::
VALUE 3628 INTEGER(INTG),
INTENT(OUT) :: err
3631 INTEGER(INTG) :: element_idx,derivative_idx,version_idx,field_dof,node_idx,partial_deriv_idx
3632 LOGICAL,
POINTER :: field_parameters(:)
3641 enters(
"FIELD_COMPONENT_VALUES_INITIALISE_L",err,error,*999)
3643 NULLIFY(field_parameters)
3645 IF(
ASSOCIATED(field))
THEN 3646 IF(field%FIELD_FINISHED)
THEN 3648 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 3649 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
3650 IF(
ASSOCIATED(field_variable))
THEN 3652 IF(field_variable%DATA_TYPE==field_l_type)
THEN 3654 IF(component_number>0.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 3656 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 3657 field_parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
3658 IF(
ASSOCIATED(field_parameter_set))
THEN 3663 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
3664 CASE(field_constant_interpolation)
3665 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
3666 field_parameters(field_dof)=
VALUE 3667 CASE(field_element_based_interpolation)
3668 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3669 IF(
ASSOCIATED(component_domain))
THEN 3670 domain_topology=>component_domain%TOPOLOGY
3671 IF(
ASSOCIATED(domain_topology))
THEN 3672 domain_elements=>domain_topology%ELEMENTS
3673 IF(
ASSOCIATED(domain_elements))
THEN 3674 DO element_idx=1,domain_elements%TOTAL_NUMBER_OF_ELEMENTS
3675 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3676 & element_param2dof_map%ELEMENTS(element_idx)
3677 field_parameters(field_dof)=
VALUE 3680 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
3683 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3686 CALL flagerror(
"Domain is not associated.",err,error,*999)
3688 CASE(field_node_based_interpolation)
3689 component_domain=>field_variable%COMPONENTS(component_number)%DOMAIN
3690 IF(
ASSOCIATED(component_domain))
THEN 3691 domain_topology=>component_domain%TOPOLOGY
3692 IF(
ASSOCIATED(domain_topology))
THEN 3693 domain_nodes=>domain_topology%NODES
3694 IF(
ASSOCIATED(domain_nodes))
THEN 3695 DO node_idx=1,domain_nodes%TOTAL_NUMBER_OF_NODES
3696 DO derivative_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
3697 DO version_idx=1,domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
3698 field_dof=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
3699 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(derivative_idx)%VERSIONS(version_idx)
3700 partial_deriv_idx= &
3701 & domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%PARTIAL_DERIVATIVE_INDEX
3702 SELECT CASE(partial_deriv_idx)
3704 field_parameters(field_dof)=
VALUE 3706 field_parameters(field_dof)=.true.
3707 CASE(part_deriv_s1_s1)
3708 field_parameters(field_dof)=.false.
3710 field_parameters(field_dof)=.true.
3711 CASE(part_deriv_s2_s2)
3712 field_parameters(field_dof)=.false.
3713 CASE(part_deriv_s1_s2)
3714 field_parameters(field_dof)=.false.
3716 field_parameters(field_dof)=.true.
3717 CASE(part_deriv_s3_s3)
3718 field_parameters(field_dof)=.false.
3719 CASE(part_deriv_s1_s3)
3720 field_parameters(field_dof)=.false.
3721 CASE(part_deriv_s2_s3)
3722 field_parameters(field_dof)=.false.
3723 CASE(part_deriv_s1_s2_s3)
3724 field_parameters(field_dof)=.false.
3726 local_error=
"The partial derivative index of "// &
3730 CALL flagerror(local_error,err,error,*999)
3736 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
3739 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3742 CALL flagerror(
"Domain is not associated.",err,error,*999)
3744 CASE(field_grid_point_based_interpolation)
3745 CALL flagerror(
"Not implemented.",err,error,*999)
3746 CASE(field_gauss_point_based_interpolation)
3747 CALL flagerror(
"Not implemented.",err,error,*999)
3748 CASE(field_data_point_based_interpolation)
3749 CALL flagerror(
"Not implemented.",err,error,*999)
3752 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
3753 &
" is invalid for component number "// &
3757 CALL flagerror(local_error,err,error,*999)
3762 local_error=
"The field parameter set type of "//
trim(
number_to_vstring(field_set_type,
"*",err,error))// &
3763 &
" has not been created on variable type "//
trim(
number_to_vstring(variable_type,
"*",err,error))// &
3765 CALL flagerror(local_error,err,error,*999)
3768 local_error=
"The field parameter set type of "//
trim(
number_to_vstring(field_set_type,
"*",err,error))// &
3769 &
" is invalid. The field parameter set type must be between 1 and "// &
3771 CALL flagerror(local_error,err,error,*999)
3774 local_error=
"The field variable component number of "// &
3778 &
". The number of components must be between 1 and "// &
3780 CALL flagerror(local_error,err,error,*999)
3783 local_error=
"The field variable data type of "//
trim(
number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
3784 &
" does not match the logical data type of the specified value." 3785 CALL flagerror(local_error,err,error,*999)
3790 CALL flagerror(local_error,err,error,*999)
3794 &
" is invalid. The field variable type must be between 1 and "// &
3796 CALL flagerror(local_error,err,error,*999)
3799 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 3800 CALL flagerror(local_error,err,error,*999)
3803 CALL flagerror(
"Field is not associated.",err,error,*999)
3806 exits(
"FIELD_COMPONENT_VALUES_INITIALISE_L")
3808 999 errorsexits(
"FIELD_COMPONENT_VALUES_INITIALISE_L",err,error)
3810 END SUBROUTINE field_component_values_initialise_l
3817 SUBROUTINE field_coordinate_system_get(FIELD,COORDINATE_SYSTEM,ERR,ERROR,*)
3822 INTEGER(INTG),
INTENT(OUT) :: err
3829 enters(
"FIELD_COORDINATE_SYSTEM_GET",err,error,*999)
3831 IF(
ASSOCIATED(field))
THEN 3832 IF(
ASSOCIATED(coordinate_system))
THEN 3833 CALL flagerror(
"Coordinate system is already associated.",err,error,*999)
3835 NULLIFY(coordinate_system)
3837 region=>field%REGION
3838 IF(
ASSOCIATED(region))
THEN 3839 coordinate_system=>region%COORDINATE_SYSTEM
3840 IF(.NOT.
ASSOCIATED(coordinate_system))
THEN 3841 local_error=
"The coordinate system is not associated for field number "// &
3844 CALL flagerror(local_error,err,error,*999)
3847 interface=>field%INTERFACE
3848 IF(
ASSOCIATED(interface))
THEN 3849 coordinate_system=>interface%COORDINATE_SYSTEM
3850 IF(.NOT.
ASSOCIATED(coordinate_system))
THEN 3851 local_error=
"The coordinate system is not associated for field number "// &
3854 CALL flagerror(local_error,err,error,*999)
3857 local_error=
"The region or interface is not associated for field number "// &
3859 CALL flagerror(local_error,err,error,*999)
3864 CALL flagerror(
"Field is not associated.",err,error,*999)
3867 exits(
"FIELD_COORDINATE_SYSTEM_GET")
3869 999 errorsexits(
"FIELD_COORDINATE_SYSTEM_GET",err,error)
3871 END SUBROUTINE field_coordinate_system_get
3878 SUBROUTINE field_data_type_check(FIELD,VARIABLE_TYPE,DATA_TYPE,ERR,ERROR,*)
3882 INTEGER(INTG),
INTENT(IN) :: variable_type
3883 INTEGER(INTG),
INTENT(IN) :: data_type
3884 INTEGER(INTG),
INTENT(OUT) :: err
3890 enters(
"FIELD_DATA_TYPE_CHECK",err,error,*999)
3892 IF(
ASSOCIATED(field))
THEN 3893 IF(field%FIELD_FINISHED)
THEN 3894 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 3895 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
3896 IF(
ASSOCIATED(field_variable))
THEN 3897 SELECT CASE(data_type)
3898 CASE(field_intg_type)
3899 IF(field_variable%DATA_TYPE/=field_intg_type)
THEN 3900 local_error=
"Invalid data type. The data type for variable type "// &
3904 &
" which is not an integer data type." 3905 CALL flagerror(local_error,err,error,*999)
3908 IF(field_variable%DATA_TYPE/=field_sp_type)
THEN 3909 local_error=
"Invalid data type. The data type for variable type "// &
3913 &
" which is not a single precision data type." 3914 CALL flagerror(local_error,err,error,*999)
3921 IF(field_variable%DATA_TYPE/=field_dp_type)
THEN 3922 local_error=
"Invalid data type. The data type for variable type "// &
3926 &
" which is not a double precision data type." 3927 CALL flagerror(local_error,err,error,*999)
3930 IF(field_variable%DATA_TYPE/=field_l_type)
THEN 3931 local_error=
"Invalid data type. The data type for variable type "// &
3935 &
" which is not a logical data type." 3936 CALL flagerror(local_error,err,error,*999)
3941 CALL flagerror(local_error,err,error,*999)
3945 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 3946 CALL flagerror(local_error,err,error,*999)
3950 &
" is invalid. The variable type must be between 1 and "// &
3952 CALL flagerror(local_error,err,error,*999)
3956 &
" has not been finished." 3957 CALL flagerror(local_error,err,error,*999)
3960 CALL flagerror(
"Field is not associated.",err,error,*999)
3963 exits(
"FIELD_DATA_TYPE_CHECK")
3965 999 errorsexits(
"FIELD_DATA_TYPE_CHECK",err,error)
3967 END SUBROUTINE field_data_type_check
3974 SUBROUTINE field_data_type_get(FIELD,VARIABLE_TYPE,DATA_TYPE,ERR,ERROR,*)
3978 INTEGER(INTG),
INTENT(IN) :: variable_type
3979 INTEGER(INTG),
INTENT(OUT) :: data_type
3980 INTEGER(INTG),
INTENT(OUT) :: err
3986 enters(
"FIELD_DATA_TYPE_GET",err,error,*999)
3988 IF(
ASSOCIATED(field))
THEN 3989 IF(field%FIELD_FINISHED)
THEN 3990 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 3991 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
3992 IF(
ASSOCIATED(field_variable))
THEN 3993 data_type=field_variable%DATA_TYPE
3996 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 3997 CALL flagerror(local_error,err,error,*999)
4001 &
" is invalid. The variable type must be between 1 and "// &
4003 CALL flagerror(local_error,err,error,*999)
4007 &
" has not been finished." 4008 CALL flagerror(local_error,err,error,*999)
4011 CALL flagerror(
"Field is not associated.",err,error,*999)
4014 exits(
"FIELD_DATA_TYPE_GET")
4016 999 errorsexits(
"FIELD_DATA_TYPE_GET",err,error)
4018 END SUBROUTINE field_data_type_get
4025 SUBROUTINE field_data_type_set(FIELD,VARIABLE_TYPE,DATA_TYPE,ERR,ERROR,*)
4029 INTEGER(INTG),
INTENT(IN) :: variable_type
4030 INTEGER(INTG),
INTENT(IN) :: data_type
4031 INTEGER(INTG),
INTENT(OUT) :: err
4036 enters(
"FIELD_DATA_TYPE_SET",err,error,*999)
4038 IF(
ASSOCIATED(field))
THEN 4039 IF(field%FIELD_FINISHED)
THEN 4040 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 4041 CALL flagerror(local_error,err,error,*999)
4043 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 4044 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 4045 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 4046 IF(field%CREATE_VALUES_CACHE%DATA_TYPES_LOCKED(variable_type))
THEN 4047 local_error=
"The data type has been locked for variable type "// &
4050 CALL flagerror(local_error,err,error,*999)
4052 SELECT CASE(data_type)
4053 CASE(field_intg_type)
4054 field%CREATE_VALUES_CACHE%DATA_TYPES(variable_type)=field_intg_type
4056 field%CREATE_VALUES_CACHE%DATA_TYPES(variable_type)=field_sp_type
4058 field%CREATE_VALUES_CACHE%DATA_TYPES(variable_type)=field_dp_type
4060 field%CREATE_VALUES_CACHE%DATA_TYPES(variable_type)=field_l_type
4064 CALL flagerror(local_error,err,error,*999)
4069 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 4070 CALL flagerror(local_error,err,error,*999)
4074 &
" is invalid. The variable type must be between 1 and "// &
4076 CALL flagerror(local_error,err,error,*999)
4079 CALL flagerror(
"Field create values cache is not associated.",err,error,*999)
4083 CALL flagerror(
"Field is not associated.",err,error,*999)
4086 exits(
"FIELD_DATA_TYPE_SET")
4088 999 errorsexits(
"FIELD_DATA_TYPE_SET",err,error)
4090 END SUBROUTINE field_data_type_set
4097 SUBROUTINE field_data_type_set_and_lock(FIELD,VARIABLE_TYPE,DATA_TYPE,ERR,ERROR,*)
4101 INTEGER(INTG),
INTENT(IN) :: variable_type
4102 INTEGER(INTG),
INTENT(IN) :: data_type
4103 INTEGER(INTG),
INTENT(OUT) :: err
4108 enters(
"FIELD_DATA_TYPE_SET_AND_LOCK",err,error,*999)
4110 CALL field_data_type_set(field,variable_type,data_type,err,error,*999)
4111 IF(
ASSOCIATED(field))
THEN 4112 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 4113 field%CREATE_VALUES_CACHE%DATA_TYPES_LOCKED(variable_type)=.true.
4115 local_error=
"Field create values cache is not associated for field number "// &
4117 CALL flagerror(local_error,err,error,*999)
4120 CALL flagerror(
"Field is not associated.",err,error,*999)
4123 exits(
"FIELD_DATA_TYPE_SET_AND_LOCK")
4125 999 errorsexits(
"FIELD_DATA_TYPE_SET_AND_LOCK",err,error)
4127 END SUBROUTINE field_data_type_set_and_lock
4134 SUBROUTINE field_dof_order_type_check(FIELD,VARIABLE_TYPE,DOF_ORDER_TYPE,ERR,ERROR,*)
4138 INTEGER(INTG),
INTENT(IN) :: variable_type
4139 INTEGER(INTG),
INTENT(IN) :: dof_order_type
4140 INTEGER(INTG),
INTENT(OUT) :: err
4146 enters(
"FIELD_DOF_ORDER_TYPE_CHECK",err,error,*999)
4148 IF(
ASSOCIATED(field))
THEN 4149 IF(field%FIELD_FINISHED)
THEN 4150 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 4151 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
4152 IF(
ASSOCIATED(field_variable))
THEN 4153 SELECT CASE(dof_order_type)
4154 CASE(field_separated_component_dof_order)
4155 IF(field_variable%DOF_ORDER_TYPE/=field_separated_component_dof_order)
THEN 4156 local_error=
"Invalid DOF order type. The DOF order type for variable type "// &
4160 &
" which is not a separated component DOF order type." 4161 CALL flagerror(local_error,err,error,*999)
4163 CASE(field_contiguous_component_dof_order)
4164 IF(field_variable%DOF_ORDER_TYPE/=field_contiguous_component_dof_order)
THEN 4165 local_error=
"Invalid DOF order type. The DOF order type for variable type "// &
4169 &
" which is not a contiguous component DOF order type." 4170 CALL flagerror(local_error,err,error,*999)
4173 local_error=
"The specified DOF order type of "//
trim(
number_to_vstring(dof_order_type,
"*",err,error))// &
4175 CALL flagerror(local_error,err,error,*999)
4179 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 4180 CALL flagerror(local_error,err,error,*999)
4184 &
" is invalid. The variable type must be between 1 and "// &
4186 CALL flagerror(local_error,err,error,*999)
4190 &
" has not been finished." 4191 CALL flagerror(local_error,err,error,*999)
4194 CALL flagerror(
"Field is not associated.",err,error,*999)
4197 exits(
"FIELD_DOF_ORDER_TYPE_CHECK")
4199 999 errorsexits(
"FIELD_DOF_ORDER_TYPE_CHECK",err,error)
4201 END SUBROUTINE field_dof_order_type_check
4208 SUBROUTINE field_dof_order_type_get(FIELD,VARIABLE_TYPE,DOF_ORDER_TYPE,ERR,ERROR,*)
4212 INTEGER(INTG),
INTENT(IN) :: variable_type
4213 INTEGER(INTG),
INTENT(OUT) :: dof_order_type
4214 INTEGER(INTG),
INTENT(OUT) :: err
4220 enters(
"FIELD_DOF_ORDER_TYPE_GET",err,error,*999)
4222 IF(
ASSOCIATED(field))
THEN 4223 IF(field%FIELD_FINISHED)
THEN 4224 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 4225 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
4226 IF(
ASSOCIATED(field_variable))
THEN 4227 dof_order_type=field_variable%DOF_ORDER_TYPE
4230 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 4231 CALL flagerror(local_error,err,error,*999)
4235 &
" is invalid. The variable type must be between 1 and "// &
4237 CALL flagerror(local_error,err,error,*999)
4244 &
" has not been finished." 4245 CALL flagerror(local_error,err,error,*999)
4248 CALL flagerror(
"Field is not associated.",err,error,*999)
4251 exits(
"FIELD_DOF_ORDER_TYPE_GET")
4253 999 errorsexits(
"FIELD_DOF_ORDER_TYPE_GET",err,error)
4255 END SUBROUTINE field_dof_order_type_get
4262 SUBROUTINE field_dof_order_type_set(FIELD,VARIABLE_TYPE,DOF_ORDER_TYPE,ERR,ERROR,*)
4266 INTEGER(INTG),
INTENT(IN) :: variable_type
4267 INTEGER(INTG),
INTENT(IN) :: dof_order_type
4268 INTEGER(INTG),
INTENT(OUT) :: err
4271 INTEGER(INTG) :: component_idx
4272 LOGICAL :: same_interpolation,same_mesh_component
4275 enters(
"FIELD_DOF_ORDER_TYPE_SET",err,error,*999)
4277 IF(
ASSOCIATED(field))
THEN 4278 IF(field%FIELD_FINISHED)
THEN 4279 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 4280 CALL flagerror(local_error,err,error,*999)
4282 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 4283 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 4284 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 4285 IF(field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES_LOCKED(variable_type))
THEN 4286 local_error=
"The DOF order type has been locked for variable type "// &
4289 CALL flagerror(local_error,err,error,*999)
4291 SELECT CASE(dof_order_type)
4292 CASE(field_separated_component_dof_order)
4293 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES(variable_type)=field_separated_component_dof_order
4294 CASE(field_contiguous_component_dof_order)
4295 same_interpolation=.true.
4296 same_mesh_component=.true.
4297 DO component_idx=2,field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)
4298 IF(field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_idx,variable_type)/= &
4299 & field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(1,variable_type))
THEN 4300 same_interpolation=.false.
4303 IF(field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(component_idx,variable_type)/= &
4304 & field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(1,variable_type))
THEN 4305 same_mesh_component=.false.
4309 IF(same_interpolation.AND.same_mesh_component)
THEN 4310 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES(variable_type)=field_contiguous_component_dof_order
4312 CALL flagerror(
"Invalid field variable component set. For continguous component DOF "// &
4313 &
"ordering the field variable components must have the same interpolation type and mesh components.", &
4317 local_error=
"The specified DOF order type of "//
trim(
number_to_vstring(dof_order_type,
"*",err,error))// &
4319 CALL flagerror(local_error,err,error,*999)
4324 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 4325 CALL flagerror(local_error,err,error,*999)
4329 &
" is invalid. The variable type must be between 1 and "// &
4331 CALL flagerror(local_error,err,error,*999)
4334 CALL flagerror(
"Field create values cache is not associated.",err,error,*999)
4338 CALL flagerror(
"Field is not associated.",err,error,*999)
4341 exits(
"FIELD_DOF_ORDER_TYPE_SET")
4343 999 errorsexits(
"FIELD_DOF_ORDER_TYPE_SET",err,error)
4345 END SUBROUTINE field_dof_order_type_set
4352 SUBROUTINE field_dof_order_type_set_and_lock(FIELD,VARIABLE_TYPE,DOF_ORDER_TYPE,ERR,ERROR,*)
4356 INTEGER(INTG),
INTENT(IN) :: variable_type
4357 INTEGER(INTG),
INTENT(IN) :: dof_order_type
4358 INTEGER(INTG),
INTENT(OUT) :: err
4363 enters(
"FIELD_DOF_ORDER_TYPE_SET_AND_LOCK",err,error,*999)
4365 CALL field_dof_order_type_set(field,variable_type,dof_order_type,err,error,*999)
4366 IF(
ASSOCIATED(field))
THEN 4367 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 4368 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES_LOCKED(variable_type)=.true.
4370 local_error=
"Field create values cache is not associated for field number "// &
4372 CALL flagerror(local_error,err,error,*999)
4375 CALL flagerror(
"Field is not associated.",err,error,*999)
4378 exits(
"FIELD_DOF_ORDER_TYPE_SET_AND_LOCK")
4380 999 errorsexits(
"FIELD_DOF_ORDER_TYPE_SET_AND_LOCK",err,error)
4382 END SUBROUTINE field_dof_order_type_set_and_lock
4390 SUBROUTINE field_variable_component_finalise(FIELD_VARIABLE_COMPONENT,ERR,ERROR,*)
4394 INTEGER(INTG),
INTENT(OUT) :: err
4398 enters(
"FIELD_VARIABLE_COMPONENT_FINALISE",err,error,*999)
4400 field_variable_component%COMPONENT_LABEL=
"" 4401 CALL fieldvariablecomponent_parametertodofmapfinalise(field_variable_component,err,error,*999)
4403 exits(
"FIELD_VARIABLE_COMPONENT_FINALISE")
4405 999 errorsexits(
"FIELD_VARIABLE_COMPONENT_FINALISE",err,error)
4407 END SUBROUTINE field_variable_component_finalise
4414 SUBROUTINE field_variable_component_initialise(FIELD_VARIABLE,COMPONENT_NUMBER,ERR,ERROR,*)
4418 INTEGER(INTG),
INTENT(IN) :: component_number
4419 INTEGER(INTG),
INTENT(OUT) :: err
4422 INTEGER(INTG) :: comp_number,derivativeidx,dummy_err,ne,variable_type, ngp, maxinterp,globalelementnumber,nodeidx,numparameters
4430 enters(
"FIELD_VARIABLE_COMPONENT_INITIALISE",err,error,*998)
4432 IF(
ASSOCIATED(field_variable))
THEN 4433 field=>field_variable%FIELD
4434 IF(
ASSOCIATED(field))
THEN 4435 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 4436 variable_type=field_variable%VARIABLE_TYPE
4437 IF(
ALLOCATED(field_variable%COMPONENTS))
THEN 4438 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 4439 field_variable%COMPONENTS(component_number)%COMPONENT_NUMBER=component_number
4440 field_variable%COMPONENTS(component_number)%FIELD_VARIABLE=>field_variable
4441 decomposition=>field%DECOMPOSITION
4442 IF(
ASSOCIATED(decomposition))
THEN 4443 mesh=>decomposition%MESH
4444 IF(
ASSOCIATED(mesh))
THEN 4445 comp_number=field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(component_number,variable_type)
4446 IF(comp_number>0.AND.comp_number<=mesh%NUMBER_OF_COMPONENTS)
THEN 4447 field_variable%COMPONENTS(component_number)%MESH_COMPONENT_NUMBER=comp_number
4448 field_variable%COMPONENTS(component_number)%DOMAIN=>decomposition%DOMAIN(comp_number)%PTR
4449 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
4450 IF(.NOT.
ASSOCIATED(domain))
THEN 4454 &
" does not have a domain associated." 4455 CALL flagerror(local_error,err,error,*999)
4462 &
" is invalid. The component number must be between 1 and "// &
4464 CALL flagerror(local_error,err,error,*999)
4467 local_error=
"Decomposition mesh is not associated for field number "// &
4469 CALL flagerror(local_error,err,error,*999)
4472 local_error=
"Decomposition is not associated for field number "// &
4474 CALL flagerror(local_error,err,error,*999)
4476 field_variable%COMPONENTS(component_number)%COMPONENT_LABEL=
"" 4477 field_variable%COMPONENTS(component_number)%COMPONENT_LABEL= &
4478 & field%CREATE_VALUES_CACHE%COMPONENT_LABELS(component_number,variable_type)
4479 field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE= &
4480 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_number,variable_type)
4481 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
4482 CASE(field_constant_interpolation)
4483 field_variable%COMPONENTS(component_number)%maxNumberElementInterpolationParameters=1
4484 field_variable%COMPONENTS(component_number)%maxNumberNodeInterpolationParameters=0
4485 CASE(field_element_based_interpolation)
4486 field_variable%COMPONENTS(component_number)%maxNumberElementInterpolationParameters=1
4487 field_variable%COMPONENTS(component_number)%maxNumberNodeInterpolationParameters=0
4488 CASE(field_node_based_interpolation)
4489 field_variable%COMPONENTS(component_number)%maxNumberElementInterpolationParameters=-1
4490 DO ne=1,domain%TOPOLOGY%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS
4491 basis=>domain%TOPOLOGY%ELEMENTS%ELEMENTS(ne)%BASIS
4492 IF(basis%NUMBER_OF_ELEMENT_PARAMETERS>field_variable%COMPONENTS(component_number)% &
4493 & maxnumberelementinterpolationparameters) field_variable%COMPONENTS(component_number)% &
4494 & maxnumberelementinterpolationparameters=basis%NUMBER_OF_ELEMENT_PARAMETERS
4496 field_variable%COMPONENTS(component_number)%maxNumberNodeInterpolationParameters=-1
4497 DO nodeidx=1,domain%TOPOLOGY%NODES%TOTAL_NUMBER_OF_NODES
4499 DO derivativeidx=1,domain%TOPOLOGY%NODES%NODES(nodeidx)%NUMBER_OF_DERIVATIVES
4500 numparameters=numparameters+domain%TOPOLOGY%NODES%NODES(nodeidx)%DERIVATIVES(derivativeidx)%numberOfVersions
4502 IF(numparameters>field_variable%COMPONENTS(component_number)%maxNumberNodeInterpolationParameters) &
4503 & field_variable%COMPONENTS(component_number)%maxNumberNodeInterpolationParameters=numparameters
4505 CASE(field_grid_point_based_interpolation)
4506 CALL flagerror(
"Not implemented.",err,error,*999)
4507 CASE(field_gauss_point_based_interpolation)
4509 DO ne=1,domain%TOPOLOGY%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS
4510 basis=>domain%TOPOLOGY%ELEMENTS%ELEMENTS(ne)%BASIS
4512 IF(ngp > maxinterp) maxinterp = ngp
4514 field_variable%COMPONENTS(component_number)%maxNumberElementInterpolationParameters = maxinterp
4515 field_variable%COMPONENTS(component_number)%maxNumberNodeInterpolationParameters = 0
4516 CASE(field_data_point_based_interpolation)
4517 WRITE(*,*)
"In datapointbasedinterpolation" 4518 field_variable%COMPONENTS(component_number)%maxNumberElementInterpolationParameters=-1
4519 WRITE(*,*)
"DOMAIN%TOPOLOGY%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS", domain%TOPOLOGY%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS
4520 DO ne=1,domain%TOPOLOGY%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS
4521 WRITE(*,*)
"In forloop", ne
4522 globalelementnumber=decomposition%TOPOLOGY%ELEMENTS%ELEMENTS(ne)%GLOBAL_NUMBER
4523 WRITE(*,*)
"DECOMPOSITION%TOPOLOGY%ELEMENTS%ELEMENTS(ne)%GLOBAL_NUMBER", &
4524 & decomposition%TOPOLOGY%ELEMENTS%ELEMENTS(ne)%GLOBAL_NUMBER
4525 WRITE(*,*)
"Before if" 4526 IF(
ASSOCIATED(decomposition%TOPOLOGY%dataPoints))
THEN 4527 WRITE(*,*)
"DECOMPOSITION%TOPOLOGY%dataPoints%numberOfElementDataPoints(globalElementNumber)" 4529 WRITE(*,*)
"NOT ALLOCATED" 4531 IF(decomposition%TOPOLOGY%dataPoints%numberOfElementDataPoints(globalelementnumber)> &
4532 & field_variable%COMPONENTS(component_number)%maxNumberElementInterpolationParameters)
THEN 4533 field_variable%COMPONENTS(component_number)%maxNumberElementInterpolationParameters= &
4534 & decomposition%TOPOLOGY%dataPoints%numberOfElementDataPoints(globalelementnumber)
4535 WRITE(*,*)
"In if loop" 4538 field_variable%COMPONENTS(component_number)%maxNumberNodeInterpolationParameters=0
4539 WRITE(*,*)
"BEFORE PARAM TO DOF MAP" 4542 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
4547 CALL fieldvariablecomponent_parametertodofmapinitialise(field_variable%COMPONENTS(component_number), &
4554 CALL flagerror(local_error,err,error,*998)
4557 CALL flagerror(
"Field variable components have not been allocated.",err,error,*998)
4560 CALL flagerror(
"Field create values cache is not associated.",err,error,*998)
4563 CALL flagerror(
"Field variable field is not associated.",err,error,*998)
4566 CALL flagerror(
"Field variable is is not associated.",err,error,*998)
4569 exits(
"FIELD_VARIABLE_COMPONENT_INITIALISE")
4571 999
CALL field_variable_component_finalise(field_variable%COMPONENTS(component_number),dummy_err,dummy_error,*998)
4572 998 errorsexits(
"FIELD_VARIABLE_COMPONENT_INITIALISE",err,error)
4574 END SUBROUTINE field_variable_component_initialise
4581 SUBROUTINE fieldvariablecomponent_parametertodofmapfinalise(FIELD_VARIABLE_COMPONENT,ERR,ERROR,*)
4585 INTEGER(INTG),
INTENT(OUT) :: err
4589 enters(
"FieldVariableComponent_ParameterToDofMapFinalise",err,error,*999)
4591 IF(
ALLOCATED(field_variable_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES)) &
4592 &
DEALLOCATE(field_variable_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES)
4593 IF(
ALLOCATED(field_variable_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS)) &
4594 &
DEALLOCATE(field_variable_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS)
4595 IF(
ALLOCATED(field_variable_component%PARAM_TO_DOF_MAP%GRID_POINT_PARAM2DOF_MAP%GRID_POINTS)) &
4596 &
DEALLOCATE(field_variable_component%PARAM_TO_DOF_MAP%GRID_POINT_PARAM2DOF_MAP%GRID_POINTS)
4597 IF(
ALLOCATED(field_variable_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS)) &
4598 &
DEALLOCATE(field_variable_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS)
4599 IF(
ALLOCATED(field_variable_component%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP%DATA_POINTS)) &
4600 &
DEALLOCATE(field_variable_component%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP%DATA_POINTS)
4601 field_variable_component%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS=0
4602 field_variable_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS=0
4603 field_variable_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS=0
4604 field_variable_component%PARAM_TO_DOF_MAP%GRID_POINT_PARAM2DOF_MAP%NUMBER_OF_GRID_POINT_PARAMETERS=0
4605 field_variable_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%NUMBER_OF_GAUSS_POINT_PARAMETERS=0
4606 field_variable_component%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP%NUMBER_OF_DATA_POINT_PARAMETERS=0
4608 exits(
"FieldVariableComponent_ParameterToDofMapFinalise")
4610 999
errors(
"FieldVariableComponent_ParameterToDofMapFinalise",err,error)
4611 exits(
"FieldVariableComponent_ParameterToDofMapFinalise")
4614 END SUBROUTINE fieldvariablecomponent_parametertodofmapfinalise
4621 SUBROUTINE fieldvariablecomponent_parametertodofmapinitialise(FIELD_VARIABLE_COMPONENT,ERR,ERROR,*)
4625 INTEGER(INTG),
INTENT(OUT) :: err
4629 enters(
"FieldVariableComponent_ParameterToDofMapInitialise",err,error,*999)
4631 field_variable_component%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS=0
4632 field_variable_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS=0
4633 field_variable_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS=0
4634 field_variable_component%PARAM_TO_DOF_MAP%GRID_POINT_PARAM2DOF_MAP%NUMBER_OF_GRID_POINT_PARAMETERS=0
4635 field_variable_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%NUMBER_OF_GAUSS_POINT_PARAMETERS=0
4636 field_variable_component%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP%NUMBER_OF_DATA_POINT_PARAMETERS=0
4638 exits(
"FieldVariableComponent_ParameterToDofMapInitialise")
4640 999
errors(
"FieldVariableComponent_ParameterToDofMapInitialise",err,error)
4641 exits(
"FieldVariableComponent_ParameterToDofMapInitialise")
4644 END SUBROUTINE fieldvariablecomponent_parametertodofmapinitialise
4651 SUBROUTINE field_variable_components_finalise(FIELD_VARIABLE,ERR,ERROR,*)
4655 INTEGER(INTG),
INTENT(OUT) :: err
4658 INTEGER(INTG) :: component_idx
4660 enters(
"FIELD_VARIABLE_COMPONENTS_FINALISE",err,error,*999)
4662 IF(
ALLOCATED(field_variable%COMPONENTS))
THEN 4663 DO component_idx=1,
SIZE(field_variable%COMPONENTS,1)
4664 CALL field_variable_component_finalise(field_variable%COMPONENTS(component_idx),err,error,*999)
4666 DEALLOCATE(field_variable%COMPONENTS)
4668 field_variable%NUMBER_OF_COMPONENTS=0
4670 exits(
"FIELD_VARIABLE_COMPONENTS_FINALISE")
4672 999 errorsexits(
"FIELD_VARIABLE_COMPONENTS_FINALISE",err,error)
4674 END SUBROUTINE field_variable_components_finalise
4681 SUBROUTINE field_variable_components_initialise(FIELD,VARIABLE_TYPE,ERR,ERROR,*)
4685 INTEGER(INTG),
INTENT(IN) :: variable_type
4686 INTEGER(INTG),
INTENT(OUT) :: err
4689 INTEGER(INTG) :: component_idx
4693 enters(
"FIELD_VARIABLE_COMPONENTS_INITIALISE",err,error,*999)
4695 IF(
ASSOCIATED(field))
THEN 4696 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 4697 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 4698 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
4699 IF(
ASSOCIATED(field_variable))
THEN 4700 IF(
ALLOCATED(field_variable%COMPONENTS))
THEN 4701 CALL flagerror(
"Field variable already has allocated components.",err,error,*999)
4703 ALLOCATE(field_variable%COMPONENTS(field_variable%NUMBER_OF_COMPONENTS),stat=err)
4704 IF(err/=0)
CALL flagerror(
"Could not allocate field variable components.",err,error,*999)
4705 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
4706 CALL field_variable_component_initialise(field_variable,component_idx,err,error,*999)
4711 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 4712 CALL flagerror(local_error,err,error,*999)
4716 &
" is invalid. The variable type must be between 1 and "// &
4718 CALL flagerror(local_error,err,error,*999)
4721 CALL flagerror(
"Field create values cache is not associated.",err,error,*999)
4724 CALL flagerror(
"Field is not associated.",err,error,*999)
4727 exits(
"FIELD_VARIABLE_COMPONENTS_INITIALISE")
4729 999 errorsexits(
"FIELD_VARIABLE_COMPONENTS_INITIALISE",err,error)
4731 END SUBROUTINE field_variable_components_initialise
4738 SUBROUTINE field_create_finish(FIELD,ERR,ERROR,*)
4742 INTEGER(INTG),
INTENT(OUT) :: err
4745 INTEGER(INTG) :: componentidx,parametersetidx,scalingidx,variableidx
4748 enters(
"FIELD_CREATE_FINISH",err,error,*999)
4750 IF(
ASSOCIATED(field))
THEN 4751 IF(field%FIELD_FINISHED)
THEN 4752 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has already been finished." 4753 CALL flagerror(local_error,err,error,*999)
4756 IF(
ASSOCIATED(field%DECOMPOSITION))
THEN 4758 CALL fieldvariablescheck(field,err,error,*999)
4760 CALL field_variables_initialise(field,err,error,*999)
4761 IF(
ASSOCIATED(field%GEOMETRIC_FIELD))
THEN 4762 CALL field_create_values_cache_finalise(field%CREATE_VALUES_CACHE,err,error,*999)
4763 field%FIELD_FINISHED=.true.
4765 CALL field_mappings_calculate(field,err,error,*999)
4767 CALL field_geometric_parameters_initialise(field,err,error,*999)
4769 CALL field_scalings_initialise(field,err,error,*999)
4771 CALL field_parameter_sets_initialise(field,err,error,*999)
4773 CALL flagerror(
"Field does not have a geometric field associated.",err,error,*999)
4776 CALL flagerror(
"Field does not have a mesh decomposition associated.",err,error,*999)
4780 CALL flagerror(
"Field is not associated.",err,error,*999)
4793 DO variableidx=1,field%NUMBER_OF_VARIABLES
4805 & variables(variableidx)%maxNumberElementInterpolationParameters,err,error,*999)
4807 & variables(variableidx)%maxNumberNodeInterpolationParameters,err,error,*999)
4809 & number_of_dofs,err,error,*999)
4811 & total_number_of_dofs,err,error,*999)
4813 & number_of_global_dofs,err,error,*999)
4815 & number_of_components,err,error,*999)
4817 DO componentidx=1,field%VARIABLES(variableidx)%NUMBER_OF_COMPONENTS
4820 components(componentidx)%COMPONENT_LABEL,err,error,*999)
4822 components(componentidx)%INTERPOLATION_TYPE,err,error,*999)
4824 components(componentidx)%MESH_COMPONENT_NUMBER,err,error,*999)
4826 components(componentidx)%SCALING_INDEX,err,error,*999)
4828 & variables(variableidx)%COMPONENTS(componentidx)%maxNumberElementInterpolationParameters,err,error,*999)
4830 & variables(variableidx)%COMPONENTS(componentidx)%maxNumberNodeInterpolationParameters,err,error,*999)
4834 & parameter_sets%NUMBER_OF_PARAMETER_SETS,err,error,*999)
4836 DO parametersetidx=1,field%VARIABLES(variableidx)%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS
4839 & parameter_sets%PARAMETER_SETS(parametersetidx)%PTR%SET_TYPE,err,error,*999)
4848 DO scalingidx=1,field%SCALINGS%NUMBER_OF_SCALING_INDICES
4851 & mesh_component_number,err,error,*999)
4856 exits(
"FIELD_CREATE_FINISH")
4858 999 errorsexits(
"FIELD_CREATE_FINISH",err,error)
4860 END SUBROUTINE field_create_finish
4867 SUBROUTINE field_create_start_generic(FIELDS,USER_NUMBER,FIELD,ERR,ERROR,*)
4871 INTEGER(INTG),
INTENT(IN) :: user_number
4873 INTEGER(INTG),
INTENT(OUT) :: err
4876 INTEGER(INTG) :: field_no
4883 enters(
"FIELD_CREATE_START_GENERIC",err,error,*998)
4885 IF(
ASSOCIATED(fields))
THEN 4886 IF(
ASSOCIATED(field))
THEN 4887 CALL flagerror(
"Field is already associated.",err,error,*998)
4890 CALL field_initialise(new_field,err,error,*999)
4891 new_field%GLOBAL_NUMBER=fields%NUMBER_OF_FIELDS+1
4892 new_field%USER_NUMBER=user_number
4895 new_field%FIELDS=>fields
4896 NULLIFY(new_field%REGION)
4897 NULLIFY(new_field%INTERFACE)
4898 new_field%GEOMETRIC_FIELD=>new_field
4899 new_field%NUMBER_OF_VARIABLES=1
4900 new_field%SCALINGS%SCALING_TYPE=field_arithmetic_mean_scaling
4901 new_field%SCALINGS%NUMBER_OF_SCALING_INDICES=0
4902 NULLIFY(new_field%CREATE_VALUES_CACHE)
4904 ALLOCATE(new_fields(fields%NUMBER_OF_FIELDS+1),stat=err)
4905 IF(err/=0)
CALL flagerror(
"Could not allocate new fields.",err,error,*999)
4906 DO field_no=1,fields%NUMBER_OF_FIELDS
4907 new_fields(field_no)%PTR=>fields%FIELDS(field_no)%PTR
4909 new_fields(fields%NUMBER_OF_FIELDS+1)%PTR=>new_field
4910 IF(
ASSOCIATED(fields%FIELDS))
DEALLOCATE(fields%FIELDS)
4911 fields%FIELDS=>new_fields
4912 fields%NUMBER_OF_FIELDS=fields%NUMBER_OF_FIELDS+1
4916 CALL flagerror(
"Fields is not associated.",err,error,*998)
4919 exits(
"FIELD_CREATE_START_GENERIC")
4921 999
IF(
ASSOCIATED(new_field))
DEALLOCATE(new_field)
4922 IF(
ASSOCIATED(new_fields))
DEALLOCATE(new_fields)
4924 998 errorsexits(
"FIELD_CREATE_START_GENERIC",err,error)
4926 END SUBROUTINE field_create_start_generic
4941 SUBROUTINE field_create_start_interface(USER_NUMBER,INTERFACE,FIELD,ERR,ERROR,*)
4944 INTEGER(INTG),
INTENT(IN) :: user_number
4947 INTEGER(INTG),
INTENT(OUT) :: err
4952 enters(
"FIELD_CREATE_START_INTERFACE",err,error,*999)
4954 IF(
ASSOCIATED(interface))
THEN 4955 IF(
ASSOCIATED(field))
THEN 4956 CALL flagerror(
"Field is already associated.",err,error,*999)
4959 IF(
ASSOCIATED(interface%FIELDS))
THEN 4960 CALL field_user_number_find_generic(user_number,interface%FIELDS,field,err,error,*999)
4961 IF(
ASSOCIATED(field))
THEN 4963 &
" has already been created on interface number "//
trim(
number_to_vstring(interface%USER_NUMBER,
"*",err,error))//
"." 4964 CALL flagerror(local_error,err,error,*999)
4966 CALL field_create_start_generic(interface%FIELDS,user_number,field,err,error,*999)
4967 field%INTERFACE=>
INTERFACE 4968 CALL field_create_values_cache_initialise(field,err,error,*999)
4971 local_error=
"The fields on interface number "//
trim(
number_to_vstring(interface%USER_NUMBER,
"*",err,error))// &
4972 &
" are not associated." 4973 CALL flagerror(local_error,err,error,*999)
4977 CALL flagerror(
"Interface is not associated.",err,error,*999)
4980 exits(
"FIELD_CREATE_START_INTERFACE")
4982 999 errorsexits(
"FIELD_CREATE_START_INTERFACE",err,error)
4985 END SUBROUTINE field_create_start_interface
5000 SUBROUTINE field_create_start_region(USER_NUMBER,REGION,FIELD,ERR,ERROR,*)
5003 INTEGER(INTG),
INTENT(IN) :: user_number
5006 INTEGER(INTG),
INTENT(OUT) :: err
5011 enters(
"FIELD_CREATE_START_REGION",err,error,*999)
5013 IF(
ASSOCIATED(region))
THEN 5014 IF(
ASSOCIATED(field))
THEN 5015 CALL flagerror(
"Field is already associated.",err,error,*999)
5018 IF(
ASSOCIATED(region%FIELDS))
THEN 5019 CALL field_user_number_find_generic(user_number,region%FIELDS,field,err,error,*999)
5020 IF(
ASSOCIATED(field))
THEN 5022 &
" has already been created on region number "//
trim(
number_to_vstring(region%USER_NUMBER,
"*",err,error))//
"." 5023 CALL flagerror(local_error,err,error,*999)
5025 CALL field_create_start_generic(region%FIELDS,user_number,field,err,error,*999)
5026 field%REGION=>region
5027 CALL field_create_values_cache_initialise(field,err,error,*999)
5030 local_error=
"The fields on region number "//
trim(
number_to_vstring(region%USER_NUMBER,
"*",err,error))// &
5031 &
" are not associated." 5032 CALL flagerror(local_error,err,error,*999)
5036 CALL flagerror(
"Region is not associated.",err,error,*999)
5039 exits(
"FIELD_CREATE_START_REGION")
5041 999 errorsexits(
"FIELD_CREATE_START_REGION",err,error)
5043 END SUBROUTINE field_create_start_region
5050 SUBROUTINE field_create_values_cache_finalise(CREATE_VALUES_CACHE,ERR,ERROR,*)
5054 INTEGER(INTG),
INTENT(OUT) :: err
5057 INTEGER(INTG) :: component_idx,variable_idx
5059 enters(
"FIELD_CREATE_VALUES_CACHE_FINALISE",err,error,*999)
5061 IF(
ASSOCIATED(create_values_cache))
THEN 5062 IF(
ALLOCATED(create_values_cache%VARIABLE_TYPES))
DEALLOCATE(create_values_cache%VARIABLE_TYPES)
5063 IF(
ALLOCATED(create_values_cache%VARIABLE_LABELS))
THEN 5064 DO variable_idx=1,
SIZE(create_values_cache%VARIABLE_LABELS,1)
5065 create_values_cache%VARIABLE_LABELS(variable_idx)=
"" 5067 DEALLOCATE(create_values_cache%VARIABLE_LABELS)
5069 IF(
ALLOCATED(create_values_cache%VARIABLE_LABELS_LOCKED))
DEALLOCATE(create_values_cache%VARIABLE_LABELS_LOCKED)
5070 IF(
ALLOCATED(create_values_cache%DIMENSION))
DEALLOCATE(create_values_cache%DIMENSION)
5071 IF(
ALLOCATED(create_values_cache%DIMENSION_LOCKED))
DEALLOCATE(create_values_cache%DIMENSION_LOCKED)
5072 IF(
ALLOCATED(create_values_cache%DATA_TYPES))
DEALLOCATE(create_values_cache%DATA_TYPES)
5073 IF(
ALLOCATED(create_values_cache%DATA_TYPES_LOCKED))
DEALLOCATE(create_values_cache%DATA_TYPES_LOCKED)
5074 IF(
ALLOCATED(create_values_cache%DOF_ORDER_TYPES))
DEALLOCATE(create_values_cache%DOF_ORDER_TYPES)
5075 IF(
ALLOCATED(create_values_cache%DOF_ORDER_TYPES_LOCKED))
DEALLOCATE(create_values_cache%DOF_ORDER_TYPES_LOCKED)
5076 IF(
ALLOCATED(create_values_cache%NUMBER_OF_COMPONENTS))
DEALLOCATE(create_values_cache%NUMBER_OF_COMPONENTS)
5077 IF(
ALLOCATED(create_values_cache%NUMBER_OF_COMPONENTS_LOCKED))
DEALLOCATE(create_values_cache%NUMBER_OF_COMPONENTS_LOCKED)
5078 IF(
ALLOCATED(create_values_cache%COMPONENT_LABELS))
THEN 5079 DO variable_idx=1,
SIZE(create_values_cache%COMPONENT_LABELS,2)
5080 DO component_idx=1,
SIZE(create_values_cache%COMPONENT_LABELS,1)
5081 create_values_cache%COMPONENT_LABELS(component_idx,variable_idx)=
"" 5084 DEALLOCATE(create_values_cache%COMPONENT_LABELS)
5086 IF(
ALLOCATED(create_values_cache%COMPONENT_LABELS_LOCKED))
DEALLOCATE(create_values_cache%COMPONENT_LABELS_LOCKED)
5087 IF(
ALLOCATED(create_values_cache%INTERPOLATION_TYPE))
DEALLOCATE(create_values_cache%INTERPOLATION_TYPE)
5088 IF(
ALLOCATED(create_values_cache%INTERPOLATION_TYPE_LOCKED))
DEALLOCATE(create_values_cache%INTERPOLATION_TYPE_LOCKED)
5089 IF(
ALLOCATED(create_values_cache%MESH_COMPONENT_NUMBER))
DEALLOCATE(create_values_cache%MESH_COMPONENT_NUMBER)
5090 IF(
ALLOCATED(create_values_cache%MESH_COMPONENT_NUMBER_LOCKED))
DEALLOCATE(create_values_cache%MESH_COMPONENT_NUMBER_LOCKED)
5091 DEALLOCATE(create_values_cache)
5094 exits(
"FIELD_CREATE_VALUES_CACHE_FINALISE")
5096 999 errorsexits(
"FIELD_CREATE_VALUES_CACHE_FINALISE",err,error)
5098 END SUBROUTINE field_create_values_cache_finalise
5105 SUBROUTINE field_create_values_cache_initialise(FIELD,ERR,ERROR,*)
5109 INTEGER(INTG),
INTENT(OUT) :: err
5113 INTEGER(INTG) :: dummy_err,number_of_components,component_idx,variable_idx
5117 enters(
"FIELD_CREATE_VALUES_CACHE_INITIALISE",err,error,*998)
5119 IF(
ASSOCIATED(field))
THEN 5120 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 5121 CALL flagerror(
"Create values cache is already associated.",err,error,*998)
5123 ALLOCATE(field%CREATE_VALUES_CACHE,stat=err)
5124 IF(err/=0)
CALL flagerror(
"Could not allocate create values cache.",err,error,*999)
5125 SELECT CASE(field%TYPE)
5126 CASE(field_geometric_type,field_fibre_type,field_geometric_general_type)
5127 NULLIFY(coordinate_system)
5128 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
5129 number_of_components=coordinate_system%NUMBER_OF_DIMENSIONS
5130 CASE(field_general_type,field_material_type)
5131 number_of_components=1
5133 local_error=
"The field type of "//
trim(
number_to_vstring(field%TYPE,
"*",err,error))//
" is invalid for field number "// &
5135 CALL flagerror(local_error,err,error,*999)
5137 ALLOCATE(field%CREATE_VALUES_CACHE%VARIABLE_TYPES(field%NUMBER_OF_VARIABLES),stat=err)
5138 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache variable types.",err,error,*999)
5139 ALLOCATE(field%CREATE_VALUES_CACHE%VARIABLE_LABELS(field_number_of_variable_types),stat=err)
5140 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache variable labels.",err,error,*999)
5141 ALLOCATE(field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED(field_number_of_variable_types),stat=err)
5142 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache variable labels locked.",err,error,*999)
5143 ALLOCATE(field%CREATE_VALUES_CACHE%DIMENSION(field_number_of_variable_types),stat=err)
5144 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache dimension.",err,error,*999)
5145 ALLOCATE(field%CREATE_VALUES_CACHE%DIMENSION_LOCKED(field_number_of_variable_types),stat=err)
5146 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache dimension locked.",err,error,*999)
5147 ALLOCATE(field%CREATE_VALUES_CACHE%DATA_TYPES(field_number_of_variable_types),stat=err)
5148 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache data types.",err,error,*999)
5149 ALLOCATE(field%CREATE_VALUES_CACHE%DATA_TYPES_LOCKED(field_number_of_variable_types),stat=err)
5150 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache data types locked.",err,error,*999)
5151 ALLOCATE(field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES(field_number_of_variable_types),stat=err)
5152 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache DOF order types.",err,error,*999)
5153 ALLOCATE(field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES_LOCKED(field_number_of_variable_types),stat=err)
5154 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache DOF order types locked.",err,error,*999)
5155 ALLOCATE(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(field_number_of_variable_types),stat=err)
5156 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache number of components.",err,error,*999)
5157 ALLOCATE(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS_LOCKED(field_number_of_variable_types),stat=err)
5158 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache number of components locked.",err,error,*999)
5159 ALLOCATE(field%CREATE_VALUES_CACHE%COMPONENT_LABELS(number_of_components,field_number_of_variable_types),stat=err)
5160 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache component labels.",err,error,*999)
5161 ALLOCATE(field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED(number_of_components,field_number_of_variable_types),stat=err)
5162 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache component labels locked.",err,error,*999)
5163 ALLOCATE(field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(number_of_components,field_number_of_variable_types),stat=err)
5164 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache interpolation type.",err,error,*999)
5165 ALLOCATE(field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED(number_of_components,field_number_of_variable_types),stat=err)
5166 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache interpolation type locked.",err,error,*999)
5167 ALLOCATE(field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(number_of_components,field_number_of_variable_types),stat=err)
5168 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache mesh component type.",err,error,*999)
5169 ALLOCATE(field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED(number_of_components,field_number_of_variable_types), &
5171 IF(err/=0)
CALL flagerror(
"Could not allocated create values cache mesh component type locked.",err,error,*999)
5172 field%CREATE_VALUES_CACHE%LABEL_LOCKED=.false.
5173 field%CREATE_VALUES_CACHE%DECOMPOSITION_LOCKED=.false.
5174 field%CREATE_VALUES_CACHE%DEPENDENT_TYPE_LOCKED=.false.
5175 field%CREATE_VALUES_CACHE%DIMENSION_LOCKED=.false.
5176 field%CREATE_VALUES_CACHE%NUMBER_OF_VARIABLES_LOCKED=.false.
5177 field%CREATE_VALUES_CACHE%GEOMETRIC_FIELD_LOCKED=.false.
5178 field%CREATE_VALUES_CACHE%SCALING_TYPE_LOCKED=.false.
5179 field%CREATE_VALUES_CACHE%TYPE_LOCKED=.false.
5180 field%CREATE_VALUES_CACHE%VARIABLE_TYPES=0
5181 field%CREATE_VALUES_CACHE%VARIABLE_TYPES_LOCKED=.false.
5182 field%CREATE_VALUES_CACHE%VARIABLE_LABELS=
"" 5183 field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED=.false.
5184 field%CREATE_VALUES_CACHE%DIMENSION=0
5185 field%CREATE_VALUES_CACHE%DIMENSION_LOCKED=.false.
5186 field%CREATE_VALUES_CACHE%DATA_TYPES=0
5187 field%CREATE_VALUES_CACHE%DATA_TYPES_LOCKED=.false.
5188 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES=0
5189 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES_LOCKED=.false.
5190 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS=0
5191 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS_LOCKED=.false.
5192 field%CREATE_VALUES_CACHE%COMPONENT_LABELS=
"" 5193 field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED=.false.
5194 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE=0
5195 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED=.false.
5196 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER=0
5197 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED=.false.
5198 field%CREATE_VALUES_CACHE%DataProjectionLocked=.false.
5199 DO variable_idx=1,field%NUMBER_OF_VARIABLES
5200 field%CREATE_VALUES_CACHE%VARIABLE_TYPES(variable_idx)=variable_idx
5201 SELECT CASE(variable_idx)
5202 CASE(field_u_variable_type)
5203 SELECT CASE(field%TYPE)
5204 CASE(field_geometric_type)
5205 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"Coordinate" 5206 CASE(field_fibre_type)
5207 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"Fibre" 5208 CASE(field_material_type)
5209 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"Material" 5210 CASE(field_general_type)
5211 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U" 5212 CASE(field_geometric_general_type)
5213 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U" 5216 &
" is invalid for field number "// &
5218 CALL flagerror(local_error,err,error,*999)
5220 CASE(field_deludeln_variable_type)
5221 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U/del n" 5222 CASE(field_deludelt_variable_type)
5223 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U/del t" 5224 CASE(field_del2udelt2_variable_type)
5225 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U/del t^2" 5226 CASE(field_v_variable_type)
5227 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"V" 5228 CASE(field_delvdeln_variable_type)
5229 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del V/del n" 5230 CASE(field_delvdelt_variable_type)
5231 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del V/del t" 5232 CASE(field_del2vdelt2_variable_type)
5233 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 V/del t^2" 5234 CASE(field_u1_variable_type)
5235 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U1" 5236 CASE(field_delu1deln_variable_type)
5237 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U1/del n" 5238 CASE(field_delu1delt_variable_type)
5239 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U1/del t" 5240 CASE(field_del2u1delt2_variable_type)
5241 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U1/del t^2" 5242 CASE(field_u2_variable_type)
5243 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U2" 5244 CASE(field_delu2deln_variable_type)
5245 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U2/del n" 5246 CASE(field_delu2delt_variable_type)
5247 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U2/del t" 5248 CASE(field_del2u2delt2_variable_type)
5249 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U2/del t^2" 5250 CASE(field_u3_variable_type)
5251 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U3" 5252 CASE(field_delu3deln_variable_type)
5253 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U3/del n" 5254 CASE(field_delu3delt_variable_type)
5255 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U3/del t" 5256 CASE(field_del2u3delt2_variable_type)
5257 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U3/del t^2" 5258 CASE(field_u4_variable_type)
5259 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U4" 5260 CASE(field_delu4deln_variable_type)
5261 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U4/del n" 5262 CASE(field_delu4delt_variable_type)
5263 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U4/del t" 5264 CASE(field_del2u4delt2_variable_type)
5265 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U4/del t^2" 5266 CASE(field_u5_variable_type)
5267 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U5" 5268 CASE(field_delu5deln_variable_type)
5269 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U5/del n" 5270 CASE(field_delu5delt_variable_type)
5271 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U5/del t" 5272 CASE(field_del2u5delt2_variable_type)
5273 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U5/del t^2" 5274 CASE(field_u6_variable_type)
5275 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U6" 5276 CASE(field_delu6deln_variable_type)
5277 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U6/del n" 5278 CASE(field_delu6delt_variable_type)
5279 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U6/del t" 5280 CASE(field_del2u6delt2_variable_type)
5281 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U6/del t^2" 5282 CASE(field_u7_variable_type)
5283 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U7" 5284 CASE(field_delu7deln_variable_type)
5285 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U7/del n" 5286 CASE(field_delu7delt_variable_type)
5287 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U7/del t" 5288 CASE(field_del2u7delt2_variable_type)
5289 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U7/del t^2" 5290 CASE(field_u8_variable_type)
5291 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U8" 5292 CASE(field_delu8deln_variable_type)
5293 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U8/del n" 5294 CASE(field_delu8delt_variable_type)
5295 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U8/del t" 5296 CASE(field_del2u8delt2_variable_type)
5297 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U8/del t^2" 5298 CASE(field_u9_variable_type)
5299 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U9" 5300 CASE(field_delu9deln_variable_type)
5301 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U9/del n" 5302 CASE(field_delu9delt_variable_type)
5303 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U9/del t" 5304 CASE(field_del2u9delt2_variable_type)
5305 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U/9del t^2" 5306 CASE(field_u10_variable_type)
5307 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"U10" 5308 CASE(field_delu10deln_variable_type)
5309 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U10/del n" 5310 CASE(field_delu10delt_variable_type)
5311 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del U10/del t" 5312 CASE(field_del2u10delt2_variable_type)
5313 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_idx)=
"del^2 U10/del t^2" 5315 local_error=
"The variable type of "//
trim(
number_to_vstring(variable_idx,
"*",err,error))//
" is invalid." 5316 CALL flagerror(local_error,err,error,*999)
5318 field%CREATE_VALUES_CACHE%DIMENSION(variable_idx)=field_vector_dimension_type
5319 field%CREATE_VALUES_CACHE%DATA_TYPES(variable_idx)=field_dp_type
5320 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES(variable_idx)=field_separated_component_dof_order
5321 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_idx)=number_of_components
5322 DO component_idx=1,number_of_components
5323 field%CREATE_VALUES_CACHE%COMPONENT_LABELS(component_idx,variable_idx)= &
5332 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(component_idx,variable_idx)=field_node_based_interpolation
5333 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(component_idx,variable_idx)=1
5338 CALL flagerror(
"Field is not associated.",err,error,*998)
5341 exits(
"FIELD_CREATE_VALUES_CACHE_INITIALISE")
5343 999
CALL field_create_values_cache_finalise(field%CREATE_VALUES_CACHE,dummy_err,dummy_error,*998)
5344 998 errorsexits(
"FIELD_CREATE_VALUES_CACHE_INITIALISE",err,error)
5346 END SUBROUTINE field_create_values_cache_initialise
5355 SUBROUTINE field_geometricgeneralfieldget(field,geometricField,generalFound,err,error,*)
5358 TYPE(
field_type),
POINTER,
INTENT(IN) :: field
5359 TYPE(
field_type),
POINTER,
INTENT(OUT) :: geometricfield
5360 LOGICAL,
INTENT(OUT) :: generalfound
5361 INTEGER(INTG),
INTENT(OUT) :: err
5364 INTEGER(INTG) :: fieldidx
5368 enters(
"Field_GeometricGeneralFieldGet",err,error,*999)
5370 NULLIFY(geometricfield)
5373 IF(
ASSOCIATED(field))
THEN 5374 IF(field%field_finished)
THEN 5375 IF(.NOT.
ASSOCIATED(field%fields))
THEN 5376 CALL flagerror(
"Field fields are not associated.",err,error,*999)
5380 &
" has not been finished." 5381 CALL flagerror(localerror,err,error,*999)
5384 CALL flagerror(
"Field is not associated.",err,error,*999)
5386 IF(
ASSOCIATED(geometricfield))
THEN 5387 CALL flagerror(
"Geometric field is already associated.",err,error,*999)
5390 generalfound=.false.
5392 DO fieldidx=1,field%fields%number_of_fields
5393 otherfield=>field%fields%fields(fieldidx)%ptr
5394 IF(
ASSOCIATED(otherfield))
THEN 5395 IF(otherfield%TYPE==field_geometric_general_type)
THEN 5396 geometricfield=>otherfield
5401 &
" is not associated.",err,error,*999)
5405 IF(.NOT.generalfound)
THEN 5408 IF(
ASSOCIATED(field%geometric_field))
THEN 5409 geometricfield=>field%geometric_field
5411 CALL flagerror(
"Geometric general field not found and geometric field is not associated.",err,error,*999)
5415 exits(
"Field_GeometricGeneralFieldGet")
5417 999 errorsexits(
"Field_GeometricGeneralFieldGet",err,error)
5419 END SUBROUTINE field_geometricgeneralfieldget
5426 SUBROUTINE field_dependent_type_check(FIELD,DEPENDENT_TYPE,ERR,ERROR,*)
5430 INTEGER(INTG),
INTENT(IN) :: dependent_type
5431 INTEGER(INTG),
INTENT(OUT) :: err
5436 enters(
"FIELD_DEPENDENT_TYPE_CHECK",err,error,*999)
5438 IF(
ASSOCIATED(field))
THEN 5439 IF(field%FIELD_FINISHED)
THEN 5440 SELECT CASE(dependent_type)
5441 CASE(field_independent_type)
5442 IF(field%DEPENDENT_TYPE/=field_independent_type)
THEN 5443 local_error=
"Invalid dependent type. The dependent type of field number "// &
5446 &
" which is not an independent field." 5447 CALL flagerror(local_error,err,error,*999)
5449 CASE(field_dependent_type)
5450 IF(field%DEPENDENT_TYPE/=field_dependent_type)
THEN 5451 local_error=
"Invalid dependent type. The dependent type of field number "// &
5454 &
" which is not a dependent field." 5455 CALL flagerror(local_error,err,error,*999)
5458 local_error=
"The specified dependent type of "//
trim(
number_to_vstring(dependent_type,
"*",err,error))// &
5460 CALL flagerror(local_error,err,error,*999)
5463 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 5464 CALL flagerror(local_error,err,error,*999)
5467 CALL flagerror(
"Field is not associated.",err,error,*999)
5470 exits(
"FIELD_DEPENDENT_TYPE_CHECK")
5472 999 errorsexits(
"FIELD_DEPENDENT_TYPE_CHECK",err,error)
5474 END SUBROUTINE field_dependent_type_check
5481 SUBROUTINE field_dependent_type_get(FIELD,DEPENDENT_TYPE,ERR,ERROR,*)
5485 INTEGER(INTG),
INTENT(OUT) :: dependent_type
5486 INTEGER(INTG),
INTENT(OUT) :: err
5491 enters(
"FIELD_DEPENDENT_TYPE_GET",err,error,*999)
5493 IF(
ASSOCIATED(field))
THEN 5494 IF(field%FIELD_FINISHED)
THEN 5495 dependent_type=field%DEPENDENT_TYPE
5497 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 5498 CALL flagerror(local_error,err,error,*999)
5501 CALL flagerror(
"Field is not associated.",err,error,*999)
5504 exits(
"FIELD_DEPENDENT_TYPE_GET")
5506 999 errorsexits(
"FIELD_DEPENDENT_TYPE_GET",err,error)
5508 END SUBROUTINE field_dependent_type_get
5515 SUBROUTINE field_dependent_type_set(FIELD,DEPENDENT_TYPE,ERR,ERROR,*)
5519 INTEGER(INTG),
INTENT(IN) :: dependent_type
5520 INTEGER(INTG),
INTENT(OUT) :: err
5525 enters(
"FIELD_DEPENDENT_TYPE_SET",err,error,*999)
5527 IF(
ASSOCIATED(field))
THEN 5528 IF(field%FIELD_FINISHED)
THEN 5529 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 5530 CALL flagerror(local_error,err,error,*999)
5532 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 5533 IF(field%CREATE_VALUES_CACHE%DEPENDENT_TYPE_LOCKED)
THEN 5534 local_error=
"The dependent type has been locked for field number "// &
5536 CALL flagerror(local_error,err,error,*999)
5538 SELECT CASE(dependent_type)
5539 CASE(field_independent_type)
5540 field%DEPENDENT_TYPE=field_independent_type
5541 CASE(field_dependent_type)
5542 field%DEPENDENT_TYPE=field_dependent_type
5544 local_error=
"The supplied dependent type of "//
trim(
number_to_vstring(dependent_type,
"*",err,error))//
" is invalid." 5545 CALL flagerror(local_error,err,error,*999)
5549 local_error=
"Field create values cache is not associated for field number "// &
5551 CALL flagerror(local_error,err,error,*999)
5555 CALL flagerror(
"Field is not associated.",err,error,*999)
5558 exits(
"FIELD_DEPENDENT_TYPE_SET")
5560 999 errorsexits(
"FIELD_DEPENDENT_TYPE_SET",err,error)
5562 END SUBROUTINE field_dependent_type_set
5569 SUBROUTINE field_dependent_type_set_and_lock(FIELD,DEPENDENT_TYPE,ERR,ERROR,*)
5573 INTEGER(INTG),
INTENT(IN) :: dependent_type
5574 INTEGER(INTG),
INTENT(OUT) :: err
5579 enters(
"FIELD_DEPENDENT_TYPE_SET_AND_LOCK",err,error,*999)
5581 CALL field_dependent_type_set(field,dependent_type,err,error,*999)
5582 IF(
ASSOCIATED(field))
THEN 5583 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 5584 field%CREATE_VALUES_CACHE%DEPENDENT_TYPE_LOCKED=.true.
5586 local_error=
"Field create values cache is not associated for field number "// &
5588 CALL flagerror(local_error,err,error,*999)
5591 CALL flagerror(
"Field is not associated.",err,error,*999)
5594 exits(
"FIELD_DEPENDENT_TYPE_SET_AND_LOCK")
5596 999 errorsexits(
"FIELD_DEPENDENT_TYPE_SET_AND_LOCK",err,error)
5598 END SUBROUTINE field_dependent_type_set_and_lock
5605 SUBROUTINE field_destroy(FIELD,ERR,ERROR,*)
5609 INTEGER(INTG),
INTENT(OUT) :: err
5612 INTEGER(INTG) :: field_idx,field_position,field_position2
5613 TYPE(
field_type),
POINTER :: field2,geometric_field
5615 TYPE(
field_ptr_type),
POINTER :: new_fields(:),new_fields_using(:)
5618 NULLIFY(new_fields_using)
5620 enters(
"FIELD_DESTROY",err,error,*999)
5622 IF(
ASSOCIATED(field))
THEN 5623 fields=>field%FIELDS
5624 IF(
ASSOCIATED(fields))
THEN 5625 field_position=field%GLOBAL_NUMBER
5626 geometric_field=>field%GEOMETRIC_FIELD
5627 IF(
ASSOCIATED(geometric_field))
THEN 5628 IF(
ASSOCIATED(geometric_field%GEOMETRIC_FIELD_PARAMETERS))
THEN 5631 DO field_idx=1,geometric_field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING
5632 field2=>geometric_field%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING(field_idx)%PTR
5633 IF(field2%USER_NUMBER==field%USER_NUMBER)
THEN 5634 field_position2=field_idx
5638 IF(field_position2/=0)
THEN 5639 ALLOCATE(new_fields_using(geometric_field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING+1),stat=err)
5640 IF(err/=0)
CALL flagerror(
"Could not allocate new fields using.",err,error,*999)
5641 DO field_idx=1,geometric_field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING
5642 IF(field_idx<field_position2)
THEN 5643 new_fields_using(field_idx)%PTR=>geometric_field%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING(field_idx)%PTR
5644 ELSE IF(field_idx>field_position2)
THEN 5645 new_fields_using(field_idx-1)%PTR=>geometric_field%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING(field_idx)%PTR
5648 geometric_field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING=geometric_field%GEOMETRIC_FIELD_PARAMETERS% &
5649 & number_of_fields_using-1
5650 IF(
ASSOCIATED(geometric_field%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING)) &
5651 &
DEALLOCATE(geometric_field%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING)
5652 geometric_field%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING=>new_fields_using
5658 CALL field_finalise(field,err,error,*999)
5659 IF(fields%NUMBER_OF_FIELDS>1)
THEN 5660 ALLOCATE(new_fields(fields%NUMBER_OF_FIELDS-1),stat=err)
5661 IF(err/=0)
CALL flagerror(
"Could not allocate new fields.",err,error,*999)
5662 DO field_idx=1,fields%NUMBER_OF_FIELDS
5663 IF(field_idx<field_position)
THEN 5664 new_fields(field_idx)%PTR=>fields%FIELDS(field_idx)%PTR
5665 ELSE IF(field_idx>field_position)
THEN 5666 fields%FIELDS(field_idx)%PTR%GLOBAL_NUMBER=fields%FIELDS(field_idx)%PTR%GLOBAL_NUMBER-1
5667 new_fields(field_idx-1)%PTR=>fields%FIELDS(field_idx)%PTR
5670 DEALLOCATE(fields%FIELDS)
5671 fields%FIELDS=>new_fields
5672 fields%NUMBER_OF_FIELDS=fields%NUMBER_OF_FIELDS-1
5674 DEALLOCATE(fields%FIELDS)
5675 fields%NUMBER_OF_FIELDS=0
5678 CALL flagerror(
"Field fields is not associated.",err,error,*999)
5681 CALL flagerror(
"Field is not associated.",err,error,*999)
5684 exits(
"FIELD_DESTROY")
5686 999
IF(
ASSOCIATED(new_fields))
DEALLOCATE(new_fields)
5687 IF(
ASSOCIATED(new_fields_using))
DEALLOCATE(new_fields_using)
5688 errorsexits(
"FIELD_DESTROY",err,error)
5690 END SUBROUTINE field_destroy
5697 SUBROUTINE field_dimension_check(FIELD,VARIABLE_TYPE,DIMENSION_TYPE,ERR,ERROR,*)
5701 INTEGER(INTG),
INTENT(IN) :: variable_type
5702 INTEGER(INTG),
INTENT(IN) :: dimension_type
5703 INTEGER(INTG),
INTENT(OUT) :: err
5709 enters(
"FIELD_DIMENSION_CHECK",err,error,*999)
5711 IF(
ASSOCIATED(field))
THEN 5712 IF(field%FIELD_FINISHED)
THEN 5713 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 5714 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
5715 IF(
ASSOCIATED(field_variable))
THEN 5716 SELECT CASE(dimension_type)
5717 CASE(field_scalar_dimension_type)
5718 IF(field_variable%DIMENSION/=field_scalar_dimension_type)
THEN 5719 local_error=
"Invalid dimension type. The dimension type for variable type "// &
5723 &
" which is not a scalar field." 5724 CALL flagerror(local_error,err,error,*999)
5726 CASE(field_vector_dimension_type)
5727 IF(field_variable%DIMENSION/=field_vector_dimension_type)
THEN 5728 local_error=
"Invalid dimension type. The dimension type for variable type "// &
5732 &
" which is not a vector field." 5733 CALL flagerror(local_error,err,error,*999)
5735 CASE(field_tensor_dimension_type)
5736 IF(field_variable%DIMENSION/=field_tensor_dimension_type)
THEN 5737 local_error=
"Invalid dimension type. The dimension type for variable type "// &
5741 &
" which is not a tensor field." 5742 CALL flagerror(local_error,err,error,*999)
5746 local_error=
"The specified dimension type of "//
trim(
number_to_vstring(dimension_type,
"*",err,error))// &
5748 CALL flagerror(local_error,err,error,*999)
5752 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 5753 CALL flagerror(local_error,err,error,*999)
5757 &
" is invalid. The variable type must be between 1 and "// &
5759 CALL flagerror(local_error,err,error,*999)
5762 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 5763 CALL flagerror(local_error,err,error,*999)
5766 CALL flagerror(
"Field is not associated.",err,error,*999)
5769 exits(
"FIELD_DIMENSION_CHECK")
5771 999 errorsexits(
"FIELD_DIMENSION_CHECK",err,error)
5773 END SUBROUTINE field_dimension_check
5780 SUBROUTINE field_dimension_get(FIELD,VARIABLE_TYPE,DIMENSION,ERR,ERROR,*)
5784 INTEGER(INTG),
INTENT(IN) :: variable_type
5785 INTEGER(INTG),
INTENT(OUT) :: dimension
5786 INTEGER(INTG),
INTENT(OUT) :: err
5792 enters(
"FIELD_DIMENSION_GET",err,error,*999)
5794 IF(
ASSOCIATED(field))
THEN 5795 IF(field%FIELD_FINISHED)
THEN 5796 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 5797 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
5798 IF(
ASSOCIATED(field_variable))
THEN 5799 dimension=field_variable%DIMENSION
5802 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 5803 CALL flagerror(local_error,err,error,*999)
5807 &
" is invalid. The variable type must be between 1 and "// &
5809 CALL flagerror(local_error,err,error,*999)
5812 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 5813 CALL flagerror(local_error,err,error,*999)
5816 CALL flagerror(
"Field is not associated.",err,error,*999)
5819 exits(
"FIELD_DIMENSION_GET")
5821 999 errorsexits(
"FIELD_DIMENSION_GET",err,error)
5823 END SUBROUTINE field_dimension_get
5830 SUBROUTINE field_dimension_set(FIELD,VARIABLE_TYPE,FIELD_DIMENSION,ERR,ERROR,*)
5834 INTEGER(INTG),
INTENT(IN) :: variable_type
5835 INTEGER(INTG),
INTENT(IN) :: field_dimension
5836 INTEGER(INTG),
INTENT(OUT) :: err
5839 INTEGER(INTG) :: number_of_components,new_number_of_components,variable_idx
5840 INTEGER(INTG),
ALLOCATABLE :: new_interpolation_type(:,:),new_mesh_component_number(:,:)
5841 LOGICAL,
ALLOCATABLE :: new_component_labels_locked(:,:),new_interpolation_type_locked(:,:), &
5842 & NEW_MESH_COMPONENT_NUMBER_LOCKED(:,:)
5846 enters(
"FIELD_DIMENSION_SET",err,error,*999)
5848 IF(
ASSOCIATED(field))
THEN 5849 IF(field%FIELD_FINISHED)
THEN 5850 local_error=
"Field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 5851 CALL flagerror(local_error,err,error,*999)
5853 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 5854 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 5855 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 5856 IF(field%CREATE_VALUES_CACHE%DIMENSION_LOCKED(variable_type))
THEN 5857 local_error=
"The field dimension has been locked for for variable type "// &
5860 CALL flagerror(local_error,err,error,*999)
5862 SELECT CASE(field_dimension)
5863 CASE(field_scalar_dimension_type)
5864 IF(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)/=1)
THEN 5865 number_of_components=
SIZE(field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE,1)
5866 new_number_of_components=1
5868 DO variable_idx=1,field_number_of_variable_types
5869 IF (field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_idx) > new_number_of_components)
THEN 5870 IF (variable_idx /= variable_type)
THEN 5871 new_number_of_components=field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_idx)
5875 ALLOCATE(new_component_labels(new_number_of_components,field_number_of_variable_types),stat=err)
5876 IF(err/=0)
CALL flagerror(
"Could not allocate new component labels.",err,error,*999)
5877 ALLOCATE(new_component_labels_locked(new_number_of_components,field_number_of_variable_types),stat=err)
5878 IF(err/=0)
CALL flagerror(
"Could not allocate new component labels locked.",err,error,*999)
5879 ALLOCATE(new_interpolation_type(new_number_of_components,field_number_of_variable_types),stat=err)
5880 IF(err/=0)
CALL flagerror(
"Could not allocate new interpolation type.",err,error,*999)
5881 ALLOCATE(new_interpolation_type_locked(new_number_of_components,field_number_of_variable_types),stat=err)
5882 IF(err/=0)
CALL flagerror(
"Could not allocate new interpolation type locked.",err,error,*999)
5883 ALLOCATE(new_mesh_component_number(new_number_of_components,field_number_of_variable_types),stat=err)
5884 IF(err/=0)
CALL flagerror(
"Could not allocate new mesh component number.",err,error,*999)
5885 ALLOCATE(new_mesh_component_number_locked(new_number_of_components,field_number_of_variable_types),stat=err)
5886 IF(err/=0)
CALL flagerror(
"Could not allocate new mesh component number locked.",err,error,*999)
5887 new_component_labels(1:new_number_of_components,:)= &
5888 & field%CREATE_VALUES_CACHE%COMPONENT_LABELS(1:new_number_of_components,:)
5889 new_component_labels_locked(1:new_number_of_components,:)= &
5890 & field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED(1:new_number_of_components,:)
5891 new_interpolation_type(1:new_number_of_components,:)= &
5892 & field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(1:new_number_of_components,:)
5893 new_interpolation_type_locked(1:new_number_of_components,:)= &
5894 & field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED(1:new_number_of_components,:)
5895 new_mesh_component_number(1:new_number_of_components,:)= &
5896 & field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(1:new_number_of_components,:)
5897 new_mesh_component_number_locked(1:new_number_of_components,:)= &
5898 & field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED(1:new_number_of_components,:)
5900 CALL move_alloc(new_component_labels,field%CREATE_VALUES_CACHE%COMPONENT_LABELS)
5901 CALL move_alloc(new_component_labels_locked,field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED)
5902 CALL move_alloc(new_interpolation_type,field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE)
5903 CALL move_alloc(new_interpolation_type_locked,field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED)
5904 CALL move_alloc(new_mesh_component_number,field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER)
5905 CALL move_alloc(new_mesh_component_number_locked,field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED)
5907 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)=1
5909 field%CREATE_VALUES_CACHE%DIMENSION(variable_type)=field_scalar_dimension_type
5910 CASE(field_vector_dimension_type)
5911 field%CREATE_VALUES_CACHE%DIMENSION(variable_type)=field_vector_dimension_type
5912 CASE(field_tensor_dimension_type)
5913 field%CREATE_VALUES_CACHE%DIMENSION(variable_type)=field_tensor_dimension_type
5914 CALL flagerror(
"Not implemented.",err,error,*999)
5916 local_error=
"The specified field dimension of "//
trim(
number_to_vstring(field_dimension,
"*",err,error))// &
5918 CALL flagerror(local_error,err,error,*999)
5923 &
" has not been created on field number "//
trim(
number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 5924 CALL flagerror(local_error,err,error,*999)
5928 &
" is invalid. The variable type must be between 1 and "// &
5930 CALL flagerror(local_error,err,error,*999)
5933 local_error=
"Field create values cache is not associated for field number "// &
5935 CALL flagerror(local_error,err,error,*999)
5939 CALL flagerror(
"Field is not associated.",err,error,*999)
5942 exits(
"FIELD_DIMENSION_SET")
5944 999
IF(
ALLOCATED(new_component_labels))
DEALLOCATE(new_component_labels)
5945 IF(
ALLOCATED(new_component_labels_locked))
DEALLOCATE(new_component_labels_locked)
5946 IF(
ALLOCATED(new_interpolation_type))
DEALLOCATE(new_interpolation_type)
5947 IF(
ALLOCATED(new_interpolation_type_locked))
DEALLOCATE(new_interpolation_type_locked)
5948 IF(
ALLOCATED(new_mesh_component_number))
DEALLOCATE(new_mesh_component_number)
5949 IF(
ALLOCATED(new_mesh_component_number_locked))
DEALLOCATE(new_mesh_component_number_locked)
5950 errorsexits(
"FIELD_DIMENSION_SET",err,error)
5952 END SUBROUTINE field_dimension_set
5959 SUBROUTINE field_dimension_set_and_lock(FIELD,VARIABLE_TYPE,FIELD_DIMENSION,ERR,ERROR,*)
5963 INTEGER(INTG),
INTENT(IN) :: variable_type
5964 INTEGER(INTG),
INTENT(IN) :: field_dimension
5965 INTEGER(INTG),
INTENT(OUT) :: err
5970 enters(
"FIELD_DIMENSION_SET_AND_LOCK",err,error,*999)
5972 CALL field_dimension_set(field,variable_type,field_dimension,err,error,*999)
5973 IF(
ASSOCIATED(field))
THEN 5974 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 5975 field%CREATE_VALUES_CACHE%DIMENSION_LOCKED(variable_type)=.true.
5977 local_error=
"Field create values cache is not associated for field number "// &
5979 CALL flagerror(local_error,err,error,*999)
5982 CALL flagerror(
"Field is not associated.",err,error,*999)
5985 exits(
"FIELD_DIMENSION_SET_AND_LOCK")
5987 999 errorsexits(
"FIELD_DIMENSION_SET_AND_LOCK",err,error)
5989 END SUBROUTINE field_dimension_set_and_lock
5996 SUBROUTINE field_finalise(FIELD,ERR,ERROR,*)
6000 INTEGER(INTG),
INTENT(OUT) :: err
6004 enters(
"FIELD_FINALISE",err,error,*999)
6006 IF(
ASSOCIATED(field))
THEN 6008 CALL field_scalings_finalise(field,err,error,*999)
6009 CALL field_variables_finalise(field,err,error,*999)
6010 CALL field_create_values_cache_finalise(field%CREATE_VALUES_CACHE,err,error,*999)
6011 CALL field_geometric_parameters_finalise(field%GEOMETRIC_FIELD_PARAMETERS,err,error,*999)
6012 IF(
ALLOCATED(field%VARIABLE_TYPE_MAP))
DEALLOCATE(field%VARIABLE_TYPE_MAP)
6016 exits(
"FIELD_FINALISE")
6018 999 errorsexits(
"FIELD_FINALISE",err,error)
6020 END SUBROUTINE field_finalise
6027 SUBROUTINE field_initialise(FIELD,ERR,ERROR,*)
6031 INTEGER(INTG),
INTENT(OUT) :: err
6034 INTEGER(INTG) :: dummy_err,variable_type_idx
6037 enters(
"FIELD_INITIALISE",err,error,*998)
6039 IF(
ASSOCIATED(field))
THEN 6040 CALL flagerror(
"Field is already associated.",err,error,*998)
6042 ALLOCATE(field,stat=err)
6043 IF(err/=0)
CALL flagerror(
"Could not allocate field.",err,error,*999)
6044 field%GLOBAL_NUMBER=0
6047 field%FIELD_FINISHED=.false.
6048 NULLIFY(field%FIELDS)
6049 NULLIFY(field%REGION)
6050 field%TYPE=field_geometric_type
6051 field%DEPENDENT_TYPE=field_independent_type
6052 NULLIFY(field%DECOMPOSITION)
6053 field%NUMBER_OF_VARIABLES=0
6054 NULLIFY(field%GEOMETRIC_FIELD)
6055 NULLIFY(field%GEOMETRIC_FIELD_PARAMETERS)
6056 NULLIFY(field%CREATE_VALUES_CACHE)
6057 ALLOCATE(field%VARIABLE_TYPE_MAP(field_number_of_variable_types),stat=err)
6058 IF(err/=0)
CALL flagerror(
"Could not allocate field variable type map.",err,error,*999)
6059 DO variable_type_idx=1,field_number_of_variable_types
6060 NULLIFY(field%VARIABLE_TYPE_MAP(variable_type_idx)%PTR)
6064 exits(
"FIELD_INITIALISE")
6066 999
CALL field_finalise(field,dummy_err,dummy_error,*998)
6067 998 errorsexits(
"FIELD_INITIALISE",err,error)
6070 END SUBROUTINE field_initialise
6077 SUBROUTINE field_interpolate_gauss(PARTIAL_DERIVATIVE_TYPE,QUADRATURE_SCHEME,GAUSS_POINT_NUMBER,INTERPOLATED_POINT, &
6078 & err,error,*,componenttype)
6081 INTEGER(INTG),
INTENT(IN) :: partial_derivative_type
6082 INTEGER(INTG),
INTENT(IN) :: quadrature_scheme
6083 INTEGER(INTG),
INTENT(IN) :: gauss_point_number
6085 INTEGER(INTG),
INTENT(OUT) :: err
6087 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
6089 INTEGER(INTG) :: component_idx,ni,nu
6090 INTEGER(INTG) :: startcomponentidx,endcomponentidx
6096 enters(
"FIELD_INTERPOLATE_GAUSS",err,error,*999)
6098 IF(
ASSOCIATED(interpolated_point))
THEN 6099 interpolation_parameters=>interpolated_point%INTERPOLATION_PARAMETERS
6100 IF(
ASSOCIATED(interpolation_parameters))
THEN 6101 field=>interpolation_parameters%FIELD
6102 IF(
ASSOCIATED(field))
THEN 6103 NULLIFY(coordinate_system)
6104 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
6105 IF(
PRESENT(componenttype))
THEN 6106 SELECT CASE(componenttype)
6107 CASE(field_all_components_type)
6109 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
6110 CASE(field_geometric_components_type)
6111 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 6113 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(FIELD_U_VARIABLE_TYPE)%PTR% &
6114 & number_of_components
6115 ELSEIF(interpolation_parameters%FIELD%TYPE==field_geometric_type)
THEN 6117 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
6119 local_error=
"Field type "//
trim(
number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
6120 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 6121 CALL flagerror(local_error,err,error,*999)
6123 CASE(field_nongeometric_components_type)
6124 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 6125 startcomponentidx=-interpolation_parameters%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)% &
6126 &
ptr%NUMBER_OF_COMPONENTS+1
6127 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
6129 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
6130 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 6131 CALL flagerror(local_error,err,error,*999)
6134 local_error=
"Interpolation component type "//trim(number_to_vstring(componenttype,
"*",err,error))//
" is not valid." 6135 CALL flagerror(local_error,err,error,*999)
6139 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
6141 SELECT CASE(partial_derivative_type)
6143 DO component_idx=startcomponentidx,endcomponentidx
6144 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6145 CASE(field_constant_interpolation)
6146 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6147 CASE(field_element_based_interpolation)
6148 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6149 CASE(field_node_based_interpolation)
6150 interpolated_point%VALUES(component_idx,1)=basis_interpolate_gauss(interpolation_parameters%BASES( &
6151 & component_idx)%PTR,no_part_deriv,quadrature_scheme,gauss_point_number,interpolation_parameters% &
6152 & parameters(:,component_idx),err,error)
6154 CASE(field_grid_point_based_interpolation)
6155 CALL flagerror(
"Not implemented.",err,error,*999)
6156 CASE(field_gauss_point_based_interpolation)
6157 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(gauss_point_number, &
6160 local_error=
"The field component interpolation type of "//trim(number_to_vstring(interpolation_parameters% &
6161 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
6162 &
" is invalid for component index "//trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6164 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6167 interpolated_point%PARTIAL_DERIVATIVE_TYPE=no_part_deriv
6168 CASE(first_part_deriv)
6169 DO component_idx=startcomponentidx,endcomponentidx
6170 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6171 CASE(field_constant_interpolation)
6173 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6174 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6177 DO ni=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6178 nu=partial_derivative_first_derivative_map(ni)
6179 interpolated_point%VALUES(component_idx,nu)=0.0_dp
6180 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
6183 CASE(field_element_based_interpolation)
6185 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6186 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6189 DO ni=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6190 nu=partial_derivative_first_derivative_map(ni)
6191 interpolated_point%VALUES(component_idx,nu)=0.0_dp
6192 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
6195 CASE(field_node_based_interpolation)
6197 interpolated_point%VALUES(component_idx,1)=basis_interpolate_gauss(interpolation_parameters%BASES( &
6198 & component_idx)%PTR,no_part_deriv,quadrature_scheme,gauss_point_number,interpolation_parameters% &
6199 & parameters(:,component_idx),err,error)
6201 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6204 DO ni=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6205 nu=partial_derivative_first_derivative_map(ni)
6206 interpolated_point%VALUES(component_idx,nu)=basis_interpolate_gauss(interpolation_parameters% &
6207 & bases(component_idx)%PTR,nu,quadrature_scheme,gauss_point_number, &
6208 & interpolation_parameters%PARAMETERS(:,component_idx),err,error)
6210 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
6213 CASE(field_grid_point_based_interpolation)
6214 CALL flagerror(
"Not implemented.",err,error,*999)
6215 CASE(field_gauss_point_based_interpolation)
6216 CALL flagerror(
"Not implemented.",err,error,*999)
6218 local_error=
"The field component interpolation type of "//trim(number_to_vstring(interpolation_parameters% &
6219 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
6220 &
" is invalid for component index "//trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6223 interpolated_point%PARTIAL_DERIVATIVE_TYPE=first_part_deriv
6224 CASE(second_part_deriv)
6225 DO component_idx=startcomponentidx,endcomponentidx
6226 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6227 CASE(field_constant_interpolation)
6229 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6230 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6233 DO nu=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_PARTIAL_DERIVATIVES
6234 interpolated_point%VALUES(component_idx,nu)=0.0_dp
6235 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
6238 CASE(field_element_based_interpolation)
6240 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6241 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6244 DO nu=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_PARTIAL_DERIVATIVES
6245 interpolated_point%VALUES(component_idx,nu)=0.0_dp
6246 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
6249 CASE(field_node_based_interpolation)
6250 DO nu=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_PARTIAL_DERIVATIVES
6251 interpolated_point%VALUES(component_idx,nu)=basis_interpolate_gauss(interpolation_parameters% &
6252 & bases(component_idx)%PTR,nu,quadrature_scheme,gauss_point_number, &
6253 & interpolation_parameters%PARAMETERS(:,component_idx),err,error)
6255 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
6258 CASE(field_grid_point_based_interpolation)
6259 CALL flagerror(
"Not implemented.",err,error,*999)
6260 CASE(field_gauss_point_based_interpolation)
6261 CALL flagerror(
"Not implemented.",err,error,*999)
6263 local_error=
"The field component interpolation type of "//trim(number_to_vstring(interpolation_parameters% &
6264 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
6265 &
" is invalid for component index "//trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6268 interpolated_point%PARTIAL_DERIVATIVE_TYPE=second_part_deriv
6270 local_error=
"The partial derivative type of "//trim(number_to_vstring(partial_derivative_type,
"*",err,error))// &
6272 CALL flagerror(local_error,err,error,*999)
6275 CALL flagerror(
"The interpolation parameters field is not associated.",err,error,*999)
6278 CALL flagerror(
"Interpolated point interpolation parameters is not associated.",err,error,*999)
6281 CALL flagerror(
"Interpolated point is not associated.",err,error,*999)
6284 exits(
"FIELD_INTERPOLATE_GAUSS")
6286 999 errorsexits(
"FIELD_INTERPOLATE_GAUSS",err,error)
6288 END SUBROUTINE field_interpolate_gauss
6295 SUBROUTINE field_interpolate_node(PHYSICAL_DERIVATIVE_TYPE,PARAMETER_SET_TYPE,COMPONENT_NUMBER,NODE_NUMBER, &
6296 & physical_point,err,error,*)
6299 INTEGER(INTG),
INTENT(IN) :: physical_derivative_type
6300 INTEGER(INTG),
INTENT(IN) :: parameter_set_type
6301 INTEGER(INTG),
INTENT(IN) :: component_number
6302 INTEGER(INTG),
INTENT(IN) :: node_number
6303 TYPE(field_physical_point_type),
POINTER :: physical_point
6304 INTEGER(INTG),
INTENT(OUT) :: err
6305 TYPE(varying_string),
INTENT(OUT) :: error
6307 INTEGER(INTG) :: component_idx,element,elem_idx,local_node_number,local_node_idx,number_of_surrounding_elements, &
6308 & partial_deriv_idx,xi_idx
6309 REAL(DP) :: xi(3),dx_dxi(3,3),dxi_dx(3,3),det_dx_dxi
6310 TYPE(basis_type),
POINTER :: basis
6311 TYPE(coordinate_system_type),
POINTER :: coordinate_system
6312 TYPE(domain_type),
POINTER :: domain
6313 TYPE(domain_elements_type),
POINTER :: elem_topology
6314 TYPE(domain_nodes_type),
POINTER :: nodes_topology
6315 TYPE(domain_topology_type),
POINTER :: domain_topology
6316 TYPE(field_type),
POINTER :: field
6317 TYPE(field_interpolated_point_type),
POINTER :: field_interpolated_point,geometric_interpolated_point
6318 TYPE(field_interpolation_parameters_type),
POINTER :: field_interpolation_parameters,geometric_interpolation_parameters
6319 TYPE(field_variable_type),
POINTER :: field_variable,geometric_variable
6320 TYPE(varying_string) :: local_error
6322 enters(
"FIELD_INTERPOLATE_NODE",err,error,*999)
6324 IF(
ASSOCIATED(physical_point))
THEN 6325 field_interpolated_point=>physical_point%FIELD_INTERPOLATED_POINT
6326 IF(
ASSOCIATED(field_interpolated_point))
THEN 6327 geometric_interpolated_point=>physical_point%GEOMETRIC_INTERPOLATED_POINT
6328 IF(
ASSOCIATED(geometric_interpolated_point))
THEN 6329 field_interpolation_parameters=>field_interpolated_point%INTERPOLATION_PARAMETERS
6330 IF(
ASSOCIATED(field_interpolation_parameters))
THEN 6331 geometric_interpolation_parameters=>geometric_interpolated_point%INTERPOLATION_PARAMETERS
6332 IF(
ASSOCIATED(geometric_interpolation_parameters))
THEN 6333 field_variable=>field_interpolation_parameters%FIELD_VARIABLE
6334 IF(
ASSOCIATED(field_variable))
THEN 6335 geometric_variable=>geometric_interpolation_parameters%FIELD_VARIABLE
6336 IF(
ASSOCIATED(geometric_variable))
THEN 6337 field=>field_variable%FIELD
6338 IF(
ASSOCIATED(field))
THEN 6339 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
6340 IF(component_number>0.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 6341 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
6342 IF(
ASSOCIATED(domain))
THEN 6343 domain_topology=>domain%TOPOLOGY
6344 IF(
ASSOCIATED(domain_topology))
THEN 6345 nodes_topology=>domain_topology%NODES
6346 IF(
ASSOCIATED(nodes_topology))
THEN 6347 IF(node_number>0.AND.node_number<=nodes_topology%NUMBER_OF_NODES)
THEN 6348 elem_topology=>domain_topology%ELEMENTS
6349 IF(
ASSOCIATED(elem_topology))
THEN 6350 physical_point%VALUES=0.0_dp
6351 IF(physical_derivative_type==no_physical_deriv)
THEN 6352 number_of_surrounding_elements=1
6354 number_of_surrounding_elements=nodes_topology%NODES(node_number)% &
6355 & number_of_surrounding_elements
6356 physical_point%VALUES=0.0_dp
6359 DO elem_idx=1,number_of_surrounding_elements
6360 element=nodes_topology%NODES(node_number)%SURROUNDING_ELEMENTS(elem_idx)
6361 CALL field_interpolation_parameters_element_get(parameter_set_type,element, &
6362 & field_interpolation_parameters,err,error,*999)
6363 basis=>elem_topology%ELEMENTS(element)%BASIS
6364 IF(
ASSOCIATED(basis))
THEN 6366 DO local_node_idx=1,basis%NUMBER_OF_NODES
6367 IF(elem_topology%ELEMENTS(element)%ELEMENT_NODES(local_node_idx)==node_number)
THEN 6368 local_node_number=local_node_idx
6372 IF(local_node_number/=0)
THEN 6373 CALL basis_local_node_xi_calculate(basis,local_node_number,xi,err,error,*999)
6374 SELECT CASE(physical_derivative_type)
6375 CASE(no_physical_deriv)
6376 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
6377 SELECT CASE(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6378 CASE(field_constant_interpolation)
6379 physical_point%VALUES(component_idx)=field_interpolation_parameters% &
6380 & parameters(1,component_idx)
6381 CASE(field_element_based_interpolation)
6382 physical_point%VALUES(component_idx)=field_interpolation_parameters% &
6383 & parameters(1,component_idx)
6384 CASE(field_node_based_interpolation)
6385 physical_point%VALUES(component_idx)=basis_interpolate_xi( &
6386 & field_interpolation_parameters%BASES(component_idx)%PTR,no_part_deriv, &
6387 & xi,field_interpolation_parameters%PARAMETERS(:,component_idx),err,error)
6389 CASE(field_grid_point_based_interpolation)
6390 CALL flagerror(
"Not implemented.",err,error,*999)
6391 CASE(field_gauss_point_based_interpolation)
6392 CALL flagerror(
"Not implemented.",err,error,*999)
6393 CASE(field_data_point_based_interpolation)
6394 CALL flagerror(
"Not implemented.",err,error,*999)
6396 local_error=
"The field component interpolation type of "// &
6397 & trim(number_to_vstring(field_variable%COMPONENTS(component_idx)% &
6398 & interpolation_type,
"*",err,error))//
" is invalid for component index "// &
6399 & trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6402 physical_point%PHYSICAL_DERIVATIVE_TYPE=no_physical_deriv
6403 CASE(gradient_physical_deriv)
6404 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
6405 SELECT CASE(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6406 CASE(field_constant_interpolation)
6408 physical_point%VALUES(component_idx)=0.0_dp
6409 CASE(field_element_based_interpolation)
6411 physical_point%VALUES(component_idx)=0.0_dp
6412 CASE(field_node_based_interpolation)
6413 CALL field_interpolation_parameters_element_get(field_values_set_type,element, &
6414 & geometric_interpolation_parameters,err,error,*999)
6416 DO xi_idx=1,field_interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6417 partial_deriv_idx=partial_derivative_first_derivative_map(xi_idx)
6419 field_interpolated_point%VALUES(component_idx,partial_deriv_idx) = &
6420 & basis_interpolate_xi(field_interpolation_parameters%BASES(component_idx)%PTR, &
6421 & partial_deriv_idx,xi,field_interpolation_parameters%PARAMETERS(:, &
6422 & component_idx),err,error)
6424 CALL coordinate_interpolation_adjust(coordinate_system,partial_deriv_idx, &
6425 & field_interpolated_point%VALUES(component_idx,partial_deriv_idx),err,error,*999)
6426 geometric_interpolated_point%VALUES(component_idx,partial_deriv_idx) = &
6427 & basis_interpolate_xi(geometric_interpolation_parameters%BASES(component_idx)% &
6428 & ptr,partial_deriv_idx,xi,geometric_interpolation_parameters%PARAMETERS(:, &
6429 & component_idx),err,error)
6431 CALL coordinate_interpolation_adjust(coordinate_system,partial_deriv_idx, &
6432 & geometric_interpolated_point%VALUES(component_idx,partial_deriv_idx), &
6434 dx_dxi(component_idx,xi_idx)=geometric_interpolated_point% &
6435 & values(component_idx,partial_deriv_idx)
6437 CASE(field_grid_point_based_interpolation)
6438 CALL flagerror(
"Not implemented.",err,error,*999)
6439 CASE(field_gauss_point_based_interpolation)
6440 CALL flagerror(
"Not implemented.",err,error,*999)
6441 CASE(field_data_point_based_interpolation)
6442 CALL flagerror(
"Not implemented.",err,error,*999)
6444 local_error=
"The field component interpolation type of "// &
6445 & trim(number_to_vstring(field_interpolation_parameters% &
6446 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
6447 &
" is invalid for component index "// &
6448 & trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6452 CALL invert(dx_dxi,dxi_dx,det_dx_dxi,err,error,*999)
6453 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
6454 DO xi_idx=1,field_interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6455 partial_deriv_idx=partial_derivative_first_derivative_map(xi_idx)
6456 physical_point%VALUES(component_idx)=physical_point%VALUES(component_idx)+ &
6457 & field_interpolated_point%VALUES(component_idx,partial_deriv_idx)* &
6458 & dxi_dx(xi_idx,component_idx)
6461 physical_point%PHYSICAL_DERIVATIVE_TYPE=gradient_physical_deriv
6463 local_error=
"The physical derivative type of "// &
6464 & trim(number_to_vstring(physical_derivative_type,
"*",err,error))//
" is invalid." 6465 CALL flagerror(local_error,err,error,*999)
6468 local_error=
"Could not find the local node for node "// &
6469 & trim(number_to_vstring(node_number,
"*",err,error))//
" in element number "// &
6470 & trim(number_to_vstring(element,
"*",err,error))//
"." 6471 CALL flagerror(local_error,err,error,*999)
6474 local_error=
"The basis for element "//trim(number_to_vstring(element,
"*",err,error))// &
6475 &
" is not associated." 6476 CALL flagerror(local_error,err,error,*999)
6479 IF(physical_derivative_type==no_physical_deriv)
THEN 6481 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
6482 SELECT CASE(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6483 CASE(field_constant_interpolation)
6485 CASE(field_element_based_interpolation)
6487 CASE(field_node_based_interpolation)
6488 physical_point%VALUES(component_idx)=physical_point%VALUES(component_idx)/ &
6489 &
REAL(number_of_surrounding_elements,dp)
6490 CASE(field_grid_point_based_interpolation)
6491 CALL flagerror(
"Not implemented.",err,error,*999)
6492 CASE(field_gauss_point_based_interpolation)
6493 CALL flagerror(
"Not implemented.",err,error,*999)
6494 CASE(field_data_point_based_interpolation)
6495 CALL flagerror(
"Not implemented.",err,error,*999)
6497 local_error=
"The field component interpolation type of "// &
6498 & trim(number_to_vstring(field_interpolation_parameters% &
6499 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
6500 &
" is invalid for component index "// &
6501 & trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6506 CALL flagerror(
"Domain element topology is not associated.",err,error,*999)
6509 local_error=
"The specified node number of "//trim(number_to_vstring(node_number,
"*",err,error))// &
6510 &
" is invalid. The node number needs to be > 0 and <= "// &
6511 & trim(number_to_vstring(nodes_topology%NUMBER_OF_NODES,
"*",err,error))//
"." 6512 CALL flagerror(local_error,err,error,*999)
6515 CALL flagerror(
"Nodes topology is not associated.",err,error,*999)
6518 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
6521 CALL flagerror(
"Domain is not associated.",err,error,*999)
6524 local_error=
"The specified component number of "//trim(number_to_vstring(component_number,
"*",err,error))// &
6525 &
" is invalid. The component number must be > 0 and <= "// &
6526 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
"." 6527 CALL flagerror(local_error,err,error,*999)
6530 CALL flagerror(
"The field variable field is not associated.",err,error,*999)
6533 CALL flagerror(
"The geometric interpolation parameters field variable is not associated.",err,error,*999)
6536 CALL flagerror(
"The field interpolation parameters field variable is not associated.",err,error,*999)
6539 CALL flagerror(
"Geometric interpolated point interpolation parameters is not associated.",err,error,*999)
6542 CALL flagerror(
"Field interpolated point interpolation parameters is not associated.",err,error,*999)
6545 CALL flagerror(
"Physical point geometric interpolated point is not associated.",err,error,*999)
6548 CALL flagerror(
"Physical point field interpolated point is not associated.",err,error,*999)
6551 CALL flagerror(
"Physical point is not associated.",err,error,*999)
6554 exits(
"FIELD_INTERPOLATE_NODE")
6556 999 errorsexits(
"FIELD_INTERPOLATE_NODE",err,error)
6559 END SUBROUTINE field_interpolate_node
6566 SUBROUTINE field_interpolate_field_node(PHYSICAL_DERIVATIVE_TYPE,PARAMETER_SET_TYPE,FIELD,VARIABLE_TYPE,COMPONENT_NUMBER, &
6567 & node_number,physical_point,err,error,*)
6570 INTEGER(INTG),
INTENT(IN) :: physical_derivative_type
6571 INTEGER(INTG),
INTENT(IN) :: parameter_set_type
6572 TYPE(field_type),
POINTER :: field
6573 INTEGER(INTG),
INTENT(IN) :: variable_type
6574 INTEGER(INTG),
INTENT(IN) :: component_number
6575 INTEGER(INTG),
INTENT(IN) :: node_number
6576 TYPE(field_physical_point_type),
POINTER :: physical_point
6577 INTEGER(INTG),
INTENT(OUT) :: err
6578 TYPE(varying_string),
INTENT(OUT) :: error
6580 INTEGER(INTG) :: component_idx,element,elem_idx,local_node_number,local_node_idx,number_of_surrounding_elements, &
6581 & partial_deriv_idx,xi_idx
6582 REAL(DP) :: xi(3),dx_dxi(3,3),dxi_dx(3,3),det_dx_dxi
6583 TYPE(basis_type),
POINTER :: basis
6584 TYPE(coordinate_system_type),
POINTER :: coordinate_system
6585 TYPE(domain_type),
POINTER :: domain
6586 TYPE(domain_elements_type),
POINTER :: elem_topology
6587 TYPE(domain_nodes_type),
POINTER :: nodes_topology
6588 TYPE(domain_topology_type),
POINTER :: domain_topology
6589 TYPE(field_type),
POINTER :: interp_field
6590 TYPE(field_interpolated_point_type),
POINTER :: field_interpolated_point,geometric_interpolated_point
6591 TYPE(field_interpolation_parameters_type),
POINTER :: field_interpolation_parameters,geometric_interpolation_parameters
6592 TYPE(field_variable_type),
POINTER :: field_variable,interp_variable,geometric_variable
6593 TYPE(varying_string) :: local_error
6595 enters(
"FIELD_INTERPOLATE_FIELD_NODE",err,error,*999)
6597 IF(
ASSOCIATED(physical_point))
THEN 6598 field_interpolated_point=>physical_point%FIELD_INTERPOLATED_POINT
6599 IF(
ASSOCIATED(field_interpolated_point))
THEN 6600 geometric_interpolated_point=>physical_point%GEOMETRIC_INTERPOLATED_POINT
6601 IF(
ASSOCIATED(geometric_interpolated_point))
THEN 6602 field_interpolation_parameters=>field_interpolated_point%INTERPOLATION_PARAMETERS
6603 IF(
ASSOCIATED(field_interpolation_parameters))
THEN 6604 geometric_interpolation_parameters=>geometric_interpolated_point%INTERPOLATION_PARAMETERS
6605 IF(
ASSOCIATED(geometric_interpolation_parameters))
THEN 6606 interp_variable=>field_interpolation_parameters%FIELD_VARIABLE
6607 IF(
ASSOCIATED(interp_variable))
THEN 6608 geometric_variable=>geometric_interpolation_parameters%FIELD_VARIABLE
6609 IF(
ASSOCIATED(geometric_variable))
THEN 6610 interp_field=>interp_variable%FIELD
6611 IF(
ASSOCIATED(interp_field))
THEN 6612 NULLIFY(coordinate_system)
6613 CALL field_coordinate_system_get(interp_field,coordinate_system,err,error,*999)
6614 IF(
ASSOCIATED(field))
THEN 6615 NULLIFY(field_variable)
6616 CALL field_variable_get(field,variable_type,field_variable,err,error,*999)
6617 IF(component_number>0.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 6618 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
6619 IF(
ASSOCIATED(domain))
THEN 6620 domain_topology=>domain%TOPOLOGY
6621 IF(
ASSOCIATED(domain_topology))
THEN 6622 nodes_topology=>domain_topology%NODES
6623 IF(
ASSOCIATED(nodes_topology))
THEN 6624 IF(node_number>0.AND.node_number<=nodes_topology%NUMBER_OF_NODES)
THEN 6625 elem_topology=>domain_topology%ELEMENTS
6626 IF(
ASSOCIATED(elem_topology))
THEN 6627 physical_point%VALUES=0.0_dp
6628 IF(physical_derivative_type==no_physical_deriv)
THEN 6629 number_of_surrounding_elements=1
6631 number_of_surrounding_elements=nodes_topology%NODES(node_number)% &
6632 & number_of_surrounding_elements
6633 physical_point%VALUES=0.0_dp
6636 DO elem_idx=1,number_of_surrounding_elements
6637 element=nodes_topology%NODES(node_number)%SURROUNDING_ELEMENTS(elem_idx)
6638 CALL field_interpolation_parameters_element_get(parameter_set_type,element, &
6639 & field_interpolation_parameters,err,error,*999)
6640 basis=>elem_topology%ELEMENTS(element)%BASIS
6641 IF(
ASSOCIATED(basis))
THEN 6643 DO local_node_idx=1,basis%NUMBER_OF_NODES
6644 IF(elem_topology%ELEMENTS(element)%ELEMENT_NODES(local_node_idx)==node_number)
THEN 6645 local_node_number=local_node_idx
6649 IF(local_node_number/=0)
THEN 6650 CALL basis_local_node_xi_calculate(basis,local_node_number,xi,err,error,*999)
6651 SELECT CASE(physical_derivative_type)
6652 CASE(no_physical_deriv)
6653 DO component_idx=1,interp_variable%NUMBER_OF_COMPONENTS
6654 SELECT CASE(interp_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6655 CASE(field_constant_interpolation)
6656 physical_point%VALUES(component_idx)=field_interpolation_parameters% &
6657 & parameters(1,component_idx)
6658 CASE(field_element_based_interpolation)
6659 physical_point%VALUES(component_idx)=field_interpolation_parameters% &
6660 & parameters(1,component_idx)
6661 CASE(field_node_based_interpolation)
6662 physical_point%VALUES(component_idx)=basis_interpolate_xi( &
6663 & field_interpolation_parameters%BASES(component_idx)%PTR,no_part_deriv, &
6664 & xi,field_interpolation_parameters%PARAMETERS(:,component_idx),err,error)
6666 CASE(field_grid_point_based_interpolation)
6667 CALL flagerror(
"Not implemented.",err,error,*999)
6668 CASE(field_gauss_point_based_interpolation)
6669 CALL flagerror(
"Not implemented.",err,error,*999)
6670 CASE(field_data_point_based_interpolation)
6671 CALL flagerror(
"Not implemented.",err,error,*999)
6673 local_error=
"The field component interpolation type of "// &
6674 & trim(number_to_vstring(interp_variable%COMPONENTS(component_idx)% &
6675 & interpolation_type,
"*",err,error))//
" is invalid for component index "// &
6676 & trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6679 physical_point%PHYSICAL_DERIVATIVE_TYPE=no_physical_deriv
6680 CASE(gradient_physical_deriv)
6681 DO component_idx=1,interp_variable%NUMBER_OF_COMPONENTS
6682 SELECT CASE(interp_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6683 CASE(field_constant_interpolation)
6685 physical_point%VALUES(component_idx)=0.0_dp
6686 CASE(field_element_based_interpolation)
6688 physical_point%VALUES(component_idx)=0.0_dp
6689 CASE(field_node_based_interpolation)
6690 CALL field_interpolation_parameters_element_get(field_values_set_type,element, &
6691 & geometric_interpolation_parameters,err,error,*999)
6693 DO xi_idx=1,field_interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6694 partial_deriv_idx=partial_derivative_first_derivative_map(xi_idx)
6696 field_interpolated_point%VALUES(component_idx,partial_deriv_idx) = &
6697 & basis_interpolate_xi(field_interpolation_parameters%BASES(component_idx)%PTR, &
6698 & partial_deriv_idx,xi,field_interpolation_parameters%PARAMETERS(:, &
6699 & component_idx),err,error)
6701 CALL coordinate_interpolation_adjust(coordinate_system,partial_deriv_idx, &
6702 & field_interpolated_point%VALUES(component_idx,partial_deriv_idx),err,error,*999)
6703 geometric_interpolated_point%VALUES(component_idx,partial_deriv_idx) = &
6704 & basis_interpolate_xi(geometric_interpolation_parameters%BASES(component_idx)% &
6705 & ptr,partial_deriv_idx,xi,geometric_interpolation_parameters%PARAMETERS(:, &
6706 & component_idx),err,error)
6708 CALL coordinate_interpolation_adjust(coordinate_system,partial_deriv_idx, &
6709 & geometric_interpolated_point%VALUES(component_idx,partial_deriv_idx), &
6711 dx_dxi(component_idx,xi_idx)=geometric_interpolated_point% &
6712 & values(component_idx,partial_deriv_idx)
6714 CASE(field_grid_point_based_interpolation)
6715 CALL flagerror(
"Not implemented.",err,error,*999)
6716 CASE(field_gauss_point_based_interpolation)
6717 CALL flagerror(
"Not implemented.",err,error,*999)
6718 CASE(field_data_point_based_interpolation)
6719 CALL flagerror(
"Not implemented.",err,error,*999)
6721 local_error=
"The field component interpolation type of "// &
6722 & trim(number_to_vstring(field_interpolation_parameters% &
6723 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
6724 &
" is invalid for component index "// &
6725 & trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6729 CALL invert(dx_dxi,dxi_dx,det_dx_dxi,err,error,*999)
6730 DO component_idx=1,interp_variable%NUMBER_OF_COMPONENTS
6731 DO xi_idx=1,field_interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6732 partial_deriv_idx=partial_derivative_first_derivative_map(xi_idx)
6733 physical_point%VALUES(component_idx)=physical_point%VALUES(component_idx)+ &
6734 & field_interpolated_point%VALUES(component_idx,partial_deriv_idx)* &
6735 & dxi_dx(xi_idx,component_idx)
6738 physical_point%PHYSICAL_DERIVATIVE_TYPE=gradient_physical_deriv
6740 local_error=
"The physical derivative type of "// &
6741 & trim(number_to_vstring(physical_derivative_type,
"*",err,error))//
" is invalid." 6742 CALL flagerror(local_error,err,error,*999)
6745 local_error=
"Could not find the local node for node "// &
6746 & trim(number_to_vstring(node_number,
"*",err,error))//
" in element number "// &
6747 & trim(number_to_vstring(element,
"*",err,error))//
"." 6748 CALL flagerror(local_error,err,error,*999)
6751 local_error=
"The basis for element "//trim(number_to_vstring(element,
"*",err,error))// &
6752 &
" is not associated." 6753 CALL flagerror(local_error,err,error,*999)
6756 IF(physical_derivative_type==no_physical_deriv)
THEN 6758 DO component_idx=1,interp_variable%NUMBER_OF_COMPONENTS
6759 SELECT CASE(interp_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6760 CASE(field_constant_interpolation)
6762 CASE(field_element_based_interpolation)
6764 CASE(field_node_based_interpolation)
6765 physical_point%VALUES(component_idx)=physical_point%VALUES(component_idx)/ &
6766 &
REAL(number_of_surrounding_elements,dp)
6767 CASE(field_grid_point_based_interpolation)
6768 CALL flagerror(
"Not implemented.",err,error,*999)
6769 CASE(field_gauss_point_based_interpolation)
6770 CALL flagerror(
"Not implemented.",err,error,*999)
6771 CASE(field_data_point_based_interpolation)
6772 CALL flagerror(
"Not implemented.",err,error,*999)
6774 local_error=
"The field component interpolation type of "// &
6775 & trim(number_to_vstring(interp_variable%COMPONENTS(component_idx)% &
6776 & interpolation_type,
"*",err,error))// &
6777 &
" is invalid for component index "// &
6778 & trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6783 CALL flagerror(
"Domain element topology is not associated.",err,error,*999)
6786 local_error=
"The specified node number of "//trim(number_to_vstring(node_number,
"*",err,error))// &
6787 &
" is invalid. The node number needs to be > 0 and <= "// &
6788 & trim(number_to_vstring(nodes_topology%NUMBER_OF_NODES,
"*",err,error))//
"." 6789 CALL flagerror(local_error,err,error,*999)
6792 CALL flagerror(
"Nodes topology is not associated.",err,error,*999)
6795 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
6798 CALL flagerror(
"Domain is not associated.",err,error,*999)
6801 local_error=
"The specified component number of "// &
6802 & trim(number_to_vstring(component_number,
"*",err,error))// &
6803 &
" is invalid. The component number must be > 0 and <= "// &
6804 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
"." 6805 CALL flagerror(local_error,err,error,*999)
6808 CALL flagerror(
"Field is not associated.",err,error,*999)
6811 CALL flagerror(
"The field variable field is not associated.",err,error,*999)
6814 CALL flagerror(
"The geometric interpolation parameters field variable is not associated.",err,error,*999)
6817 CALL flagerror(
"The field interpolation parameters field variable is not associated.",err,error,*999)
6820 CALL flagerror(
"Geometric interpolated point interpolation parameters is not associated.",err,error,*999)
6823 CALL flagerror(
"Field interpolated point interpolation parameters is not associated.",err,error,*999)
6826 CALL flagerror(
"Physical point geometric interpolated point is not associated.",err,error,*999)
6829 CALL flagerror(
"Physical point field interpolated point is not associated.",err,error,*999)
6832 CALL flagerror(
"Physical point is not associated.",err,error,*999)
6835 exits(
"FIELD_INTERPOLATE_FIELD_NODE")
6837 999 errorsexits(
"FIELD_INTERPOLATE_FIELD_NODE",err,error)
6840 END SUBROUTINE field_interpolate_field_node
6847 SUBROUTINE field_interpolate_local_face_gauss(PARTIAL_DERIVATIVE_TYPE,QUADRATURE_SCHEME,LOCAL_FACE_NUMBER, &
6848 & gauss_point_number,interpolated_point,err,error,*,componenttype)
6851 INTEGER(INTG),
INTENT(IN) :: partial_derivative_type
6852 INTEGER(INTG),
INTENT(IN) :: quadrature_scheme
6853 INTEGER(INTG),
INTENT(IN) :: local_face_number
6854 INTEGER(INTG),
INTENT(IN) :: gauss_point_number
6855 TYPE(field_interpolated_point_type),
POINTER :: interpolated_point
6856 INTEGER(INTG),
INTENT(OUT) :: err
6857 TYPE(varying_string),
INTENT(OUT) :: error
6858 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
6860 INTEGER(INTG) :: component_idx,ni,nu,startcomponentidx,endcomponentidx
6861 TYPE(coordinate_system_type),
POINTER :: coordinate_system
6862 TYPE(field_type),
POINTER :: field
6863 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
6864 TYPE(varying_string) :: local_error
6866 enters(
"FIELD_INTERPOLATE_LOCAL_FACE_GAUSS",err,error,*999)
6868 IF(
ASSOCIATED(interpolated_point))
THEN 6869 interpolation_parameters=>interpolated_point%INTERPOLATION_PARAMETERS
6870 IF(
ASSOCIATED(interpolation_parameters))
THEN 6871 field=>interpolation_parameters%FIELD
6872 IF(
ASSOCIATED(field))
THEN 6873 NULLIFY(coordinate_system)
6874 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
6875 IF(
PRESENT(componenttype))
THEN 6876 SELECT CASE(componenttype)
6877 CASE(field_all_components_type)
6879 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
6880 CASE(field_geometric_components_type)
6881 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 6883 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(FIELD_U_VARIABLE_TYPE)%PTR% &
6884 & number_of_components
6885 ELSEIF(interpolation_parameters%FIELD%TYPE==field_geometric_type)
THEN 6887 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
6889 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
6890 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 6891 CALL flagerror(local_error,err,error,*999)
6893 CASE(field_nongeometric_components_type)
6894 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 6895 startcomponentidx=-interpolation_parameters%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)% &
6896 & ptr%NUMBER_OF_COMPONENTS+1
6897 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
6899 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
6900 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 6901 CALL flagerror(local_error,err,error,*999)
6904 local_error=
"Interpolation component type "//trim(number_to_vstring(componenttype,
"*",err,error))//
" is not valid." 6905 CALL flagerror(local_error,err,error,*999)
6909 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
6911 SELECT CASE(partial_derivative_type)
6913 DO component_idx=startcomponentidx,endcomponentidx
6914 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6915 CASE(field_constant_interpolation)
6916 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6917 CASE(field_element_based_interpolation)
6918 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6919 CASE(field_node_based_interpolation)
6923 interpolated_point%VALUES(component_idx,1)=basis_interpolate_local_face_gauss(interpolation_parameters%BASES( &
6924 & component_idx)%PTR,no_part_deriv,quadrature_scheme,local_face_number,gauss_point_number, &
6925 & interpolation_parameters%PARAMETERS(:,component_idx),err,error)
6927 CASE(field_grid_point_based_interpolation)
6928 CALL flagerror(
"Not implemented.",err,error,*999)
6929 CASE(field_gauss_point_based_interpolation)
6930 CALL flagerror(
"Not implemented.",err,error,*999)
6931 CASE(field_data_point_based_interpolation)
6932 CALL flagerror(
"Not implemented.",err,error,*999)
6934 local_error=
"The field component interpolation type of "//trim(number_to_vstring(interpolation_parameters% &
6935 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
6936 &
" is invalid for component index "//trim(number_to_vstring(component_idx,
"*",err,error))//
"." 6938 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6941 interpolated_point%PARTIAL_DERIVATIVE_TYPE=no_part_deriv
6942 CASE(first_part_deriv)
6943 DO component_idx=startcomponentidx,endcomponentidx
6944 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
6945 CASE(field_constant_interpolation)
6947 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6948 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6951 DO ni=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6952 nu=partial_derivative_first_derivative_map(ni)
6953 interpolated_point%VALUES(component_idx,nu)=0.0_dp
6954 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
6957 CASE(field_element_based_interpolation)
6959 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
6960 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6963 DO ni=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6964 nu=partial_derivative_first_derivative_map(ni)
6965 interpolated_point%VALUES(component_idx,nu)=0.0_dp
6966 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
6969 CASE(field_node_based_interpolation)
6974 interpolated_point%VALUES(component_idx,1)=basis_interpolate_local_face_gauss(interpolation_parameters%BASES( &
6975 & component_idx)%PTR,no_part_deriv,quadrature_scheme,local_face_number,gauss_point_number, &
6976 & interpolation_parameters%PARAMETERS(:,component_idx),err,error)
6978 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
6981 DO ni=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
6982 nu=partial_derivative_first_derivative_map(ni)
6986 interpolated_point%VALUES(component_idx,nu)=basis_interpolate_local_face_gauss(interpolation_parameters%BASES( &
6987 & component_idx)%PTR,nu,quadrature_scheme,local_face_number,gauss_point_number, &
6988 & interpolation_parameters%PARAMETERS(:,component_idx),err,error)
6990 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
6993 CASE(field_grid_point_based_interpolation)
6994 CALL flagerror(
"Not implemented.",err,error,*999)
6995 CASE(field_gauss_point_based_interpolation)
6996 CALL flagerror(
"Not implemented.",err,error,*999)
6997 CASE(field_data_point_based_interpolation)
6998 CALL flagerror(
"Not implemented.",err,error,*999)
7000 local_error=
"The field component interpolation type of "//trim(number_to_vstring(interpolation_parameters% &
7001 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
7002 &
" is invalid for component index "//trim(number_to_vstring(component_idx,
"*",err,error))//
"." 7005 interpolated_point%PARTIAL_DERIVATIVE_TYPE=first_part_deriv
7006 CASE(second_part_deriv)
7007 DO component_idx=startcomponentidx,endcomponentidx
7008 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
7009 CASE(field_constant_interpolation)
7011 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
7012 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
7015 DO nu=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_PARTIAL_DERIVATIVES
7016 interpolated_point%VALUES(component_idx,nu)=0.0_dp
7017 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
7020 CASE(field_element_based_interpolation)
7022 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
7023 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
7026 DO nu=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_PARTIAL_DERIVATIVES
7027 interpolated_point%VALUES(component_idx,nu)=0.0_dp
7028 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
7031 CASE(field_node_based_interpolation)
7032 DO nu=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_PARTIAL_DERIVATIVES
7036 interpolated_point%VALUES(component_idx,nu)=basis_interpolate_local_face_gauss(interpolation_parameters%BASES( &
7037 & component_idx)%PTR,nu,quadrature_scheme,local_face_number,gauss_point_number, &
7038 & interpolation_parameters%PARAMETERS(:,component_idx),err,error)
7040 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
7043 CASE(field_grid_point_based_interpolation)
7044 CALL flagerror(
"Not implemented.",err,error,*999)
7045 CASE(field_gauss_point_based_interpolation)
7046 CALL flagerror(
"Not implemented.",err,error,*999)
7047 CASE(field_data_point_based_interpolation)
7048 CALL flagerror(
"Not implemented.",err,error,*999)
7050 local_error=
"The field component interpolation type of "//trim(number_to_vstring(interpolation_parameters% &
7051 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
7052 &
" is invalid for component index "//trim(number_to_vstring(component_idx,
"*",err,error))//
"." 7055 interpolated_point%PARTIAL_DERIVATIVE_TYPE=second_part_deriv
7057 local_error=
"The partial derivative type of "//trim(number_to_vstring(partial_derivative_type,
"*",err,error))// &
7059 CALL flagerror(local_error,err,error,*999)
7062 CALL flagerror(
"The interpolation parameters field is not associated.",err,error,*999)
7065 CALL flagerror(
"Interpolated point interpolation parameters is not associated.",err,error,*999)
7068 CALL flagerror(
"Interpolated point is not associated.",err,error,*999)
7071 exits(
"FIELD_INTERPOLATE_LOCAL_FACE_GAUSS")
7073 999 errorsexits(
"FIELD_INTERPOLATE_LOCAL_FACE_GAUSS",err,error)
7075 END SUBROUTINE field_interpolate_local_face_gauss
7082 SUBROUTINE field_interpolate_xi(PARTIAL_DERIVATIVE_TYPE,XI,INTERPOLATED_POINT,ERR,ERROR,*,componentType)
7085 INTEGER(INTG),
INTENT(IN) :: partial_derivative_type
7086 REAL(DP),
INTENT(IN) :: xi(:)
7087 TYPE(field_interpolated_point_type),
POINTER :: interpolated_point
7088 INTEGER(INTG),
INTENT(OUT) :: err
7089 TYPE(varying_string),
INTENT(OUT) :: error
7090 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
7092 INTEGER(INTG) :: component_idx,ni,nu,startcomponentidx,endcomponentidx
7093 TYPE(coordinate_system_type),
POINTER :: coordinate_system
7094 TYPE(field_type),
POINTER :: field
7095 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
7096 TYPE(varying_string) :: local_error
7098 enters(
"FIELD_INTERPOLATE_XI",err,error,*999)
7100 IF(
ASSOCIATED(interpolated_point))
THEN 7101 interpolation_parameters=>interpolated_point%INTERPOLATION_PARAMETERS
7102 IF(
ASSOCIATED(interpolation_parameters))
THEN 7105 field=>interpolation_parameters%FIELD
7106 IF(
ASSOCIATED(field))
THEN 7107 NULLIFY(coordinate_system)
7108 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
7109 IF(
PRESENT(componenttype))
THEN 7110 SELECT CASE(componenttype)
7111 CASE(field_all_components_type)
7113 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
7114 CASE(field_geometric_components_type)
7115 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 7117 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(FIELD_U_VARIABLE_TYPE)%PTR% &
7118 & number_of_components
7119 ELSEIF(interpolation_parameters%FIELD%TYPE==field_geometric_type)
THEN 7121 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
7123 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
7124 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 7125 CALL flagerror(local_error,err,error,*999)
7127 CASE(field_nongeometric_components_type)
7128 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 7129 startcomponentidx=-interpolation_parameters%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)% &
7130 & ptr%NUMBER_OF_COMPONENTS+1
7131 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
7133 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
7134 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 7135 CALL flagerror(local_error,err,error,*999)
7138 local_error=
"Interpolation component type "//trim(number_to_vstring(componenttype,
"*",err,error))//
" is not valid." 7139 CALL flagerror(local_error,err,error,*999)
7143 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
7145 SELECT CASE(partial_derivative_type)
7147 DO component_idx=startcomponentidx,endcomponentidx
7148 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
7149 CASE(field_constant_interpolation)
7150 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
7151 CASE(field_element_based_interpolation)
7152 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
7153 CASE(field_node_based_interpolation)
7154 interpolated_point%VALUES(component_idx,1)=basis_interpolate_xi(interpolation_parameters% &
7155 & bases(component_idx)%PTR,no_part_deriv,xi,interpolation_parameters%PARAMETERS(:,component_idx),err,error)
7157 CASE(field_grid_point_based_interpolation)
7158 CALL flagerror(
"Not implemented.",err,error,*999)
7159 CASE(field_gauss_point_based_interpolation)
7160 CALL flagerror(
"Not implemented.",err,error,*999)
7161 CASE(field_data_point_based_interpolation)
7162 CALL flagerror(
"Not implemented.",err,error,*999)
7164 local_error=
"The field component interpolation type of "//trim(number_to_vstring(interpolation_parameters% &
7165 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
7166 &
" is invalid for component index "//trim(number_to_vstring(component_idx,
"*",err,error))//
"." 7168 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
7171 interpolated_point%PARTIAL_DERIVATIVE_TYPE=no_part_deriv
7172 CASE(first_part_deriv)
7173 DO component_idx=startcomponentidx,endcomponentidx
7174 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
7175 CASE(field_constant_interpolation)
7177 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
7178 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
7181 DO ni=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
7182 nu=partial_derivative_first_derivative_map(ni)
7183 interpolated_point%VALUES(component_idx,nu)=0.0_dp
7184 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
7187 CASE(field_element_based_interpolation)
7189 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
7190 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
7193 DO ni=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
7194 nu=partial_derivative_first_derivative_map(ni)
7195 interpolated_point%VALUES(component_idx,nu)=0.0_dp
7196 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
7199 CASE(field_node_based_interpolation)
7201 interpolated_point%VALUES(component_idx,1)=basis_interpolate_xi(interpolation_parameters% &
7202 & bases(component_idx)%PTR,no_part_deriv,xi,interpolation_parameters%PARAMETERS(:,component_idx),err,error)
7204 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
7207 DO ni=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_XI
7208 nu=partial_derivative_first_derivative_map(ni)
7209 interpolated_point%VALUES(component_idx,nu)=basis_interpolate_xi(interpolation_parameters% &
7210 & bases(component_idx)%PTR,nu,xi,interpolation_parameters%PARAMETERS(:,component_idx), &
7213 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
7216 CASE(field_grid_point_based_interpolation)
7217 CALL flagerror(
"Not implemented.",err,error,*999)
7218 CASE(field_gauss_point_based_interpolation)
7219 CALL flagerror(
"Not implemented.",err,error,*999)
7220 CASE(field_data_point_based_interpolation)
7221 CALL flagerror(
"Not implemented.",err,error,*999)
7223 local_error=
"The field component interpolation type of "//trim(number_to_vstring(interpolation_parameters% &
7224 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
7225 &
" is invalid for component index "//trim(number_to_vstring(component_idx,
"*",err,error))//
"." 7228 interpolated_point%PARTIAL_DERIVATIVE_TYPE=first_part_deriv
7229 CASE(second_part_deriv)
7230 DO component_idx=startcomponentidx,endcomponentidx
7231 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
7232 CASE(field_constant_interpolation)
7234 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
7235 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
7238 DO nu=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_PARTIAL_DERIVATIVES
7239 interpolated_point%VALUES(component_idx,nu)=0.0_dp
7240 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
7243 CASE(field_element_based_interpolation)
7245 interpolated_point%VALUES(component_idx,1)=interpolation_parameters%PARAMETERS(1,component_idx)
7246 CALL coordinate_interpolation_adjust(coordinate_system,no_part_deriv,interpolated_point%VALUES(component_idx,1), &
7249 DO nu=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_PARTIAL_DERIVATIVES
7250 interpolated_point%VALUES(component_idx,nu)=0.0_dp
7251 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
7254 CASE(field_node_based_interpolation)
7255 DO nu=1,interpolation_parameters%BASES(component_idx)%PTR%NUMBER_OF_PARTIAL_DERIVATIVES
7256 interpolated_point%VALUES(component_idx,nu)=basis_interpolate_xi(interpolation_parameters% &
7257 & bases(component_idx)%PTR,nu,xi,interpolation_parameters%PARAMETERS(:,component_idx), &
7260 CALL coordinate_interpolation_adjust(coordinate_system,nu,interpolated_point%VALUES(component_idx,nu), &
7263 CASE(field_grid_point_based_interpolation)
7264 CALL flagerror(
"Not implemented.",err,error,*999)
7265 CASE(field_gauss_point_based_interpolation)
7266 CALL flagerror(
"Not implemented.",err,error,*999)
7267 CASE(field_data_point_based_interpolation)
7268 CALL flagerror(
"Not implemented.",err,error,*999)
7270 local_error=
"The field component interpolation type of "//trim(number_to_vstring(interpolation_parameters% &
7271 & field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE,
"*",err,error))// &
7272 &
" is invalid for component index "//trim(number_to_vstring(component_idx,
"*",err,error))//
"." 7275 interpolated_point%PARTIAL_DERIVATIVE_TYPE=second_part_deriv
7277 local_error=
"The partial derivative type of "//trim(number_to_vstring(partial_derivative_type,
"*",err,error))// &
7279 CALL flagerror(local_error,err,error,*999)
7282 CALL flagerror(
"The interpolation parameters field is not associated.",err,error,*999)
7292 CALL flagerror(
"Interpolated point interpolation parameters is not associated.",err,error,*999)
7295 CALL flagerror(
"Interpolated point is not associated.",err,error,*999)
7298 exits(
"FIELD_INTERPOLATE_XI")
7300 999 errorsexits(
"FIELD_INTERPOLATE_XI",err,error)
7302 END SUBROUTINE field_interpolate_xi
7309 SUBROUTINE field_positionnormaltangentscalculateintptmetric(INTERPOLATED_POINT_METRICS,reverseNormal, &
7310 & position,normal,tangents,err,error,*)
7313 TYPE(field_interpolated_point_metrics_type),
POINTER,
INTENT(IN) :: interpolated_point_metrics
7314 LOGICAL,
INTENT(IN) :: reversenormal
7315 REAL(DP),
INTENT(OUT) :: position(:)
7316 REAL(DP),
INTENT(OUT) :: normal(:)
7317 REAL(DP),
INTENT(OUT) :: tangents(:,:)
7318 INTEGER(INTG),
INTENT(OUT) :: err
7319 TYPE(varying_string),
INTENT(OUT) :: error
7321 INTEGER(INTG) :: dimension_idx,xi_idx
7322 TYPE(field_interpolated_point_type),
POINTER :: interpolated_point
7323 TYPE(varying_string) :: local_error
7325 enters(
"Field_PositionNormalTangentsCalculateIntPtMetric",err,error,*999)
7327 IF(
ASSOCIATED(interpolated_point_metrics))
THEN 7328 IF(
SIZE(position,1)>=interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS)
THEN 7329 IF(
SIZE(normal,1)>=interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS)
THEN 7330 IF(
SIZE(tangents,1)>=interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS)
THEN 7331 IF(
SIZE(tangents,2)>=interpolated_point_metrics%NUMBER_OF_XI_DIMENSIONS)
THEN 7332 interpolated_point=>interpolated_point_metrics%INTERPOLATED_POINT
7333 IF(
ASSOCIATED(interpolated_point))
THEN 7334 position=interpolated_point%VALUES(1:interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,no_part_deriv)
7335 SELECT CASE(interpolated_point_metrics%NUMBER_OF_XI_DIMENSIONS)
7338 DO dimension_idx=1,interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS
7339 tangents(dimension_idx,1)=interpolated_point_metrics%DX_DXI &
7342 tangents(1:interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,1)= &
7343 & normalise(tangents(1:interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,1),err,error)
7344 normal(1)=tangents(2,1)
7345 normal(2)=tangents(1,1)
7349 DO xi_idx=1,interpolated_point_metrics%NUMBER_OF_XI_DIMENSIONS
7350 DO dimension_idx=1,interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS
7351 tangents(dimension_idx,xi_idx)=interpolated_point_metrics%DX_DXI(dimension_idx,xi_idx)
7353 tangents(1:interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,xi_idx)= &
7354 & normalise(tangents(1:interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,xi_idx),err,error)
7357 CALL cross_product(tangents(1:interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,1), &
7358 & tangents(1:interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,2),normal,err,error,*999)
7359 IF(reversenormal) normal=-normal
7361 local_error=
"The interpolated metrics must be for lines/faces, dimension of " &
7362 & //trim(number_to_vstring(interpolated_point_metrics%NUMBER_OF_XI_DIMENSIONS,
"*",err,error))//
" is invalid." 7363 CALL flagerror(local_error,err,error,*999)
7366 CALL flagerror(
"Interpolated point metrics interpolated point is not associted.",err,error,*999)
7369 local_error=
"The size of the 2nd dimension of tangents of "// &
7370 & trim(number_to_vstring(
SIZE(tangents,2),
"*",err,error))//
" is too small. The size must be >= "// &
7371 & trim(number_to_vstring(interpolated_point_metrics%NUMBER_OF_XI_DIMENSIONS,
"*",err,error))//
"." 7372 CALL flagerror(local_error,err,error,*999)
7375 local_error=
"The size of the 1st dimension of tangents of "// &
7376 & trim(number_to_vstring(
SIZE(tangents,1),
"*",err,error))//
" is too small. The size must be >= "// &
7377 & trim(number_to_vstring(interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,
"*",err,error))//
"." 7378 CALL flagerror(local_error,err,error,*999)
7381 local_error=
"The size of normal of "//trim(number_to_vstring(
SIZE(normal,1),
"*",err,error))// &
7382 &
" is too small. The size must be >= "// &
7383 & trim(number_to_vstring(interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,
"*",err,error))//
"." 7384 CALL flagerror(local_error,err,error,*999)
7387 local_error=
"The size of position of "//trim(number_to_vstring(
SIZE(position,1),
"*",err,error))// &
7388 &
" is too small. The size must be >= "// &
7389 & trim(number_to_vstring(interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,
"*",err,error))//
"." 7390 CALL flagerror(local_error,err,error,*999)
7393 CALL flagerror(
"Interpolated point metrics is not associated.",err,error,*999)
7396 IF(diagnostics1)
THEN 7397 CALL write_string(diagnostic_output_type,
"Interpolated point metrics data:",err,error,*999)
7398 CALL write_string_value(diagnostic_output_type,
" Number of X dimensions = ", &
7399 & interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,err,error,*999)
7400 CALL write_string_value(diagnostic_output_type,
" Number of Xi dimensions = ", &
7401 & interpolated_point_metrics%NUMBER_OF_XI_DIMENSIONS,err,error,*999)
7402 CALL write_string_vector(general_output_type,1,1,interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,3,3, &
7403 & position,
'(" Position :",3(X,E13.6))',
'(15X,3(X,E13.6))',err,error,*999)
7404 CALL write_string_vector(general_output_type,1,1,interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,3,3, &
7405 & normal,
'(" Normal :",3(X,E13.6))',
'(15X,3(X,E13.6))',err,error,*999)
7406 CALL write_string(diagnostic_output_type,
" Tangents:",err,error,*999)
7407 DO xi_idx=1,interpolated_point_metrics%NUMBER_OF_XI_DIMENSIONS
7408 CALL write_string_value(diagnostic_output_type,
" Tangent : ",xi_idx,err,error,*999)
7409 CALL write_string_vector(general_output_type,1,1,interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS,3,3, &
7410 & tangents(:,xi_idx),
'(" Tangent :",3(X,E13.6))',
'(15X,3(X,E13.6))',err,error,*999)
7414 exits(
"Field_PositionNormalTangentsCalculateIntPtMetric")
7416 999 errors(
"Field_PositionNormalTangentsCalculateIntPtMetric",err,error)
7417 exits(
"Field_PositionNormalTangentsCalculateIntPtMetric")
7420 END SUBROUTINE field_positionnormaltangentscalculateintptmetric
7427 SUBROUTINE field_positionnormaltangentscalculatenode(FIELD,VARIABLE_TYPE,COMPONENT_NUMBER,LOCAL_NODE_NUMBER, &
7428 & position,normal,tangents,err,error,*)
7431 TYPE(field_type),
POINTER,
INTENT(IN) :: field
7432 INTEGER(INTG),
INTENT(IN) :: variable_type
7433 INTEGER(INTG),
INTENT(IN) :: component_number
7434 INTEGER(INTG),
INTENT(IN) :: local_node_number
7435 REAL(DP),
INTENT(OUT) :: position(:)
7436 REAL(DP),
INTENT(OUT) :: normal(:)
7437 REAL(DP),
INTENT(OUT) :: tangents(:,:)
7438 INTEGER(INTG),
INTENT(OUT) :: err
7439 TYPE(varying_string),
INTENT(OUT) :: error
7441 INTEGER(INTG) :: dims,index_match
7442 INTEGER(INTG) :: nic,component_idx,derivative_idx,xi_idx,element,element_idx,local_node,local_node_idx
7443 REAL(DP) :: xi(3), vec(3), dxdxi(3,3)
7444 INTEGER(INTG) :: tangent_idx,tangent_xi_idx
7445 TYPE(basis_type),
POINTER :: basis
7446 TYPE(domain_type),
POINTER :: domain
7447 TYPE(domain_elements_type),
POINTER :: domain_elements
7448 TYPE(domain_nodes_type),
POINTER :: domain_nodes
7449 TYPE(domain_topology_type),
POINTER :: topology
7450 TYPE(decomposition_type),
POINTER :: decomposition
7451 TYPE(decomposition_topology_type),
POINTER :: decomp_topology
7452 TYPE(decomposition_elements_type),
POINTER :: decomp_elements
7453 TYPE(field_type),
POINTER :: geometric_field
7454 TYPE(field_variable_type),
POINTER :: field_variable
7455 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolation_parameters(:)
7456 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_points(:)
7457 TYPE(varying_string) :: local_error
7459 enters(
"Field_PositionNormalTangentsCalculateNode",err,error,*999)
7461 NULLIFY(field_variable)
7463 IF(
ASSOCIATED(field))
THEN 7464 IF(field%FIELD_FINISHED)
THEN 7465 geometric_field=>field%GEOMETRIC_FIELD
7466 IF(
ASSOCIATED(geometric_field))
THEN 7467 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 7468 CALL field_variable_get(field,variable_type,field_variable,err,error,*999)
7469 IF(
ASSOCIATED(field_variable))
THEN 7470 dims=geometric_field%VARIABLES(1)%NUMBER_OF_COMPONENTS
7472 IF(component_number>=1.AND.component_number<=dims)
THEN 7473 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
7474 IF(
ASSOCIATED(domain))
THEN 7475 topology=>domain%TOPOLOGY
7476 IF(
ASSOCIATED(topology))
THEN 7477 decomposition=>field%DECOMPOSITION
7478 IF(
ASSOCIATED(decomposition))
THEN 7479 decomp_topology=>decomposition%TOPOLOGY
7480 IF(
ASSOCIATED(decomp_topology))
THEN 7481 decomp_elements=>decomp_topology%ELEMENTS
7482 IF(
ASSOCIATED(decomp_elements))
THEN 7483 IF(
SIZE(position,1)>=dims)
THEN 7484 IF(
SIZE(normal,1)>=dims)
THEN 7485 IF(
SIZE(tangents,1)>=dims)
THEN 7486 IF(
SIZE(dxdxi,1)>=dims)
THEN 7487 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
7488 CASE(field_constant_interpolation)
7489 local_error=
"Cannot compute the normal at a node for component number "// &
7490 & trim(number_to_vstring(component_number,
"*",err,error))//
" for variable type "// &
7491 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7492 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
7493 &
" which has constant interpolation." 7494 CALL flagerror(local_error,err,error,*999)
7495 CASE(field_element_based_interpolation)
7496 local_error=
"Cannot compute the normal at a node for component number "// &
7497 & trim(number_to_vstring(component_number,
"*",err,error))//
" for variable type "// &
7498 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7499 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based& 7501 CALL flagerror(local_error,err,error,*999)
7502 CASE(field_node_based_interpolation)
7503 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
7504 IF(
ASSOCIATED(domain))
THEN 7505 topology=>domain%TOPOLOGY
7506 IF(
ASSOCIATED(topology))
THEN 7507 domain_elements=>topology%ELEMENTS
7508 IF(
ASSOCIATED(domain_elements))
THEN 7509 domain_nodes=>topology%NODES
7510 IF(
ASSOCIATED(domain_nodes))
THEN 7511 IF(local_node_number>0.AND.local_node_number<=domain_nodes%NUMBER_OF_NODES)
THEN 7514 position(1:dims)=0.0_dp
7516 normal(1:dims)=0.0_dp
7517 CALL field_interpolation_parameters_initialise(geometric_field, &
7518 & interpolation_parameters,err,error,*999)
7519 CALL field_interpolated_points_initialise(interpolation_parameters, &
7520 & interpolated_points,err,error,*999)
7521 DO element_idx=1,domain_nodes%NODES(local_node_number)%NUMBER_OF_SURROUNDING_ELEMENTS
7522 element=domain_nodes%NODES(local_node_number)%SURROUNDING_ELEMENTS(element_idx)
7523 basis=>domain_elements%ELEMENTS(element)%BASIS
7526 DO local_node_idx=1,basis%NUMBER_OF_NODES
7527 IF(domain_elements%ELEMENTS(element)%ELEMENT_NODES(local_node_idx)== &
7528 & local_node_number)
THEN 7529 local_node=local_node_idx
7536 CALL basis_local_node_xi_calculate(basis,local_node,xi,err,error,*999)
7538 CALL field_interpolation_parameters_element_get(field_values_set_type,element, &
7539 & interpolation_parameters(field_u_variable_type)%PTR,err,error,*999)
7540 CALL field_interpolate_xi(first_part_deriv,xi(1:basis%NUMBER_OF_XI), &
7541 & interpolated_points(field_u_variable_type)%PTR,err,error,*999)
7543 IF(element_idx==1) position(1:dims)=interpolated_points(field_u_variable_type)% &
7544 & ptr%VALUES(1:dims,no_part_deriv)
7548 DO component_idx=1,dims
7549 DO xi_idx=1,basis%NUMBER_OF_XI
7550 derivative_idx=partial_derivative_first_derivative_map(xi_idx)
7551 dxdxi(component_idx,xi_idx)=interpolated_points(field_u_variable_type)%PTR% &
7552 & values(component_idx,derivative_idx)
7556 IF(domain_nodes%NODES(local_node_number)%BOUNDARY_NODE)
THEN 7557 SELECT CASE(basis%TYPE)
7558 CASE(basis_lagrange_hermite_tp_type)
7559 DO nic=-basis%NUMBER_OF_XI_COORDINATES,basis%NUMBER_OF_XI_COORDINATES
7560 IF(decomp_elements%ELEMENTS(element)%ADJACENT_ELEMENTS(abs(nic))% &
7561 & number_of_adjacent_elements==0)
THEN 7563 index_match=basis%NUMBER_OF_NODES_XIC(abs(nic))
7567 IF(basis%NODE_POSITION_INDEX(local_node,abs(nic))==index_match)
THEN 7569 SELECT CASE(basis%NUMBER_OF_XI)
7573 normal(1:dims)=dxdxi(1:dims,1)
7577 tangent_xi_idx=other_xi_directions2(abs(nic))
7578 vec(1:dims)=dxdxi(1:dims,tangent_xi_idx)
7579 vec(1:dims)=normalise(vec(1:dims),err,error)
7580 tangents(1:dims,1)=tangents(1:dims,1)+ &
7583 vec(1:dims)=dxdxi(1:dims,abs(nic))
7585 normal(1:dims)=normal(1:dims)+ &
7586 & normalise(vec(1:dims),err,error)
7591 tangent_xi_idx=other_xi_directions3(abs(nic),tangent_idx+1,1)
7592 vec(1:dims)=dxdxi(1:dims,tangent_xi_idx)
7593 vec(1:dims)=normalise(vec(1:dims),err,error)
7594 tangents(1:dims,tangent_idx)= &
7595 & tangents(1:dims,tangent_idx)+vec(1:dims)
7598 CALL cross_product(tangents(1:dims,1),tangents(1:dims,2), &
7599 & vec(1:dims),err,error,*999)
7602 IF(abs(nic)==2) vec=-vec
7603 normal(1:dims)=normal(1:dims)+vec(1:dims)
7610 CASE(basis_simplex_type)
7611 CALL flagerror(
"Not implemented.",err,error,*999)
7630 CASE(basis_serendipity_type)
7631 CALL flagerror(
"Not implemented.",err,error,*999)
7632 CASE(basis_auxilliary_type)
7633 CALL flagerror(
"Not implemented.",err,error,*999)
7634 CASE(basis_b_spline_tp_type)
7635 CALL flagerror(
"Not implemented.",err,error,*999)
7636 CASE(basis_fourier_lagrange_hermite_tp_type)
7637 CALL flagerror(
"Not implemented.",err,error,*999)
7638 CASE(basis_extended_lagrange_tp_type)
7639 CALL flagerror(
"Not implemented.",err,error,*999)
7641 local_error=
"The basis type of "//trim(number_to_vstring(basis%TYPE, &
7642 &
"*",err,error))//
" is invalid." 7643 CALL flagerror(local_error,err,error,*999)
7651 CALL field_interpolated_points_finalise(interpolated_points,err,error,*999)
7652 CALL field_interpolation_parameters_finalise(interpolation_parameters,err,error,*999)
7655 normal(1:dims)=normalise(normal(1:dims),err,error)
7657 DO tangent_idx=1,basis%NUMBER_OF_XI-1
7658 tangents(1:dims,tangent_idx)=normalise(tangents(1:dims,tangent_idx),err,error)
7661 local_error=
"The local node number of "// &
7662 & trim(number_to_vstring(local_node_number,
"*",err,error))// &
7663 &
" is invalid for component number "// &
7664 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
7665 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7666 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
7667 &
". The local node number must be > 0 and <="// &
7668 & trim(number_to_vstring(domain_nodes%NUMBER_OF_NODES,
"*",err,error))//
"." 7669 CALL flagerror(local_error,err,error,*999)
7672 local_error=
"The domain topology nodes for component number "// &
7673 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
7674 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7675 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not associated." 7676 CALL flagerror(local_error,err,error,*999)
7679 local_error=
"The domain topology elements for component number "// &
7680 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
7681 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7682 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not associated." 7683 CALL flagerror(local_error,err,error,*999)
7686 local_error=
"The domain topology for component number "// &
7687 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
7688 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7689 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not associated." 7690 CALL flagerror(local_error,err,error,*999)
7693 local_error=
"The domain for component number "// &
7694 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
7695 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7696 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not associated." 7697 CALL flagerror(local_error,err,error,*999)
7699 CASE(field_grid_point_based_interpolation)
7700 local_error=
"Cannot compute the normal at a node for component number "// &
7701 & trim(number_to_vstring(component_number,
"*",err,error))//
" for variable type "// &
7702 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7703 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
7704 &
" which has grid point based interpolation." 7705 CALL flagerror(local_error,err,error,*999)
7706 CASE(field_gauss_point_based_interpolation)
7707 local_error=
"Cannot compute the normal at a node for component number "// &
7708 & trim(number_to_vstring(component_number,
"*",err,error))//
" for variable type "// &
7709 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7710 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
7711 &
" which has Gauss point based interpolation." 7712 CALL flagerror(local_error,err,error,*999)
7713 CASE(field_data_point_based_interpolation)
7714 local_error=
"Cannot compute the normal at a node for component number "// &
7715 & trim(number_to_vstring(component_number,
"*",err,error))//
" for variable type "// &
7716 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
7717 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
7718 &
" which has data point based interpolation." 7719 CALL flagerror(local_error,err,error,*999)
7721 local_error=
"The interpolation type of "//trim(number_to_vstring &
7722 & (field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
7723 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*", &
7724 & err,error))//
" for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
7725 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 7726 CALL flagerror(local_error,err,error,*999)
7729 local_error=
"The first dimension of the supplied dx/dxi array of "// &
7730 & trim(number_to_vstring(
SIZE(dxdxi,1),
"*",err,error))// &
7731 &
" is too small. The first dimension of the supplied array must be >= "// &
7732 & trim(number_to_vstring(dims,
"*",err,error))//
"." 7733 CALL flagerror(local_error,err,error,*999)
7736 local_error=
"The first dimension of the supplied tangent array of "// &
7737 & trim(number_to_vstring(
SIZE(tangents,1),
"*",err,error))// &
7738 &
" is too small. The first dimension of the supplied array must be >= "// &
7739 & trim(number_to_vstring(dims,
"*",err,error))//
"." 7740 CALL flagerror(local_error,err,error,*999)
7743 local_error=
"The size of the supplied normal array of "//trim(number_to_vstring(
SIZE(normal,1), &
7744 &
"*",err,error))//
" is too small. The size of the supplied array must be >= "// &
7745 & trim(number_to_vstring(dims,
"*",err,error))//
"." 7746 CALL flagerror(local_error,err,error,*999)
7749 local_error=
"The size of the supplied position array of "//trim(number_to_vstring(
SIZE(position,1), &
7750 &
"*",err,error))//
" is too small. The size of the supplied array must be >= "// &
7751 & trim(number_to_vstring(dims,
"*",err,error))//
"." 7752 CALL flagerror(local_error,err,error,*999)
7755 CALL flagerror(
"Decomposition elements is not associated.",err,error,*999)
7758 CALL flagerror(
"Decomposition topology is not associated.",err,error,*999)
7761 CALL flagerror(
"Decomposition is not associated.",err,error,*999)
7764 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
7767 CALL flagerror(
"Domain is not associated.",err,error,*999)
7770 local_error=
"The field component number of "//trim(number_to_vstring(component_number,
"*",err,error))// &
7771 &
" for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
7772 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
7773 &
" is invalid. The component number must be > 0 and <= "// &
7774 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
"." 7775 CALL flagerror(local_error,err,error,*999)
7778 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
7779 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 7780 CALL flagerror(local_error,err,error,*999)
7783 local_error=
"The supplied variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
7784 &
" is invalid. The field variable type must be > 1 and <= "// &
7785 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 7786 CALL flagerror(local_error,err,error,*999)
7789 local_error=
"The geometric field is not associated for field number "// &
7790 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 7791 CALL flagerror(local_error,err,error,*999)
7794 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 7795 CALL flagerror(local_error,err,error,*999)
7798 CALL flagerror(
"Field is not associated.",err,error,*999)
7801 IF(diagnostics1)
THEN 7802 CALL write_string(diagnostic_output_type,
"Field normal at a node:",err,error,*999)
7803 CALL write_string_value(diagnostic_output_type,
" Field number = ",field%USER_NUMBER,err,error,*999)
7804 CALL write_string_value(diagnostic_output_type,
" Variable type = ",variable_type,err,error,*999)
7805 CALL write_string_value(diagnostic_output_type,
" Component number = ",component_number,err,error,*999)
7806 CALL write_string_value(diagnostic_output_type,
" Local node number = ",local_node_number,err,error,*999)
7807 CALL write_string_vector(diagnostic_output_type,1,1,dims,3,3,position, &
7808 &
'(" Position :",3(X,E13.6))',
'(21X,3(X,E13.6))',err,error,*999)
7809 CALL write_string_vector(diagnostic_output_type,1,1,dims,3,3,normal, &
7810 &
'(" Normal :",3(X,E13.6))',
'(21X,3(X,E13.6))',err,error,*999)
7813 exits(
"Field_PositionNormalTangentsCalculateNode")
7815 999 errors(
"Field_PositionNormalTangentsCalculateNode",err,error)
7816 exits(
"Field_PositionNormalTangentsCalculateNode")
7819 END SUBROUTINE field_positionnormaltangentscalculatenode
7826 SUBROUTINE field_interpolated_point_finalise(INTERPOLATED_POINT,ERR,ERROR,*)
7829 TYPE(field_interpolated_point_type),
POINTER :: interpolated_point
7830 INTEGER(INTG),
INTENT(OUT) :: err
7831 TYPE(varying_string),
INTENT(OUT) :: error
7834 enters(
"FIELD_INTERPOLATED_POINT_FINALISE",err,error,*999)
7836 IF(
ASSOCIATED(interpolated_point))
THEN 7837 IF(
ALLOCATED(interpolated_point%VALUES))
DEALLOCATE(interpolated_point%VALUES)
7838 DEALLOCATE(interpolated_point)
7841 exits(
"FIELD_INTERPOLATED_POINT_FINALISE")
7843 999 errorsexits(
"FIELD_INTERPOLATED_POINT_FINALISE",err,error)
7845 END SUBROUTINE field_interpolated_point_finalise
7852 SUBROUTINE field_interpolated_point_initialise(INTERPOLATION_PARAMETERS,INTERPOLATED_POINT,ERR,ERROR,*,componentType)
7855 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
7856 TYPE(field_interpolated_point_type),
POINTER :: interpolated_point
7857 INTEGER(INTG),
INTENT(OUT) :: err
7858 TYPE(varying_string),
INTENT(OUT) :: error
7859 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
7861 INTEGER(INTG) :: dummy_err,number_of_dimensions,numberofcomponents
7862 TYPE(varying_string) :: dummy_error,localerror
7864 enters(
"FIELD_INTERPOLATED_POINT_INITIALISE",err,error,*999)
7866 IF(
ASSOCIATED(interpolation_parameters))
THEN 7867 IF(
ASSOCIATED(interpolation_parameters%FIELD))
THEN 7868 IF(
ASSOCIATED(interpolated_point))
THEN 7869 CALL flagerror(
"Interpolated point is already associated.",err,error,*998)
7871 ALLOCATE(interpolated_point,stat=err)
7872 IF(err/=0)
CALL flagerror(
"Could not allocate interpolated point",err,error,*999)
7873 interpolated_point%INTERPOLATION_PARAMETERS=>interpolation_parameters
7874 number_of_dimensions=interpolation_parameters%FIELD%DECOMPOSITION%MESH%NUMBER_OF_DIMENSIONS
7875 interpolated_point%MAX_PARTIAL_DERIVATIVE_INDEX=partial_derivative_maximum_map(number_of_dimensions)
7877 IF(
PRESENT(componenttype))
THEN 7878 SELECT CASE(componenttype)
7879 CASE(field_all_components_type)
7880 numberofcomponents=interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
7881 CASE(field_geometric_components_type)
7882 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 7883 numberofcomponents=interpolation_parameters%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR% &
7884 & number_of_components
7885 ELSEIF(interpolation_parameters%FIELD%TYPE==field_geometric_type)
THEN 7886 numberofcomponents=interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
7888 localerror=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
7889 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 7890 CALL flagerror(localerror,err,error,*999)
7892 CASE(field_nongeometric_components_type)
7893 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 7894 numberofcomponents=interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS-interpolation_parameters% &
7895 & field%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR%NUMBER_OF_COMPONENTS
7897 localerror=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
7898 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 7899 CALL flagerror(localerror,err,error,*999)
7902 localerror=
"Interpolation component type "//trim(number_to_vstring(componenttype,
"*",err,error))//
" is not valid." 7903 CALL flagerror(localerror,err,error,*999)
7906 numberofcomponents=interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
7908 ALLOCATE(interpolated_point%VALUES(numberofcomponents,interpolated_point%MAX_PARTIAL_DERIVATIVE_INDEX),stat=err)
7909 IF(err/=0)
CALL flagerror(
"Could not allocate interpolated point values.",err,error,*999)
7910 interpolated_point%VALUES=0.0_dp
7913 CALL flagerror(
"Interpolation parameters field is not associated.",err,error,*998)
7916 CALL flagerror(
"Interpolation parameters is not associated.",err,error,*998)
7919 exits(
"FIELD_INTERPOLATED_POINT_INITIALISE")
7921 999
CALL field_interpolated_point_finalise(interpolated_point,dummy_err,dummy_error,*998)
7922 998 errorsexits(
"FIELD_INTERPOLATED_POINT_INITIALISE",err,error)
7924 END SUBROUTINE field_interpolated_point_initialise
7931 SUBROUTINE field_interpolated_points_finalise(INTERPOLATED_POINTS,ERR,ERROR,*)
7934 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_points(:)
7935 INTEGER(INTG),
INTENT(OUT) :: err
7936 TYPE(varying_string),
INTENT(OUT) :: error
7938 INTEGER(INTG) :: var_type_idx
7940 enters(
"FIELD_INTERPOLATED_POINTS_FINALISE",err,error,*999)
7942 IF(
ASSOCIATED(interpolated_points))
THEN 7943 DO var_type_idx=1,
SIZE(interpolated_points,1)
7944 CALL field_interpolated_point_finalise(interpolated_points(var_type_idx)%PTR,err,error,*999)
7946 DEALLOCATE(interpolated_points)
7949 exits(
"FIELD_INTERPOLATED_POINTS_FINALISE")
7951 999 errorsexits(
"FIELD_INTERPOLATED_POINTS_FINALISE",err,error)
7953 END SUBROUTINE field_interpolated_points_finalise
7960 SUBROUTINE field_interpolated_points_initialise(INTERPOLATION_PARAMETERS,INTERPOLATED_POINTS,ERR,ERROR,*,componentType)
7963 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolation_parameters(:)
7964 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_points(:)
7965 INTEGER(INTG),
INTENT(OUT) :: err
7966 TYPE(varying_string),
INTENT(OUT) :: error
7967 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
7969 INTEGER(INTG) :: dummy_err,var_type_idx
7970 TYPE(varying_string) :: dummy_error
7972 enters(
"FIELD_INTERPOLATED_POINTS_INITIALISE",err,error,*998)
7974 IF(
ASSOCIATED(interpolation_parameters))
THEN 7975 IF(
ASSOCIATED(interpolated_points))
THEN 7976 CALL flagerror(
"Interpolated point is already associated.",err,error,*998)
7978 ALLOCATE(interpolated_points(field_number_of_variable_types),stat=err)
7979 IF(err/=0)
CALL flagerror(
"Could not allocate interpolated points",err,error,*999)
7980 DO var_type_idx=1,field_number_of_variable_types
7981 NULLIFY(interpolated_points(var_type_idx)%PTR)
7982 IF(
ASSOCIATED(interpolation_parameters(var_type_idx)%PTR))
THEN 7983 IF(
PRESENT(componenttype))
THEN 7984 CALL field_interpolated_point_initialise(interpolation_parameters(var_type_idx)%PTR, &
7985 & interpolated_points(var_type_idx)%PTR,err,error,*999,componenttype)
7987 CALL field_interpolated_point_initialise(interpolation_parameters(var_type_idx)%PTR, &
7988 & interpolated_points(var_type_idx)%PTR,err,error,*999)
7994 CALL flagerror(
"Interpolation parameters is not associated.",err,error,*998)
7997 exits(
"FIELD_INTERPOLATED_POINTS_INITIALISE")
7999 999
CALL field_interpolated_points_finalise(interpolated_points,dummy_err,dummy_error,*998)
8000 998 errorsexits(
"FIELD_INTERPOLATED_POINTS_INITIALISE",err,error)
8002 END SUBROUTINE field_interpolated_points_initialise
8009 SUBROUTINE field_interpolated_point_metrics_calculate(JACOBIAN_TYPE,INTERPOLATED_POINT_METRICS,ERR,ERROR,*)
8012 TYPE(field_interpolated_point_metrics_type),
POINTER :: interpolated_point_metrics
8013 INTEGER(INTG),
INTENT(IN) :: jacobian_type
8014 INTEGER(INTG),
INTENT(OUT) :: err
8015 TYPE(varying_string),
INTENT(OUT) :: error
8017 TYPE(coordinate_system_type),
POINTER :: coordinate_system
8018 TYPE(field_type),
POINTER :: field
8019 TYPE(field_interpolated_point_type),
POINTER :: interpolated_point
8020 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
8022 enters(
"FIELD_INTERPOLATED_POINT_METRICS_CALCULATE",err,error,*999)
8024 IF(
ASSOCIATED(interpolated_point_metrics))
THEN 8025 interpolated_point=>interpolated_point_metrics%INTERPOLATED_POINT
8026 interpolation_parameters=>interpolated_point%INTERPOLATION_PARAMETERS
8027 interpolated_point_metrics%NUMBER_OF_XI_DIMENSIONS=interpolation_parameters%NUMBER_OF_XI
8028 field=>interpolation_parameters%FIELD
8029 IF(field%TYPE==field_geometric_type.OR.field%TYPE==field_fibre_type.OR.field%TYPE==field_general_type &
8030 & .OR.field%TYPE==field_geometric_general_type)
THEN 8031 NULLIFY(coordinate_system)
8032 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
8033 CALL coordinate_metrics_calculate(coordinate_system,jacobian_type,interpolated_point_metrics,err,error,*999)
8035 CALL flagerror(
"The field is not a geometric or fibre field.",err,error,*999)
8038 CALL flagerror(
"Interpolated point metrics is not associated.",err,error,*999)
8041 exits(
"FIELD_INTERPOLATED_POINT_METRICS_CALCULATE")
8043 999 errorsexits(
"FIELD_INTERPOLATED_POINT_METRICS_CALCULATE",err,error)
8045 END SUBROUTINE field_interpolated_point_metrics_calculate
8052 SUBROUTINE field_interpolated_point_metrics_finalise(INTERPOLATED_POINT_METRICS,ERR,ERROR,*)
8055 TYPE(field_interpolated_point_metrics_type),
POINTER :: interpolated_point_metrics
8056 INTEGER(INTG),
INTENT(OUT) :: err
8057 TYPE(varying_string),
INTENT(OUT) :: error
8060 enters(
"FIELD_INTERPOLATED_POINT_METRICS_FINALISE",err,error,*999)
8062 IF(
ASSOCIATED(interpolated_point_metrics))
THEN 8063 IF(
ALLOCATED(interpolated_point_metrics%GL))
DEALLOCATE(interpolated_point_metrics%GL)
8064 IF(
ALLOCATED(interpolated_point_metrics%GU))
DEALLOCATE(interpolated_point_metrics%GU)
8065 IF(
ALLOCATED(interpolated_point_metrics%DX_DXI))
DEALLOCATE(interpolated_point_metrics%DX_DXI)
8066 IF(
ALLOCATED(interpolated_point_metrics%DXI_DX))
DEALLOCATE(interpolated_point_metrics%DXI_DX)
8067 DEALLOCATE(interpolated_point_metrics)
8070 exits(
"FIELD_INTERPOLATED_POINT_METRICS_FINALISE")
8072 999 errorsexits(
"FIELD_INTERPOLATED_POINT_METRICS_FINALISE",err,error)
8074 END SUBROUTINE field_interpolated_point_metrics_finalise
8081 SUBROUTINE field_interpolated_point_metrics_initialise(INTERPOLATED_POINT,INTERPOLATED_POINT_METRICS,ERR,ERROR,*)
8084 TYPE(field_interpolated_point_type),
POINTER :: interpolated_point
8085 TYPE(field_interpolated_point_metrics_type),
POINTER :: interpolated_point_metrics
8086 INTEGER(INTG),
INTENT(OUT) :: err
8087 TYPE(varying_string),
INTENT(OUT) :: error
8089 INTEGER(INTG) :: number_of_xi_dimensions,number_of_x_dimensions
8090 INTEGER(INTG) :: dummy_err
8091 TYPE(coordinate_system_type),
POINTER :: coordinate_system
8092 TYPE(varying_string) :: dummy_error
8094 enters(
"FIELD_INTERPOLATED_POINT_METRICS_INITIALISE",err,error,*999)
8096 IF(
ASSOCIATED(interpolated_point))
THEN 8097 IF(
ASSOCIATED(interpolated_point_metrics))
THEN 8098 CALL flagerror(
"Interpolated point metrics is already associated.",err,error,*998)
8100 NULLIFY(coordinate_system)
8101 CALL field_coordinate_system_get(interpolated_point%INTERPOLATION_PARAMETERS%FIELD,coordinate_system,err,error,*999)
8102 number_of_x_dimensions=coordinate_system%NUMBER_OF_DIMENSIONS
8103 number_of_xi_dimensions=interpolated_point%INTERPOLATION_PARAMETERS%FIELD%DECOMPOSITION%MESH%NUMBER_OF_DIMENSIONS
8107 IF(number_of_x_dimensions<=
SIZE(interpolated_point%VALUES,1))
THEN 8108 ALLOCATE(interpolated_point_metrics,stat=err)
8109 IF(err/=0)
CALL flagerror(
"Could not allocate interpolated point metrics.",err,error,*999)
8110 ALLOCATE(interpolated_point_metrics%GL(number_of_xi_dimensions,number_of_xi_dimensions),stat=err)
8111 IF(err/=0)
CALL flagerror(
"Could not allocate interpolated point metrics convariant tensor.",err,error,*999)
8112 ALLOCATE(interpolated_point_metrics%GU(number_of_xi_dimensions,number_of_xi_dimensions),stat=err)
8113 IF(err/=0)
CALL flagerror(
"Could not allocate interpolated point metrics contravariant tensor.",err,error,*999)
8114 ALLOCATE(interpolated_point_metrics%DX_DXI(number_of_x_dimensions,number_of_xi_dimensions),stat=err)
8115 IF(err/=0)
CALL flagerror(
"Could not allocate interpolated point metrics dX_dXi.",err,error,*999)
8116 ALLOCATE(interpolated_point_metrics%DXI_DX(number_of_xi_dimensions,number_of_x_dimensions),stat=err)
8117 IF(err/=0)
CALL flagerror(
"Could not allocate interpolated point metrics dXi_dX.",err,error,*999)
8118 interpolated_point_metrics%INTERPOLATED_POINT=>interpolated_point
8119 interpolated_point_metrics%NUMBER_OF_X_DIMENSIONS=number_of_x_dimensions
8120 interpolated_point_metrics%NUMBER_OF_XI_DIMENSIONS=number_of_xi_dimensions
8121 interpolated_point_metrics%GL=0.0_dp
8122 interpolated_point_metrics%GU=0.0_dp
8123 interpolated_point_metrics%DX_DXI=0.0_dp
8124 interpolated_point_metrics%DXI_DX=0.0_dp
8125 interpolated_point_metrics%JACOBIAN=0.0_dp
8126 interpolated_point_metrics%JACOBIAN_TYPE=0
8137 CALL flagerror(
"Interpolation point is not associated.",err,error,*998)
8140 exits(
"FIELD_INTERPOLATED_POINT_METRICS_INITIALISE")
8142 999
CALL field_interpolated_point_metrics_finalise(interpolated_point_metrics,dummy_err,dummy_error,*998)
8143 998 errorsexits(
"FIELD_INTERPOLATED_POINT_METRICS_INITIALISE",err,error)
8145 END SUBROUTINE field_interpolated_point_metrics_initialise
8152 SUBROUTINE field_interpolatedpointsmetricsfinalise(INTERPOLATED_POINTS_METRICS,ERR,ERROR,*)
8155 TYPE(field_interpolated_point_metrics_ptr_type),
POINTER :: interpolated_points_metrics(:)
8156 INTEGER(INTG),
INTENT(OUT) :: err
8157 TYPE(varying_string),
INTENT(OUT) :: error
8159 INTEGER(INTG) :: var_type_idx
8161 enters(
"Field_InterpolatedPointsMetricsFinalise",err,error,*999)
8163 IF(
ASSOCIATED(interpolated_points_metrics))
THEN 8164 DO var_type_idx=1,
SIZE(interpolated_points_metrics,1)
8165 CALL field_interpolated_point_metrics_finalise(interpolated_points_metrics(var_type_idx)%PTR,err,error,*999)
8167 DEALLOCATE(interpolated_points_metrics)
8170 exits(
"Field_InterpolatedPointsMetricsFinalise")
8172 999 errorsexits(
"Field_InterpolatedPointsMetricsFinalise",err,error)
8174 END SUBROUTINE field_interpolatedpointsmetricsfinalise
8181 SUBROUTINE field_interpolatedpointsmetricsinitialise(INTERPOLATED_POINTS,INTERPOLATED_POINTS_METRICS,ERR,ERROR,*)
8184 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_points(:)
8185 TYPE(field_interpolated_point_metrics_ptr_type),
POINTER :: interpolated_points_metrics(:)
8186 INTEGER(INTG),
INTENT(OUT) :: err
8187 TYPE(varying_string),
INTENT(OUT) :: error
8189 INTEGER(INTG) :: variabletypeidx,dummy_err
8190 TYPE(varying_string) :: dummy_error
8192 enters(
"Field_InterpolatedPointsMetricsInitialise",err,error,*999)
8194 IF(
ASSOCIATED(interpolated_points))
THEN 8195 IF(
ASSOCIATED(interpolated_points_metrics))
THEN 8196 CALL flagerror(
"Interpolated point metrics is already associated.",err,error,*998)
8198 ALLOCATE(interpolated_points_metrics(field_number_of_variable_types),stat=err)
8199 IF(err/=0)
CALL flagerror(
"Could not allocate interpolated points metrics.",err,error,*999)
8201 DO variabletypeidx=1,field_number_of_variable_types
8202 NULLIFY(interpolated_points_metrics(variabletypeidx)%PTR)
8204 DO variabletypeidx=1,field_number_of_variable_types
8205 IF(
ASSOCIATED(interpolated_points(variabletypeidx)%PTR)) &
8206 &
CALL field_interpolated_point_metrics_initialise(interpolated_points(variabletypeidx)%PTR, &
8207 & interpolated_points_metrics(variabletypeidx)%PTR,err,error,*999)
8211 CALL flagerror(
"Interpolation points is not associated.",err,error,*998)
8214 exits(
"Field_InterpolatedPointsMetricsInitialise")
8216 999
CALL field_interpolatedpointsmetricsfinalise(interpolated_points_metrics,dummy_err,dummy_error,*998)
8217 998 errorsexits(
"Field_InterpolatedPointsMetricsInitialise",err,error)
8219 END SUBROUTINE field_interpolatedpointsmetricsinitialise
8226 SUBROUTINE field_interpolation_parameter_finalise(INTERPOLATION_PARAMETERS,ERR,ERROR,*)
8229 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
8230 INTEGER(INTG),
INTENT(OUT) :: err
8231 TYPE(varying_string),
INTENT(OUT) :: error
8234 enters(
"FIELD_INTERPOLATION_PARAMETER_FINALISE",err,error,*999)
8236 IF(
ASSOCIATED(interpolation_parameters))
THEN 8237 IF(
ALLOCATED(interpolation_parameters%BASES))
DEALLOCATE(interpolation_parameters%BASES)
8238 IF(
ALLOCATED(interpolation_parameters%NUMBER_OF_PARAMETERS))
DEALLOCATE(interpolation_parameters%NUMBER_OF_PARAMETERS)
8239 IF(
ALLOCATED(interpolation_parameters%PARAMETERS))
DEALLOCATE(interpolation_parameters%PARAMETERS)
8240 IF(
ALLOCATED(interpolation_parameters%SCALE_FACTORS))
DEALLOCATE(interpolation_parameters%SCALE_FACTORS)
8241 DEALLOCATE(interpolation_parameters)
8244 exits(
"FIELD_INTERPOLATION_PARAMETER_FINALISE")
8246 999 errorsexits(
"FIELD_INTERPOLATION_PARAMETER_FINALISE",err,error)
8248 END SUBROUTINE field_interpolation_parameter_finalise
8255 SUBROUTINE field_interpolation_parameter_initialise(FIELD_VARIABLE,INTERPOLATION_PARAMETERS,ERR,ERROR,*,componentType)
8258 TYPE(field_variable_type),
POINTER :: field_variable
8259 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
8260 INTEGER(INTG),
INTENT(OUT) :: err
8261 TYPE(varying_string),
INTENT(OUT) :: error
8262 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
8264 INTEGER(INTG) :: component_idx,dummy_err,numberofcomponents
8266 TYPE(field_type),
POINTER :: field
8267 TYPE(varying_string) :: dummy_error,localerror
8269 enters(
"FIELD_INTERPOLATION_PARAMETER_INITIALISE",err,error,*998)
8271 IF(
ASSOCIATED(field_variable))
THEN 8272 field=>field_variable%FIELD
8273 IF(
ASSOCIATED(field))
THEN 8274 IF(
ASSOCIATED(interpolation_parameters))
THEN 8275 CALL flagerror(
"Interpolation parameters is already associated.",err,error,*998)
8277 ALLOCATE(interpolation_parameters,stat=err)
8278 IF(err/=0)
CALL flagerror(
"Could not allocate an interpolation parameter.",err,error,*999)
8279 interpolation_parameters%FIELD=>field
8280 interpolation_parameters%FIELD_VARIABLE=>field_variable
8281 interpolation_parameters%NUMBER_OF_XI=0
8283 IF(
PRESENT(componenttype))
THEN 8284 SELECT CASE(componenttype)
8285 CASE(field_all_components_type)
8286 numberofcomponents=interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
8287 CASE(field_geometric_components_type)
8288 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 8289 numberofcomponents=interpolation_parameters%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR% &
8290 & number_of_components
8291 ELSEIF(interpolation_parameters%FIELD%TYPE==field_geometric_type)
THEN 8292 numberofcomponents=interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
8294 localerror=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
8295 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 8296 CALL flagerror(localerror,err,error,*999)
8298 CASE(field_nongeometric_components_type)
8299 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 8300 numberofcomponents=interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS-interpolation_parameters% &
8301 & field%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR%NUMBER_OF_COMPONENTS
8303 localerror=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
8304 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 8305 CALL flagerror(localerror,err,error,*999)
8308 localerror=
"Interpolation component type "//trim(number_to_vstring(componenttype,
"*",err,error))//
" is not valid." 8309 CALL flagerror(localerror,err,error,*999)
8312 numberofcomponents=interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
8314 ALLOCATE(interpolation_parameters%BASES(numberofcomponents),stat=err)
8315 IF(err/=0)
CALL flagerror(
"Could not allocate bases.",err,error,*999)
8316 ALLOCATE(interpolation_parameters%NUMBER_OF_PARAMETERS(numberofcomponents),stat=err)
8317 IF(err/=0)
CALL flagerror(
"Could not allocate interpolation type.",err,error,*999)
8318 ALLOCATE(interpolation_parameters%PARAMETERS(field_variable%maxNumberElementInterpolationParameters, &
8319 & numberofcomponents),stat=err)
8320 IF(err/=0)
CALL flagerror(
"Could not allocate parameters.",err,error,*999)
8321 interpolation_parameters%PARAMETERS=0.0_dp
8322 IF(field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 8323 ALLOCATE(interpolation_parameters%SCALE_FACTORS(field_variable%maxNumberElementInterpolationParameters, &
8324 & numberofcomponents),stat=err)
8325 IF(err/=0)
CALL flagerror(
"Could not allocate scale factors.",err,error,*999)
8326 interpolation_parameters%SCALE_FACTORS=0.0_dp
8328 DO component_idx=1,numberofcomponents
8329 NULLIFY(interpolation_parameters%BASES(component_idx)%PTR)
8331 interpolation_parameters%NUMBER_OF_PARAMETERS=0
8334 CALL flagerror(
"Field variable field is not associated.",err,error,*998)
8337 CALL flagerror(
"Field is not associated.",err,error,*998)
8340 exits(
"FIELD_INTERPOLATION_PARAMETER_INITIALISE")
8342 999
CALL field_interpolation_parameter_finalise(interpolation_parameters,dummy_err,dummy_error,*998)
8343 998 errorsexits(
"FIELD_INTERPOLATION_PARAMETER_INITIALISE",err,error)
8345 END SUBROUTINE field_interpolation_parameter_initialise
8352 SUBROUTINE field_interpolation_parameters_element_get(PARAMETER_SET_TYPE,ELEMENT_NUMBER,INTERPOLATION_PARAMETERS,ERR,ERROR,*, &
8356 INTEGER(INTG),
INTENT(IN) :: parameter_set_type
8357 INTEGER(INTG),
INTENT(IN) :: element_number
8358 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
8359 INTEGER(INTG),
INTENT(OUT) :: err
8360 TYPE(varying_string),
INTENT(OUT) :: error
8361 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
8363 INTEGER(INTG) :: component_idx,local_derivative_idx,version_idx,global_derivative_idx,element_node_idx,node_idx, &
8364 & element_parameter_idx,dof_idx,node_scaling_dof_idx,scaling_idx,startComponentIdx,endComponentIdx
8365 REAL(DP),
POINTER :: field_parameter_set_data(:),scale_factors(:)
8366 TYPE(basis_type),
POINTER :: basis
8367 TYPE(coordinate_system_type),
POINTER :: coordinate_system
8368 TYPE(domain_elements_type),
POINTER :: elements_topology
8369 TYPE(domain_nodes_type),
POINTER :: nodes_topology
8370 TYPE(field_type),
POINTER :: field
8371 TYPE(field_parameter_set_type),
POINTER :: parameter_set
8372 TYPE(varying_string) :: local_error
8374 enters(
"FIELD_INTERPOLATION_PARAMETERS_ELEMENT_GET",err,error,*999)
8376 IF(
ASSOCIATED(interpolation_parameters))
THEN 8377 IF(parameter_set_type>0.AND.parameter_set_type<=field_number_of_set_types)
THEN 8378 parameter_set=>interpolation_parameters%FIELD_VARIABLE%PARAMETER_SETS%SET_TYPE(parameter_set_type)%PTR
8379 IF(
ASSOCIATED(parameter_set))
THEN 8380 NULLIFY(field_parameter_set_data)
8381 CALL distributed_vector_data_get(parameter_set%PARAMETERS,field_parameter_set_data,err,error,*999)
8382 field=>interpolation_parameters%FIELD
8383 IF(
ASSOCIATED(field))
THEN 8384 NULLIFY(coordinate_system)
8385 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
8386 IF(
PRESENT(componenttype))
THEN 8387 SELECT CASE(componenttype)
8388 CASE(field_all_components_type)
8390 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8391 CASE(field_geometric_components_type)
8392 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 8394 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(FIELD_U_VARIABLE_TYPE)%PTR% &
8395 & number_of_components
8396 ELSEIF(interpolation_parameters%FIELD%TYPE==field_geometric_type)
THEN 8398 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8400 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
8401 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 8402 CALL flagerror(local_error,err,error,*999)
8404 CASE(field_nongeometric_components_type)
8405 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 8406 startcomponentidx=interpolation_parameters%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)% &
8407 & ptr%NUMBER_OF_COMPONENTS+1
8408 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8410 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
8411 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 8412 CALL flagerror(local_error,err,error,*999)
8415 local_error=
"Interpolation component type "//trim(number_to_vstring(componenttype,
"*",err,error))//
" is not valid." 8416 CALL flagerror(local_error,err,error,*999)
8420 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8422 DO component_idx=startcomponentidx,endcomponentidx
8423 elements_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%ELEMENTS
8424 IF(element_number>0.AND.element_number<=elements_topology%TOTAL_NUMBER_OF_ELEMENTS)
THEN 8425 basis=>elements_topology%ELEMENTS(element_number)%BASIS
8426 interpolation_parameters%BASES(component_idx)%PTR=>basis
8427 IF(component_idx==1)
THEN 8428 interpolation_parameters%NUMBER_OF_XI=basis%NUMBER_OF_XI
8430 IF(basis%NUMBER_OF_XI/=interpolation_parameters%NUMBER_OF_XI) &
8431 &
CALL flagerror(
"Inconsistent number of xi directions???",err,error,*999)
8433 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
8434 CASE(field_constant_interpolation)
8435 dof_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
8436 & constant_param2dof_map
8437 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
8438 interpolation_parameters%PARAMETERS(1,component_idx)=field_parameter_set_data(dof_idx)
8439 CASE(field_element_based_interpolation)
8440 dof_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
8441 & element_param2dof_map%ELEMENTS(element_number)
8442 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
8443 interpolation_parameters%PARAMETERS(1,component_idx)=field_parameter_set_data(dof_idx)
8444 CASE(field_node_based_interpolation)
8445 elements_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%ELEMENTS
8446 nodes_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%NODES
8447 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=basis%NUMBER_OF_ELEMENT_PARAMETERS
8448 SELECT CASE(interpolation_parameters%FIELD%SCALINGS%SCALING_TYPE)
8449 CASE(field_no_scaling)
8450 DO element_node_idx=1,basis%NUMBER_OF_NODES
8451 node_idx=elements_topology%ELEMENTS(element_number)%ELEMENT_NODES(element_node_idx)
8452 DO local_derivative_idx=1,basis%NUMBER_OF_DERIVATIVES(element_node_idx)
8453 global_derivative_idx=elements_topology%ELEMENTS(element_number)%ELEMENT_DERIVATIVES( &
8454 & local_derivative_idx,element_node_idx)
8455 version_idx=elements_topology%ELEMENTS(element_number)%elementVersions(local_derivative_idx, &
8457 element_parameter_idx=basis%ELEMENT_PARAMETER_INDEX(local_derivative_idx,element_node_idx)
8458 dof_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
8459 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(global_derivative_idx)%VERSIONS(version_idx)
8460 interpolation_parameters%PARAMETERS(element_parameter_idx,component_idx)=field_parameter_set_data(dof_idx)
8463 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
8464 scaling_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%SCALING_INDEX
8465 NULLIFY(scale_factors)
8466 CALL distributed_vector_data_get(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
8467 & scale_factors,scale_factors,err,error,*999)
8468 DO element_node_idx=1,basis%NUMBER_OF_NODES
8469 node_idx=elements_topology%ELEMENTS(element_number)%ELEMENT_NODES(element_node_idx)
8470 DO local_derivative_idx=1,basis%NUMBER_OF_DERIVATIVES(element_node_idx)
8471 global_derivative_idx=elements_topology%ELEMENTS(element_number)%ELEMENT_DERIVATIVES( &
8472 & local_derivative_idx,element_node_idx)
8473 version_idx=elements_topology%ELEMENTS(element_number)%elementVersions( &
8474 & local_derivative_idx,element_node_idx)
8475 element_parameter_idx=basis%ELEMENT_PARAMETER_INDEX(global_derivative_idx,element_node_idx)
8476 dof_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
8477 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(global_derivative_idx)%VERSIONS(version_idx)
8478 node_scaling_dof_idx= &
8479 & nodes_topology%NODES(node_idx)%DERIVATIVES(global_derivative_idx)%DOF_INDEX(version_idx)
8484 interpolation_parameters%PARAMETERS(element_parameter_idx,component_idx)=field_parameter_set_data( &
8485 & dof_idx)*scale_factors(node_scaling_dof_idx)
8486 interpolation_parameters%SCALE_FACTORS(element_parameter_idx,component_idx)=scale_factors( &
8487 & node_scaling_dof_idx)
8490 CALL distributed_vector_data_restore(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
8491 & scale_factors,scale_factors,err,error,*999)
8492 CASE(field_arc_length_scaling)
8493 CALL flagerror(
"Not implemented.",err,error,*999)
8495 local_error=
"The scaling type of "//trim(number_to_vstring(interpolation_parameters%FIELD%SCALINGS% &
8496 & scaling_type,
"*",err,error))//
" is invalid for field number "// &
8497 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8498 CALL flagerror(local_error,err,error,*999)
8500 CASE(field_gauss_point_based_interpolation)
8501 CALL flagerror(
"Not implemented.",err,error,*999)
8502 CASE(field_data_point_based_interpolation)
8503 CALL flagerror(
"Not implemented.",err,error,*999)
8505 local_error=
"The interpolation type of "//trim(number_to_vstring(interpolation_parameters%FIELD_VARIABLE% &
8506 & components(component_idx)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
8507 & trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
8508 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8509 CALL flagerror(local_error,err,error,*999)
8512 local_error=
"The element number of "//trim(number_to_vstring(element_number,
"*",err,error))// &
8513 &
" is invalid. The number must be between 1 and "// &
8514 & trim(number_to_vstring(elements_topology%TOTAL_NUMBER_OF_ELEMENTS,
"*",err,error))// &
8515 &
" for component number "//trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
8516 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8517 CALL flagerror(local_error,err,error,*999)
8520 CALL coordinate_interpolation_parameters_adjust(coordinate_system,interpolation_parameters,err,error,*999)
8522 CALL flagerror(
"The interpolation parameters field is not associated.",err,error,*999)
8524 CALL distributed_vector_data_restore(parameter_set%PARAMETERS,field_parameter_set_data,err,error,*999)
8526 local_error=
"The field parameter set type of "//trim(number_to_vstring(parameter_set_type,
"*",err,error))// &
8527 &
" has not been created for field number "// &
8528 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8529 CALL flagerror(local_error,err,error,*999)
8532 local_error=
"The field parameter set type of "//trim(number_to_vstring(parameter_set_type,
"*",err,error))// &
8533 &
" is invalid. The number must be between 1 and "//trim(number_to_vstring(field_number_of_set_types,
"*",err,error))// &
8534 &
" for field number "//trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8535 CALL flagerror(local_error,err,error,*999)
8538 CALL flagerror(
"Interpolation parameters is not associated.",err,error,*999)
8541 IF(diagnostics1)
THEN 8542 CALL write_string(diagnostic_output_type,
"Interpolation parameters:",err,error,*999)
8543 CALL write_string_value(diagnostic_output_type,
" Field number = ",interpolation_parameters%FIELD%USER_NUMBER,err,error,*999)
8544 CALL write_string_value(diagnostic_output_type,
" Field variable number = ",interpolation_parameters%FIELD_VARIABLE% &
8545 & variable_number,err,error,*999)
8546 CALL write_string_value(diagnostic_output_type,
" Parameter set type = ",parameter_set_type,err,error,*999)
8547 CALL write_string_value(diagnostic_output_type,
" Element number = ",element_number,err,error,*999)
8548 CALL write_string_value(diagnostic_output_type,
" Number of components = ",interpolation_parameters%FIELD_VARIABLE% &
8549 & number_of_components,err,error,*999)
8550 DO component_idx=startcomponentidx,endcomponentidx
8551 CALL write_string_value(diagnostic_output_type,
" Component = ",component_idx,err,error,*999)
8552 CALL write_string_value(diagnostic_output_type,
" Number of parameters = ",interpolation_parameters% &
8553 & number_of_parameters(component_idx),err,error,*999)
8554 CALL write_string_vector(diagnostic_output_type,1,1,interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx),4,4, &
8555 & interpolation_parameters%PARAMETERS(:,component_idx),
'(" Parameters :",4(X,E13.6))',
'(18X,4(X,E13.6))', &
8560 exits(
"FIELD_INTERPOLATION_PARAMETERS_ELEMENT_GET")
8562 999 errorsexits(
"FIELD_INTERPOLATION_PARAMETERS_ELEMENT_GET",err,error)
8564 END SUBROUTINE field_interpolation_parameters_element_get
8571 SUBROUTINE field_interpolation_parameters_finalise(INTERPOLATION_PARAMETERS,ERR,ERROR,*)
8574 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolation_parameters(:)
8575 INTEGER(INTG),
INTENT(OUT) :: err
8576 TYPE(varying_string),
INTENT(OUT) :: error
8578 INTEGER(INTG) :: var_type_idx
8580 enters(
"FIELD_INTERPOLATION_PARAMETERS_FINALISE",err,error,*999)
8582 IF(
ASSOCIATED(interpolation_parameters))
THEN 8583 DO var_type_idx=1,
SIZE(interpolation_parameters,1)
8584 CALL field_interpolation_parameter_finalise(interpolation_parameters(var_type_idx)%PTR,err,error,*999)
8586 DEALLOCATE(interpolation_parameters)
8589 exits(
"FIELD_INTERPOLATION_PARAMETERS_FINALISE")
8591 999 errorsexits(
"FIELD_INTERPOLATION_PARAMETERS_FINALISE",err,error)
8593 END SUBROUTINE field_interpolation_parameters_finalise
8600 SUBROUTINE field_interpolation_parameters_initialise(FIELD,INTERPOLATION_PARAMETERS,ERR,ERROR,*,componentType)
8603 TYPE(field_type),
POINTER :: field
8604 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolation_parameters(:)
8605 INTEGER(INTG),
INTENT(OUT) :: err
8606 TYPE(varying_string),
INTENT(OUT) :: error
8607 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
8609 INTEGER(INTG) :: dummy_err,var_type_idx
8610 TYPE(field_variable_type),
POINTER :: field_variable
8611 TYPE(varying_string) :: dummy_error,local_error
8613 enters(
"FIELD_INTERPOLATION_PARAMETERS_INITIALISE",err,error,*998)
8615 IF(
ASSOCIATED(field))
THEN 8616 IF(field%FIELD_FINISHED)
THEN 8617 IF(
ASSOCIATED(interpolation_parameters))
THEN 8618 CALL flagerror(
"Interpolation parameters is already associated.",err,error,*998)
8620 ALLOCATE(interpolation_parameters(field_number_of_variable_types),stat=err)
8621 IF(err/=0)
CALL flagerror(
"Could not allocate the interpolation parameters.",err,error,*999)
8622 DO var_type_idx=1,field_number_of_variable_types
8623 NULLIFY(interpolation_parameters(var_type_idx)%PTR)
8624 field_variable=>field%VARIABLE_TYPE_MAP(var_type_idx)%PTR
8625 IF(
PRESENT(componenttype))
THEN 8626 IF(
ASSOCIATED(field_variable))
CALL field_interpolation_parameter_initialise(field_variable, &
8627 & interpolation_parameters(var_type_idx)%PTR,err,error,*999,componenttype)
8629 IF(
ASSOCIATED(field_variable))
CALL field_interpolation_parameter_initialise(field_variable, &
8630 & interpolation_parameters(var_type_idx)%PTR,err,error,*999)
8635 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
8636 &
" has not been finished." 8637 CALL flagerror(local_error,err,error,*998)
8640 CALL flagerror(
"Field is not associated.",err,error,*998)
8643 exits(
"FIELD_INTERPOLATION_PARAMETERS_INITIALISE")
8645 999
CALL field_interpolation_parameters_finalise(interpolation_parameters,dummy_err,dummy_error,*998)
8646 998 errorsexits(
"FIELD_INTERPOLATION_PARAMETERS_INITIALISE",err,error)
8648 END SUBROUTINE field_interpolation_parameters_initialise
8655 SUBROUTINE field_interpolation_parameters_line_get(PARAMETER_SET_TYPE,LINE_NUMBER,INTERPOLATION_PARAMETERS,ERR,ERROR,*, &
8659 INTEGER(INTG),
INTENT(IN) :: parameter_set_type
8660 INTEGER(INTG),
INTENT(IN) :: line_number
8661 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
8662 INTEGER(INTG),
INTENT(OUT) :: err
8663 TYPE(varying_string),
INTENT(OUT) :: error
8664 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
8666 INTEGER(INTG) :: component_idx,basis_derivative_idx,derivative_idx,basis_node_idx,version_idx,node_idx,element_parameter_idx, &
8667 & dof_idx,node_scaling_dof_idx,scaling_idx,startComponentIdx,endComponentIdx
8668 REAL(DP),
POINTER :: field_parameter_set_data(:),scale_factors(:)
8669 TYPE(basis_type),
POINTER :: basis
8670 TYPE(coordinate_system_type),
POINTER :: coordinate_system
8671 TYPE(domain_lines_type),
POINTER :: lines_topology
8672 TYPE(domain_nodes_type),
POINTER :: nodes_topology
8673 TYPE(field_type),
POINTER :: field
8674 TYPE(field_parameter_set_type),
POINTER :: parameter_set
8675 TYPE(varying_string) :: local_error
8677 enters(
"FIELD_INTERPOLATION_PARAMETERS_LINE_GET",err,error,*999)
8679 IF(
ASSOCIATED(interpolation_parameters))
THEN 8680 IF(parameter_set_type>0.AND.parameter_set_type<=field_number_of_set_types)
THEN 8681 parameter_set=>interpolation_parameters%FIELD_VARIABLE%PARAMETER_SETS%SET_TYPE(parameter_set_type)%PTR
8682 IF(
ASSOCIATED(parameter_set))
THEN 8683 NULLIFY(field_parameter_set_data)
8684 CALL distributed_vector_data_get(parameter_set%PARAMETERS,field_parameter_set_data,err,error,*999)
8685 field=>interpolation_parameters%FIELD
8686 IF(
ASSOCIATED(field))
THEN 8687 NULLIFY(coordinate_system)
8688 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
8689 IF(
PRESENT(componenttype))
THEN 8690 SELECT CASE(componenttype)
8691 CASE(field_all_components_type)
8693 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8694 CASE(field_geometric_components_type)
8695 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 8697 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(FIELD_U_VARIABLE_TYPE)%PTR% &
8698 & number_of_components
8699 ELSEIF(interpolation_parameters%FIELD%TYPE==field_geometric_type)
THEN 8701 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8703 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
8704 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 8705 CALL flagerror(local_error,err,error,*999)
8707 CASE(field_nongeometric_components_type)
8708 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 8709 startcomponentidx=interpolation_parameters%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)% &
8710 & ptr%NUMBER_OF_COMPONENTS+1
8711 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8713 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
8714 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 8715 CALL flagerror(local_error,err,error,*999)
8718 local_error=
"Interpolation component type "//trim(number_to_vstring(componenttype,
"*",err,error))//
" is not valid." 8719 CALL flagerror(local_error,err,error,*999)
8723 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8725 DO component_idx=startcomponentidx,endcomponentidx
8726 lines_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%LINES
8727 IF(line_number>0.AND.line_number<=lines_topology%NUMBER_OF_LINES)
THEN 8728 basis=>lines_topology%LINES(line_number)%BASIS
8729 interpolation_parameters%BASES(component_idx)%PTR=>basis
8730 IF(component_idx==1)
THEN 8731 interpolation_parameters%NUMBER_OF_XI=basis%NUMBER_OF_XI
8733 IF(basis%NUMBER_OF_XI/=interpolation_parameters%NUMBER_OF_XI) &
8734 &
CALL flagerror(
"Inconsistent number of xi directions???",err,error,*999)
8736 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
8737 CASE(field_constant_interpolation)
8738 CALL flagerror(
"Not implemented.",err,error,*999)
8739 CASE(field_element_based_interpolation)
8740 CALL flagerror(
"Not implemented.",err,error,*999)
8741 CASE(field_node_based_interpolation)
8742 nodes_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%NODES
8743 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=basis%NUMBER_OF_ELEMENT_PARAMETERS
8744 SELECT CASE(interpolation_parameters%FIELD%SCALINGS%SCALING_TYPE)
8745 CASE(field_no_scaling)
8746 DO basis_node_idx=1,basis%NUMBER_OF_NODES
8747 node_idx=lines_topology%LINES(line_number)%NODES_IN_LINE(basis_node_idx)
8748 DO basis_derivative_idx=1,basis%NUMBER_OF_DERIVATIVES(basis_node_idx)
8749 derivative_idx=lines_topology%LINES(line_number)%DERIVATIVES_IN_LINE(1,basis_derivative_idx,basis_node_idx)
8750 version_idx=lines_topology%LINES(line_number)%DERIVATIVES_IN_LINE(2,basis_derivative_idx,basis_node_idx)
8751 element_parameter_idx=basis%ELEMENT_PARAMETER_INDEX(basis_derivative_idx,basis_node_idx)
8752 dof_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
8753 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(derivative_idx)%VERSIONS(version_idx)
8754 interpolation_parameters%PARAMETERS(element_parameter_idx,component_idx)=field_parameter_set_data(dof_idx)
8757 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
8758 scaling_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%SCALING_INDEX
8759 NULLIFY(scale_factors)
8760 CALL distributed_vector_data_get(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
8761 & scale_factors,scale_factors,err,error,*999)
8762 DO basis_node_idx=1,basis%NUMBER_OF_NODES
8763 node_idx=lines_topology%LINES(line_number)%NODES_IN_LINE(basis_node_idx)
8764 DO basis_derivative_idx=1,basis%NUMBER_OF_DERIVATIVES(basis_node_idx)
8765 derivative_idx=lines_topology%LINES(line_number)%DERIVATIVES_IN_LINE(1,basis_derivative_idx,basis_node_idx)
8766 version_idx=lines_topology%LINES(line_number)%DERIVATIVES_IN_LINE(2,basis_derivative_idx,basis_node_idx)
8767 element_parameter_idx=basis%ELEMENT_PARAMETER_INDEX(basis_derivative_idx,basis_node_idx)
8768 dof_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
8769 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(derivative_idx)%VERSIONS(version_idx)
8770 node_scaling_dof_idx= &
8771 & nodes_topology%NODES(node_idx)%DERIVATIVES(derivative_idx)%DOF_INDEX(version_idx)
8774 interpolation_parameters%PARAMETERS(element_parameter_idx,component_idx)= &
8775 & field_parameter_set_data(dof_idx)*scale_factors(node_scaling_dof_idx)
8776 interpolation_parameters%SCALE_FACTORS(element_parameter_idx,component_idx)= &
8777 & scale_factors(node_scaling_dof_idx)
8780 CASE(field_arc_length_scaling)
8781 CALL flagerror(
"Not implemented.",err,error,*999)
8783 local_error=
"The scaling type of "//trim(number_to_vstring(interpolation_parameters%FIELD%SCALINGS% &
8784 & scaling_type,
"*",err,error))//
" is invalid for field number "// &
8785 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8786 CALL flagerror(local_error,err,error,*999)
8788 CASE(field_grid_point_based_interpolation)
8789 CALL flagerror(
"Not implemented.",err,error,*999)
8790 CASE(field_gauss_point_based_interpolation)
8791 CALL flagerror(
"Not implemented.",err,error,*999)
8792 CASE(field_data_point_based_interpolation)
8793 CALL flagerror(
"Not implemented.",err,error,*999)
8795 local_error=
"The interpolation type of "//trim(number_to_vstring(interpolation_parameters%FIELD_VARIABLE% &
8796 & components(component_idx)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
8797 & trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
8798 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8799 CALL flagerror(local_error,err,error,*999)
8802 local_error=
"The line number of "//trim(number_to_vstring(line_number,
"*",err,error))// &
8803 &
" is invalid. The number must be between 1 and "// &
8804 & trim(number_to_vstring(lines_topology%NUMBER_OF_LINES,
"*",err,error))// &
8805 &
" for component number "//trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
8806 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8807 CALL flagerror(local_error,err,error,*999)
8811 CALL coordinate_interpolation_parameters_adjust(coordinate_system,interpolation_parameters,err,error,*999)
8813 CALL flagerror(
"The interpolation parameters field is not associated.",err,error,*999)
8815 CALL distributed_vector_data_restore(parameter_set%PARAMETERS,field_parameter_set_data,err,error,*999)
8817 local_error=
"The field parameter set type of "//trim(number_to_vstring(parameter_set_type,
"*",err,error))// &
8818 &
" has not been created for field number "// &
8819 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8820 CALL flagerror(local_error,err,error,*999)
8823 local_error=
"The field parameter set type of "//trim(number_to_vstring(parameter_set_type,
"*",err,error))// &
8824 &
" is invalid. The number must be between 1 and "//trim(number_to_vstring(field_number_of_set_types,
"*",err,error))// &
8825 &
" for field number "//trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8826 CALL flagerror(local_error,err,error,*999)
8829 CALL flagerror(
"Interpolation parameters is not associated.",err,error,*999)
8832 IF(diagnostics1)
THEN 8833 CALL write_string(diagnostic_output_type,
"Interpolation parameters:",err,error,*999)
8834 CALL write_string_value(diagnostic_output_type,
" Field number = ",interpolation_parameters%FIELD%USER_NUMBER,err,error,*999)
8835 CALL write_string_value(diagnostic_output_type,
" Field variable number = ",interpolation_parameters%FIELD_VARIABLE% &
8836 & variable_number,err,error,*999)
8837 CALL write_string_value(diagnostic_output_type,
" Parameter set type = ",parameter_set_type,err,error,*999)
8838 CALL write_string_value(diagnostic_output_type,
" Line number = ",line_number,err,error,*999)
8839 CALL write_string_value(diagnostic_output_type,
" Total number of components = ", &
8840 & interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS,err,error,*999)
8841 CALL write_string_value(diagnostic_output_type,
" Interpolation number of components = ", &
8842 & endcomponentidx-startcomponentidx+1,err,error,*999)
8843 DO component_idx=startcomponentidx,endcomponentidx
8844 CALL write_string_value(diagnostic_output_type,
" Component = ",component_idx,err,error,*999)
8845 CALL write_string_value(diagnostic_output_type,
" Number of parameters = ",interpolation_parameters% &
8846 & number_of_parameters(component_idx),err,error,*999)
8847 CALL write_string_vector(diagnostic_output_type,1,1,interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx),4,4, &
8848 & interpolation_parameters%PARAMETERS(:,component_idx),
'(" Parameters :",4(X,E13.6))',
'(18X,4(X,E13.6))', &
8853 exits(
"FIELD_INTERPOLATION_PARAMETERS_LINE_GET")
8855 999 errorsexits(
"FIELD_INTERPOLATION_PARAMETERS_LINE_GET",err,error)
8857 END SUBROUTINE field_interpolation_parameters_line_get
8863 SUBROUTINE field_interpolation_parameters_face_get(PARAMETER_SET_TYPE,FACE_NUMBER,INTERPOLATION_PARAMETERS,ERR,ERROR,*, &
8867 INTEGER(INTG),
INTENT(IN) :: parameter_set_type
8868 INTEGER(INTG),
INTENT(IN) :: face_number
8869 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
8870 INTEGER(INTG),
INTENT(OUT) :: err
8871 TYPE(varying_string),
INTENT(OUT) :: error
8872 INTEGER(INTG),
OPTIONAL,
INTENT(IN) :: componenttype
8874 INTEGER(INTG) :: component_idx,basis_derivative_idx,derivative_idx,version_idx,basis_node_idx,node_idx,element_parameter_idx, &
8875 & dof_idx,node_scaling_dof_idx,scaling_idx,startComponentIdx,endComponentIdx
8876 REAL(DP),
POINTER :: field_parameter_set_data(:),scale_factors(:)
8877 TYPE(basis_type),
POINTER :: basis
8878 TYPE(coordinate_system_type),
POINTER :: coordinate_system
8879 TYPE(domain_faces_type),
POINTER :: faces_topology
8880 TYPE(domain_nodes_type),
POINTER :: nodes_topology
8881 TYPE(field_type),
POINTER :: field
8882 TYPE(field_parameter_set_type),
POINTER :: parameter_set
8883 TYPE(varying_string) :: local_error
8885 enters(
"FIELD_INTERPOLATION_PARAMETERS_FACE_GET",err,error,*999)
8887 IF(
ASSOCIATED(interpolation_parameters))
THEN 8888 IF(parameter_set_type>0.AND.parameter_set_type<=field_number_of_set_types)
THEN 8889 parameter_set=>interpolation_parameters%FIELD_VARIABLE%PARAMETER_SETS%SET_TYPE(parameter_set_type)%PTR
8890 IF(
ASSOCIATED(parameter_set))
THEN 8891 NULLIFY(field_parameter_set_data)
8892 CALL distributed_vector_data_get(parameter_set%PARAMETERS,field_parameter_set_data,err,error,*999)
8893 field=>interpolation_parameters%FIELD
8894 IF(
ASSOCIATED(field))
THEN 8895 NULLIFY(coordinate_system)
8896 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
8897 IF(
PRESENT(componenttype))
THEN 8898 SELECT CASE(componenttype)
8899 CASE(field_all_components_type)
8901 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8902 CASE(field_geometric_components_type)
8903 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 8905 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(FIELD_U_VARIABLE_TYPE)%PTR% &
8906 & number_of_components
8907 ELSEIF(interpolation_parameters%FIELD%TYPE==field_geometric_type)
THEN 8909 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8911 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
8912 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 8913 CALL flagerror(local_error,err,error,*999)
8915 CASE(field_nongeometric_components_type)
8916 IF(interpolation_parameters%FIELD%TYPE==field_geometric_general_type)
THEN 8917 startcomponentidx=interpolation_parameters%FIELD%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)% &
8918 & ptr%NUMBER_OF_COMPONENTS+1
8919 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8921 local_error=
"Field type "//trim(number_to_vstring(interpolation_parameters%FIELD%TYPE,
"*",err,error))// &
8922 &
" is not valid for only interpolating geometric field, use FIELD_GEOMETRIC_GENERAL_TYPE." 8923 CALL flagerror(local_error,err,error,*999)
8926 local_error=
"Interpolation component type "//trim(number_to_vstring(componenttype,
"*",err,error))//
" is not valid." 8927 CALL flagerror(local_error,err,error,*999)
8931 endComponentIdx=INTERPOLATION_PARAMETERS%FIELD_VARIABLE%number_of_components
8933 DO component_idx=startcomponentidx,endcomponentidx
8934 faces_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%FACES
8935 IF(face_number>0.AND.face_number<=faces_topology%NUMBER_OF_FACES)
THEN 8936 basis=>faces_topology%FACES(face_number)%BASIS
8937 interpolation_parameters%BASES(component_idx)%PTR=>basis
8938 IF(component_idx==1)
THEN 8939 interpolation_parameters%NUMBER_OF_XI=basis%NUMBER_OF_XI
8941 IF(basis%NUMBER_OF_XI/=interpolation_parameters%NUMBER_OF_XI) &
8942 &
CALL flagerror(
"Inconsistent number of xi directions???",err,error,*999)
8944 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
8945 CASE(field_constant_interpolation)
8946 CALL flagerror(
"Not implemented.",err,error,*999)
8947 CASE(field_element_based_interpolation)
8948 CALL flagerror(
"Not implemented.",err,error,*999)
8949 CASE(field_node_based_interpolation)
8950 nodes_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%NODES
8951 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=basis%NUMBER_OF_ELEMENT_PARAMETERS
8952 SELECT CASE(interpolation_parameters%FIELD%SCALINGS%SCALING_TYPE)
8953 CASE(field_no_scaling)
8954 DO basis_node_idx=1,basis%NUMBER_OF_NODES
8955 node_idx=faces_topology%FACES(face_number)%NODES_IN_FACE(basis_node_idx)
8956 DO basis_derivative_idx=1,basis%NUMBER_OF_DERIVATIVES(basis_node_idx)
8957 derivative_idx=faces_topology%FACES(face_number)%DERIVATIVES_IN_FACE(1,basis_derivative_idx,basis_node_idx)
8958 version_idx=faces_topology%FACES(face_number)%DERIVATIVES_IN_FACE(2,basis_derivative_idx,basis_node_idx)
8959 element_parameter_idx=basis%ELEMENT_PARAMETER_INDEX(basis_derivative_idx,basis_node_idx)
8960 dof_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
8961 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(derivative_idx)%VERSIONS(version_idx)
8962 interpolation_parameters%PARAMETERS(element_parameter_idx,component_idx)=field_parameter_set_data(dof_idx)
8965 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
8966 scaling_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%SCALING_INDEX
8967 NULLIFY(scale_factors)
8968 CALL distributed_vector_data_get(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
8969 & scale_factors,scale_factors,err,error,*999)
8970 DO basis_node_idx=1,basis%NUMBER_OF_NODES
8971 node_idx=faces_topology%FACES(face_number)%NODES_IN_FACE(basis_node_idx)
8972 DO basis_derivative_idx=1,basis%NUMBER_OF_DERIVATIVES(basis_node_idx)
8973 derivative_idx=faces_topology%FACES(face_number)%DERIVATIVES_IN_FACE(1,basis_derivative_idx,basis_node_idx)
8974 version_idx=faces_topology%FACES(face_number)%DERIVATIVES_IN_FACE(2,basis_derivative_idx,basis_node_idx)
8975 element_parameter_idx=basis%ELEMENT_PARAMETER_INDEX(basis_derivative_idx,basis_node_idx)
8976 dof_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
8977 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(derivative_idx)%VERSIONS(version_idx)
8978 node_scaling_dof_idx= &
8979 & nodes_topology%NODES(node_idx)%DERIVATIVES(derivative_idx)%DOF_INDEX(version_idx)
8982 interpolation_parameters%PARAMETERS(element_parameter_idx,component_idx)= &
8983 & field_parameter_set_data(dof_idx)*scale_factors(node_scaling_dof_idx)
8984 interpolation_parameters%SCALE_FACTORS(element_parameter_idx,component_idx)= &
8985 & scale_factors(node_scaling_dof_idx)
8988 CASE(field_arc_length_scaling)
8989 CALL flagerror(
"Not implemented.",err,error,*999)
8991 local_error=
"The scaling type of "//trim(number_to_vstring(interpolation_parameters%FIELD%SCALINGS% &
8992 & scaling_type,
"*",err,error))//
" is invalid for field number "// &
8993 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 8994 CALL flagerror(local_error,err,error,*999)
8996 CASE(field_grid_point_based_interpolation)
8997 CALL flagerror(
"Not implemented.",err,error,*999)
8998 CASE(field_gauss_point_based_interpolation)
8999 CALL flagerror(
"Not implemented.",err,error,*999)
9000 CASE(field_data_point_based_interpolation)
9001 CALL flagerror(
"Not implemented.",err,error,*999)
9003 local_error=
"The interpolation type of "//trim(number_to_vstring(interpolation_parameters%FIELD_VARIABLE% &
9004 & components(component_idx)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
9005 & trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
9006 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9007 CALL flagerror(local_error,err,error,*999)
9010 local_error=
"The face number of "//trim(number_to_vstring(face_number,
"*",err,error))// &
9011 &
" is invalid. The number must be between 1 and "// &
9012 & trim(number_to_vstring(faces_topology%NUMBER_OF_FACES,
"*",err,error))// &
9013 &
" for component number "//trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
9014 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9015 CALL flagerror(local_error,err,error,*999)
9018 CALL coordinate_interpolation_parameters_adjust(coordinate_system,interpolation_parameters,err,error,*999)
9020 CALL flagerror(
"The interpolation parameters field is not associated.",err,error,*999)
9022 CALL distributed_vector_data_restore(parameter_set%PARAMETERS,field_parameter_set_data,err,error,*999)
9024 local_error=
"The field parameter set type of "//trim(number_to_vstring(parameter_set_type,
"*",err,error))// &
9025 &
" has not been created for field number "// &
9026 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9027 CALL flagerror(local_error,err,error,*999)
9030 local_error=
"The field parameter set type of "//trim(number_to_vstring(parameter_set_type,
"*",err,error))// &
9031 &
" is invalid. The number must be between 1 and "//trim(number_to_vstring(field_number_of_set_types,
"*",err,error))// &
9032 &
" for field number "//trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9033 CALL flagerror(local_error,err,error,*999)
9036 CALL flagerror(
"Interpolation parameters is not associated.",err,error,*999)
9039 IF(diagnostics1)
THEN 9040 CALL write_string(diagnostic_output_type,
"Interpolation parameters:",err,error,*999)
9041 CALL write_string_value(diagnostic_output_type,
" Field number = ",interpolation_parameters%FIELD%USER_NUMBER,err,error,*999)
9042 CALL write_string_value(diagnostic_output_type,
" Field variable number = ",interpolation_parameters%FIELD_VARIABLE% &
9043 & variable_number,err,error,*999)
9044 CALL write_string_value(diagnostic_output_type,
" Parameter set type = ",parameter_set_type,err,error,*999)
9045 CALL write_string_value(diagnostic_output_type,
" Face number = ",face_number,err,error,*999)
9046 CALL write_string_value(diagnostic_output_type,
" Total number of components = ", &
9047 & interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS,err,error,*999)
9048 CALL write_string_value(diagnostic_output_type,
" Interpolation number of components = ", &
9049 & endcomponentidx-startcomponentidx+1,err,error,*999)
9050 DO component_idx=startcomponentidx,endcomponentidx
9051 CALL write_string_value(diagnostic_output_type,
" Component = ",component_idx,err,error,*999)
9052 CALL write_string_value(diagnostic_output_type,
" Number of parameters = ",interpolation_parameters% &
9053 & number_of_parameters(component_idx),err,error,*999)
9054 CALL write_string_vector(diagnostic_output_type,1,1,interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx),4,4, &
9055 & interpolation_parameters%PARAMETERS(:,component_idx),
'(" Parameters :",4(X,E13.6))',
'(18X,4(X,E13.6))', &
9060 exits(
"FIELD_INTERPOLATION_PARAMETERS_FACE_GET")
9062 999 errorsexits(
"FIELD_INTERPOLATION_PARAMETERS_FACE_GET",err,error)
9064 END SUBROUTINE field_interpolation_parameters_face_get
9071 SUBROUTINE field_interpolationparametersscalefactorselementget(ELEMENT_NUMBER,INTERPOLATION_PARAMETERS,ERR,ERROR,*)
9074 INTEGER(INTG),
INTENT(IN) :: element_number
9075 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
9076 INTEGER(INTG),
INTENT(OUT) :: err
9077 TYPE(varying_string),
INTENT(OUT) :: error
9079 INTEGER(INTG) :: component_idx,mk,nk,nn,np,ns,ny,scaling_idx,nv
9080 REAL(DP),
POINTER :: scale_factors(:)
9081 TYPE(basis_type),
POINTER :: basis
9082 TYPE(domain_elements_type),
POINTER :: elements_topology
9083 TYPE(domain_nodes_type),
POINTER :: nodes_topology
9084 TYPE(varying_string) :: local_error
9086 enters(
"Field_InterpolationParametersScaleFactorsElementGet",err,error,*999)
9088 IF(
ASSOCIATED(interpolation_parameters))
THEN 9089 SELECT CASE(interpolation_parameters%FIELD%SCALINGS%SCALING_TYPE)
9090 CASE(field_no_scaling)
9091 CALL flagerror(
"Can not get the scale factors for a field with no scaling.",err,error,*999)
9092 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
9093 DO component_idx=1,interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
9094 elements_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%ELEMENTS
9095 IF(element_number>0.AND.element_number<=elements_topology%TOTAL_NUMBER_OF_ELEMENTS)
THEN 9096 basis=>elements_topology%ELEMENTS(element_number)%BASIS
9097 interpolation_parameters%BASES(component_idx)%PTR=>basis
9098 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
9099 CASE(field_constant_interpolation)
9100 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9101 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9102 CASE(field_element_based_interpolation)
9103 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9104 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9105 CASE(field_node_based_interpolation)
9106 nodes_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%NODES
9107 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=basis%NUMBER_OF_ELEMENT_PARAMETERS
9108 scaling_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%SCALING_INDEX
9109 NULLIFY(scale_factors)
9110 CALL distributed_vector_data_get(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
9111 & scale_factors,scale_factors,err,error,*999)
9112 DO nn=1,basis%NUMBER_OF_NODES
9113 np=elements_topology%ELEMENTS(element_number)%ELEMENT_NODES(nn)
9114 DO mk=1,basis%NUMBER_OF_DERIVATIVES(nn)
9115 nk=elements_topology%ELEMENTS(element_number)%ELEMENT_DERIVATIVES(mk,nn)
9116 nv=elements_topology%ELEMENTS(element_number)%elementVersions(mk,nn)
9117 ns=basis%ELEMENT_PARAMETER_INDEX(mk,nn)
9118 ny=nodes_topology%NODES(np)%DERIVATIVES(nk)%DOF_INDEX(nv)
9119 interpolation_parameters%SCALE_FACTORS(ns,component_idx)=scale_factors(ny)
9122 CALL distributed_vector_data_restore(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
9123 & scale_factors,scale_factors,err,error,*999)
9124 CASE(field_grid_point_based_interpolation)
9125 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9126 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9127 CASE(field_gauss_point_based_interpolation)
9128 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9129 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9130 CASE(field_data_point_based_interpolation)
9131 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9132 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9134 local_error=
"The interpolation type of "//trim(number_to_vstring(interpolation_parameters%FIELD_VARIABLE% &
9135 & components(component_idx)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
9136 & trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
9137 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9138 CALL flagerror(local_error,err,error,*999)
9141 local_error=
"The element number of "//trim(number_to_vstring(element_number,
"*",err,error))// &
9142 &
" is invalid. The number must be between 1 and "// &
9143 & trim(number_to_vstring(elements_topology%TOTAL_NUMBER_OF_ELEMENTS,
"*",err,error))// &
9144 &
" for component number "//trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
9145 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9146 CALL flagerror(local_error,err,error,*999)
9149 CASE(field_arc_length_scaling)
9150 CALL flagerror(
"Not implemented.",err,error,*999)
9152 local_error=
"The scaling type of "//trim(number_to_vstring(interpolation_parameters%FIELD%SCALINGS% &
9153 & scaling_type,
"*",err,error))//
" is invalid for field number "// &
9154 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9155 CALL flagerror(local_error,err,error,*999)
9158 CALL flagerror(
"Interpolation parameters is not associated.",err,error,*999)
9161 IF(diagnostics1)
THEN 9162 CALL write_string(diagnostic_output_type,
"Interpolation scale factors:",err,error,*999)
9163 CALL write_string_value(diagnostic_output_type,
" Field number = ",interpolation_parameters%FIELD%USER_NUMBER,err,error,*999)
9164 CALL write_string_value(diagnostic_output_type,
" Field variable number = ",interpolation_parameters%FIELD_VARIABLE% &
9165 & variable_number,err,error,*999)
9166 CALL write_string_value(diagnostic_output_type,
" Element number = ",element_number,err,error,*999)
9167 CALL write_string_value(diagnostic_output_type,
" Number of components = ",interpolation_parameters%FIELD_VARIABLE% &
9168 & number_of_components,err,error,*999)
9169 DO component_idx=1,interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
9170 CALL write_string_value(diagnostic_output_type,
" Component = ",component_idx,err,error,*999)
9171 CALL write_string_value(diagnostic_output_type,
" Number of parameters = ",interpolation_parameters% &
9172 & number_of_parameters(component_idx),err,error,*999)
9173 CALL write_string_vector(diagnostic_output_type,1,1,interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx),4,4, &
9174 & interpolation_parameters%SCALE_FACTORS(:,component_idx),
'(" Scale factors :",4(X,E13.6))',
'(21X,4(X,E13.6))', &
9179 exits(
"Field_InterpolationParametersScaleFactorsElementGet")
9181 999 errors(
"Field_InterpolationParametersScaleFactorsElementGet",err,error)
9182 exits(
"Field_InterpolationParametersScaleFactorsElementGet")
9185 END SUBROUTINE field_interpolationparametersscalefactorselementget
9192 SUBROUTINE field_parametersetnodescalefactorget(field,variableType,versionNumber, &
9193 & derivativenumber,nodeusernumber,componentnumber,scalefactor,err,error,*)
9196 TYPE(field_type),
POINTER :: field
9197 INTEGER(INTG),
INTENT(IN) :: variabletype
9198 INTEGER(INTG),
INTENT(IN) :: versionnumber
9199 INTEGER(INTG),
INTENT(IN) :: derivativenumber
9200 INTEGER(INTG),
INTENT(IN) :: nodeusernumber
9201 INTEGER(INTG),
INTENT(IN) :: componentnumber
9202 REAL(DP),
INTENT(OUT) :: scalefactor
9203 INTEGER(INTG),
INTENT(OUT) :: err
9204 TYPE(varying_string),
INTENT(OUT) :: error
9206 LOGICAL :: ghostnode,usernodeexists
9207 INTEGER(INTG) :: domainlocalnodenumber,scalingidx,dofidx
9208 REAL(DP),
POINTER :: fieldscalefactors(:)
9209 TYPE(field_variable_type),
POINTER :: fieldvariable
9210 TYPE(domain_topology_type),
POINTER :: domaintopology
9211 TYPE(domain_nodes_type),
POINTER :: domainnodes
9212 TYPE(varying_string) :: localerror
9214 enters(
"Field_ParameterSetNodeScaleFactorGet",err,error,*999)
9216 IF(
ASSOCIATED(field))
THEN 9217 IF(field%FIELD_FINISHED)
THEN 9218 SELECT CASE(field%SCALINGS%SCALING_TYPE)
9219 CASE(field_no_scaling)
9220 CALL flagerror(
"Can not get the scale factors for a field with no scaling.",err,error,*999)
9221 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
9222 IF(variabletype>0.AND.variabletype<=field_number_of_variable_types)
THEN 9223 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
9224 IF(
ASSOCIATED(fieldvariable))
THEN 9225 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 9226 IF(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 9227 domaintopology=>fieldvariable%COMPONENTS(componentnumber)%DOMAIN%TOPOLOGY
9228 CALL domain_topology_node_check_exists(domaintopology,nodeusernumber,usernodeexists, &
9229 & domainlocalnodenumber,ghostnode,err,error,*999)
9230 IF(usernodeexists)
THEN 9232 localerror=
"Cannot get by node for user node "// &
9233 & trim(number_to_vstring(nodeusernumber,
"*",err,error))//
" as it is a ghost node." 9234 CALL flagerror(localerror,err,error,*999)
9236 domainnodes=>domaintopology%NODES
9237 IF(
ASSOCIATED(domainnodes))
THEN 9238 IF(derivativenumber>0.AND.derivativenumber<=domainnodes%NODES(domainlocalnodenumber)% &
9239 & number_of_derivatives)
THEN 9240 IF(versionnumber>0.AND.versionnumber<= &
9241 & fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
9242 & node_param2dof_map%NODES(domainlocalnodenumber)%DERIVATIVES(derivativenumber)% &
9243 & number_of_versions)
THEN 9246 scalingidx=fieldvariable%COMPONENTS(componentnumber)%SCALING_INDEX
9247 NULLIFY(fieldscalefactors)
9248 CALL distributed_vector_data_get(field%SCALINGS%SCALINGS(scalingidx)%SCALE_FACTORS, &
9249 & fieldscalefactors,err,error,*999)
9250 dofidx=domainnodes%NODES(nodeusernumber)%DERIVATIVES(derivativenumber)%DOF_INDEX(versionnumber)
9254 scalefactor=fieldscalefactors(dofidx)
9255 CALL distributed_vector_data_restore(field%SCALINGS%SCALINGS(scalingidx)% &
9256 & scale_factors,fieldscalefactors,err,error,*999)
9258 localerror=
"Version number "//trim(number_to_vstring(versionnumber,
"*",err,error))// &
9259 &
" is invalid for derivative number "// &
9260 & trim(number_to_vstring(derivativenumber,
"*",err,error))//
" of node number "// &
9261 & trim(number_to_vstring(nodeusernumber,
"*",err,error))//
" of component number "// &
9262 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
9263 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
9264 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
9265 & trim(number_to_vstring(domainnodes%NODES(domainlocalnodenumber)% &
9266 & derivatives(derivativenumber)%numberOfVersions,
"*",err,error))//
" versions "// &
9267 &
"(note version numbers are indexed directly from the value the user specifies during "// &
9268 &
"element creation and no record is kept of the total number of versions the user sets."// &
9269 &
"The maximum version number the user sets defines the total number of versions allocated)." 9270 CALL flagerror(localerror,err,error,*999)
9273 localerror=
"Derivative number "//trim(number_to_vstring(derivativenumber,
"*",err,error))// &
9274 &
" is invalid for user node number "// &
9275 & trim(number_to_vstring(nodeusernumber,
"*",err,error))//
" of component number "// &
9276 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
9277 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
9278 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
9279 & trim(number_to_vstring(domainnodes%NODES(domainlocalnodenumber)% &
9280 & number_of_derivatives,
"*",err,error))//
" derivatives." 9281 CALL flagerror(localerror,err,error,*999)
9286 localerror=
"The specified user node number of "// &
9287 & trim(number_to_vstring(nodeusernumber,
"*",err,error))// &
9288 &
" does not exist in the domain for field component number "// &
9289 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
9290 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
9291 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9292 CALL flagerror(localerror,err,error,*999)
9295 localerror=
"The interpolation type of "//trim(number_to_vstring(fieldvariable%COMPONENTS(componentnumber)% &
9296 & interpolation_type,
"*",err,error))//
" is not nodally based for component number "// &
9297 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field number "// &
9298 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9299 CALL flagerror(localerror,err,error,*999)
9302 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
9303 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9304 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
9305 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
9307 CALL flagerror(localerror,err,error,*999)
9310 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9311 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9312 CALL flagerror(localerror,err,error,*999)
9315 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9316 &
" is invalid. The variable type must be between 1 and "// &
9317 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 9318 CALL flagerror(localerror,err,error,*999)
9320 CASE(field_arc_length_scaling)
9321 CALL flagerror(
"Not implemented.",err,error,*999)
9323 localerror=
"The scaling type of "//trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
9324 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9325 CALL flagerror(localerror,err,error,*999)
9328 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 9329 CALL flagerror(localerror,err,error,*999)
9332 CALL flagerror(
"Field is not associated.",err,error,*999)
9335 exits(
"Field_ParameterSetNodeScaleFactorGet")
9337 999 errorsexits(
"Field_ParameterSetNodeScaleFactorGet",err,error)
9339 END SUBROUTINE field_parametersetnodescalefactorget
9346 SUBROUTINE field_parametersetnodescalefactorsget(field,variableType,meshComponentNumber,scaleFactors,err,error,*)
9349 TYPE(field_type),
POINTER :: field
9350 INTEGER(INTG),
INTENT(IN) :: variabletype
9351 INTEGER(INTG),
INTENT(IN) :: meshcomponentnumber
9352 REAL(DP),
INTENT(OUT) :: scalefactors(:)
9353 INTEGER(INTG),
INTENT(OUT) :: err
9354 TYPE(varying_string),
INTENT(OUT) :: error
9356 INTEGER(INTG) :: scalingidx
9357 REAL(DP),
POINTER :: fieldscalefactors(:)
9358 TYPE(field_variable_type),
POINTER :: fieldvariable
9359 TYPE(varying_string) :: localerror
9361 enters(
"Field_ParameterSetNodeScaleFactorsGet",err,error,*999)
9363 IF(
ASSOCIATED(field))
THEN 9364 IF(field%FIELD_FINISHED)
THEN 9365 SELECT CASE(field%SCALINGS%SCALING_TYPE)
9366 CASE(field_no_scaling)
9367 CALL flagerror(
"Can not get the scale factors for a field with no scaling.",err,error,*999)
9368 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
9369 IF(variabletype>0.AND.variabletype<=field_number_of_variable_types)
THEN 9370 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
9371 IF(
ASSOCIATED(fieldvariable))
THEN 9373 IF(meshcomponentnumber>=1.AND.meshcomponentnumber<=field%SCALINGS%NUMBER_OF_SCALING_INDICES)
THEN 9374 scalingidx=meshcomponentnumber
9375 NULLIFY(fieldscalefactors)
9376 CALL distributed_vector_data_get(field%SCALINGS%SCALINGS(scalingidx)%SCALE_FACTORS, &
9377 & fieldscalefactors,err,error,*999)
9378 scalefactors=fieldscalefactors
9379 CALL distributed_vector_data_restore(field%SCALINGS%SCALINGS(scalingidx)% &
9380 & scale_factors,fieldscalefactors,err,error,*999)
9382 localerror=
"Mesh component number "//trim(number_to_vstring(meshcomponentnumber,
"*",err,error))// &
9383 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9384 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
9385 & trim(number_to_vstring(field%SCALINGS%NUMBER_OF_SCALING_INDICES,
"*",err,error))// &
9387 CALL flagerror(localerror,err,error,*999)
9390 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9391 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9392 CALL flagerror(localerror,err,error,*999)
9395 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9396 &
" is invalid. The variable type must be between 1 and "// &
9397 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 9398 CALL flagerror(localerror,err,error,*999)
9400 CASE(field_arc_length_scaling)
9401 CALL flagerror(
"Not implemented.",err,error,*999)
9403 localerror=
"The scaling type of "//trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
9404 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9405 CALL flagerror(localerror,err,error,*999)
9408 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 9409 CALL flagerror(localerror,err,error,*999)
9412 CALL flagerror(
"Field is not associated.",err,error,*999)
9415 exits(
"Field_ParameterSetNodeScaleFactorsGet")
9417 999 errorsexits(
"Field_ParameterSetNodeScaleFactorsGet",err,error)
9419 END SUBROUTINE field_parametersetnodescalefactorsget
9426 SUBROUTINE field_parametersetnodenumberofscalefactordofsget(field,variableType,meshComponentNumber,numberOfScaleFactorsDofs, &
9430 TYPE(field_type),
POINTER :: field
9431 INTEGER(INTG),
INTENT(IN) :: variabletype
9432 INTEGER(INTG),
INTENT(IN) :: meshcomponentnumber
9433 INTEGER(INTG),
INTENT(OUT) :: numberofscalefactorsdofs
9434 INTEGER(INTG),
INTENT(OUT) :: err
9435 TYPE(varying_string),
INTENT(OUT) :: error
9437 INTEGER(INTG) :: scalingidx
9438 REAL(DP),
POINTER :: fieldscalefactors(:)
9439 TYPE(field_variable_type),
POINTER :: fieldvariable
9440 TYPE(varying_string) :: localerror
9442 enters(
"Field_ParameterSetNodeNumberOfScaleFactorDofsGet",err,error,*999)
9444 IF(
ASSOCIATED(field))
THEN 9445 IF(field%FIELD_FINISHED)
THEN 9446 SELECT CASE(field%SCALINGS%SCALING_TYPE)
9447 CASE(field_no_scaling)
9448 CALL flagerror(
"Can not get the scale factors for a field with no scaling.",err,error,*999)
9449 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
9450 IF(variabletype>0.AND.variabletype<=field_number_of_variable_types)
THEN 9451 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
9452 IF(
ASSOCIATED(fieldvariable))
THEN 9454 IF(meshcomponentnumber>=1.AND.meshcomponentnumber<=field%SCALINGS%NUMBER_OF_SCALING_INDICES)
THEN 9455 scalingidx=meshcomponentnumber
9456 NULLIFY(fieldscalefactors)
9457 CALL distributed_vector_data_get(field%SCALINGS%SCALINGS(scalingidx)%SCALE_FACTORS, &
9458 & fieldscalefactors,err,error,*999)
9459 numberofscalefactorsdofs=
SIZE(fieldscalefactors,1)
9460 CALL distributed_vector_data_restore(field%SCALINGS%SCALINGS(scalingidx)% &
9461 & scale_factors,fieldscalefactors,err,error,*999)
9463 localerror=
"Mesh component number "//trim(number_to_vstring(meshcomponentnumber,
"*",err,error))// &
9464 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9465 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
9466 & trim(number_to_vstring(field%SCALINGS%NUMBER_OF_SCALING_INDICES,
"*",err,error))// &
9468 CALL flagerror(localerror,err,error,*999)
9471 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9472 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9473 CALL flagerror(localerror,err,error,*999)
9476 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9477 &
" is invalid. The variable type must be between 1 and "// &
9478 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 9479 CALL flagerror(localerror,err,error,*999)
9481 CASE(field_arc_length_scaling)
9482 CALL flagerror(
"Not implemented.",err,error,*999)
9484 localerror=
"The scaling type of "//trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
9485 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9486 CALL flagerror(localerror,err,error,*999)
9489 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 9490 CALL flagerror(localerror,err,error,*999)
9493 CALL flagerror(
"Field is not associated.",err,error,*999)
9496 exits(
"Field_ParameterSetNodeNumberOfScaleFactorDofsGet")
9498 999 errors(
"Field_ParameterSetNodeNumberOfScaleFactorDofsGet",err,error)
9499 exits(
"Field_ParameterSetNodeNumberOfScaleFactorDofsGet")
9502 END SUBROUTINE field_parametersetnodenumberofscalefactordofsget
9509 SUBROUTINE field_parametersetnodescalefactorset(field,variableType,versionNumber, &
9510 & derivativenumber,nodeusernumber,componentnumber,scalefactor,err,error,*)
9513 TYPE(field_type),
POINTER :: field
9514 INTEGER(INTG),
INTENT(IN) :: variabletype
9515 INTEGER(INTG),
INTENT(IN) :: versionnumber
9516 INTEGER(INTG),
INTENT(IN) :: derivativenumber
9517 INTEGER(INTG),
INTENT(IN) :: nodeusernumber
9518 INTEGER(INTG),
INTENT(IN) :: componentnumber
9519 REAL(DP),
INTENT(IN) :: scalefactor
9520 INTEGER(INTG),
INTENT(OUT) :: err
9521 TYPE(varying_string),
INTENT(OUT) :: error
9523 LOGICAL :: ghostnode,usernodeexists
9524 INTEGER(INTG) :: domainlocalnodenumber,scalingidx,dofidx
9525 REAL(DP),
POINTER :: fieldscalefactors(:)
9526 TYPE(field_variable_type),
POINTER :: fieldvariable
9527 TYPE(domain_topology_type),
POINTER :: domaintopology
9528 TYPE(domain_nodes_type),
POINTER :: domainnodes
9529 TYPE(varying_string) :: localerror
9531 enters(
"Field_ParameterSetNodeScaleFactorSet",err,error,*999)
9533 IF(
ASSOCIATED(field))
THEN 9534 IF(field%FIELD_FINISHED)
THEN 9535 SELECT CASE(field%SCALINGS%SCALING_TYPE)
9536 CASE(field_no_scaling)
9537 CALL flagerror(
"Can not set the scale factors for a field with no scaling.",err,error,*999)
9538 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
9539 IF(variabletype>0.AND.variabletype<=field_number_of_variable_types)
THEN 9540 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
9541 IF(
ASSOCIATED(fieldvariable))
THEN 9542 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 9543 IF(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 9544 domaintopology=>fieldvariable%COMPONENTS(componentnumber)%DOMAIN%TOPOLOGY
9545 CALL domain_topology_node_check_exists(domaintopology,nodeusernumber,usernodeexists, &
9546 & domainlocalnodenumber,ghostnode,err,error,*999)
9547 IF(usernodeexists)
THEN 9549 localerror=
"Cannot update by node for user node "// &
9550 & trim(number_to_vstring(nodeusernumber,
"*",err,error))//
" as it is a ghost node." 9551 CALL flagerror(localerror,err,error,*999)
9553 domainnodes=>domaintopology%NODES
9554 IF(
ASSOCIATED(domainnodes))
THEN 9555 IF(derivativenumber>0.AND.derivativenumber<=domainnodes%NODES(domainlocalnodenumber)% &
9556 & number_of_derivatives)
THEN 9557 IF(versionnumber>0.AND.versionnumber<= &
9558 & fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
9559 & node_param2dof_map%NODES(domainlocalnodenumber)%DERIVATIVES(derivativenumber)% &
9560 & number_of_versions)
THEN 9564 scalingidx=fieldvariable%COMPONENTS(componentnumber)%SCALING_INDEX
9565 NULLIFY(fieldscalefactors)
9566 CALL distributed_vector_data_get(field%SCALINGS%SCALINGS(scalingidx)% &
9567 & scale_factors,fieldscalefactors,err,error,*999)
9568 dofidx=domainnodes%NODES(nodeusernumber)%DERIVATIVES(derivativenumber)%DOF_INDEX(versionnumber)
9572 fieldscalefactors(dofidx)=scalefactor
9573 CALL distributed_vector_data_restore(field%SCALINGS%SCALINGS(scalingidx)% &
9574 & scale_factors,fieldscalefactors,err,error,*999)
9577 localerror=
"Version number "//trim(number_to_vstring(versionnumber,
"*",err,error))// &
9578 &
" is invalid for derivative number "// &
9579 & trim(number_to_vstring(derivativenumber,
"*",err,error))//
" of node number "// &
9580 & trim(number_to_vstring(nodeusernumber,
"*",err,error))//
" of component number "// &
9581 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
9582 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
9583 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
9584 & trim(number_to_vstring(domainnodes%NODES(domainlocalnodenumber)% &
9585 & derivatives(derivativenumber)%numberOfVersions,
"*",err,error))//
" versions "// &
9586 &
"(note version numbers are indexed directly from the value the user specifies during "// &
9587 &
"element creation and no record is kept of the total number of versions the user sets."// &
9588 &
"The maximum version number the user sets defines the total number of versions allocated)." 9589 CALL flagerror(localerror,err,error,*999)
9592 localerror=
"Derivative number "//trim(number_to_vstring(derivativenumber,
"*",err,error))// &
9593 &
" is invalid for user node number "// &
9594 & trim(number_to_vstring(nodeusernumber,
"*",err,error))//
" of component number "// &
9595 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
9596 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
9597 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
9598 & trim(number_to_vstring(domainnodes%NODES(domainlocalnodenumber)% &
9599 & number_of_derivatives,
"*",err,error))//
" derivatives." 9600 CALL flagerror(localerror,err,error,*999)
9605 localerror=
"The specified user node number of "// &
9606 & trim(number_to_vstring(nodeusernumber,
"*",err,error))// &
9607 &
" does not exist in the domain for field component number "// &
9608 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
9609 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
9610 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9611 CALL flagerror(localerror,err,error,*999)
9614 localerror=
"The interpolation type of "//trim(number_to_vstring(fieldvariable%COMPONENTS(componentnumber)% &
9615 & interpolation_type,
"*",err,error))//
" is not nodally based for component number "// &
9616 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field number "// &
9617 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9618 CALL flagerror(localerror,err,error,*999)
9621 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
9622 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9623 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
9624 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
9626 CALL flagerror(localerror,err,error,*999)
9629 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9630 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9631 CALL flagerror(localerror,err,error,*999)
9634 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9635 &
" is invalid. The variable type must be between 1 and "// &
9636 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 9637 CALL flagerror(localerror,err,error,*999)
9639 CASE(field_arc_length_scaling)
9640 CALL flagerror(
"Not implemented.",err,error,*999)
9642 localerror=
"The scaling type of "//trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
9643 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9644 CALL flagerror(localerror,err,error,*999)
9647 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 9648 CALL flagerror(localerror,err,error,*999)
9651 CALL flagerror(
"Field is not associated.",err,error,*999)
9654 exits(
"Field_ParameterSetNodeScaleFactorSet")
9656 999 errorsexits(
"Field_ParameterSetNodeScaleFactorSet",err,error)
9658 END SUBROUTINE field_parametersetnodescalefactorset
9664 SUBROUTINE field_parametersetnodescalefactorsset(field,variableType,meshComponentNumber,scaleFactors,err,error,*)
9667 TYPE(field_type),
POINTER :: field
9668 INTEGER(INTG),
INTENT(IN) :: variabletype
9669 INTEGER(INTG),
INTENT(IN) :: meshcomponentnumber
9670 REAL(DP),
INTENT(IN) :: scalefactors(:)
9671 INTEGER(INTG),
INTENT(OUT) :: err
9672 TYPE(varying_string),
INTENT(OUT) :: error
9674 INTEGER(INTG) :: scalingidx
9675 REAL(DP),
POINTER :: fieldscalefactors(:)
9676 TYPE(field_variable_type),
POINTER :: fieldvariable
9677 TYPE(varying_string) :: localerror
9679 enters(
"Field_ParameterSetNodeScaleFactorsSet",err,error,*999)
9681 IF(
ASSOCIATED(field))
THEN 9682 IF(field%FIELD_FINISHED)
THEN 9683 SELECT CASE(field%SCALINGS%SCALING_TYPE)
9684 CASE(field_no_scaling)
9685 CALL flagerror(
"Can not set the scale factors for a field with no scaling.",err,error,*999)
9686 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
9687 IF(variabletype>0.AND.variabletype<=field_number_of_variable_types)
THEN 9688 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
9689 IF(
ASSOCIATED(fieldvariable))
THEN 9691 IF(meshcomponentnumber>=1.AND.meshcomponentnumber<=field%SCALINGS%NUMBER_OF_SCALING_INDICES)
THEN 9692 scalingidx=meshcomponentnumber
9693 NULLIFY(fieldscalefactors)
9694 CALL distributed_vector_data_get(field%SCALINGS%SCALINGS(scalingidx)%SCALE_FACTORS, &
9695 & fieldscalefactors,err,error,*999)
9696 IF(
SIZE(fieldscalefactors,1)==
SIZE(scalefactors,1))
THEN 9697 fieldscalefactors = scalefactors
9699 localerror=
"The input scale factors have dimensions "//trim(number_to_vstring(
SIZE(scalefactors),
"*",err,error)) &
9700 & //
" and does not match the expected scale factor dimensions of "// &
9701 & trim(number_to_vstring(
SIZE(fieldscalefactors),
"*",err,error))
9702 CALL flagerror(localerror,err,error,*999)
9704 CALL distributed_vector_data_restore(field%SCALINGS%SCALINGS(scalingidx)% &
9705 & scale_factors,fieldscalefactors,err,error,*999)
9707 localerror=
"Mesh component number "//trim(number_to_vstring(meshcomponentnumber,
"*",err,error))// &
9708 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9709 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
9710 & trim(number_to_vstring(field%SCALINGS%NUMBER_OF_SCALING_INDICES,
"*",err,error))// &
9712 CALL flagerror(localerror,err,error,*999)
9715 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9716 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9717 CALL flagerror(localerror,err,error,*999)
9720 localerror=
"The field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
9721 &
" is invalid. The variable type must be between 1 and "// &
9722 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 9723 CALL flagerror(localerror,err,error,*999)
9725 CASE(field_arc_length_scaling)
9726 CALL flagerror(
"Not implemented.",err,error,*999)
9728 localerror=
"The scaling type of "//trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
9729 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 9730 CALL flagerror(localerror,err,error,*999)
9733 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 9734 CALL flagerror(localerror,err,error,*999)
9737 CALL flagerror(
"Field is not associated.",err,error,*999)
9740 exits(
"Field_ParameterSetNodeScaleFactorsSet")
9742 999 errorsexits(
"Field_ParameterSetNodeScaleFactorsSet",err,error)
9744 END SUBROUTINE field_parametersetnodescalefactorsset
9751 SUBROUTINE field_interpolationparametersscalefactorslineget(LINE_NUMBER,INTERPOLATION_PARAMETERS,ERR,ERROR,*)
9754 INTEGER(INTG),
INTENT(IN) :: line_number
9755 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
9756 INTEGER(INTG),
INTENT(OUT) :: err
9757 TYPE(varying_string),
INTENT(OUT) :: error
9759 INTEGER(INTG) :: component_idx,mk,nk,nn,np,ns,ny,scaling_idx,nv
9760 REAL(DP),
POINTER :: scale_factors(:)
9761 TYPE(basis_type),
POINTER :: basis
9762 TYPE(domain_lines_type),
POINTER :: lines_topology
9763 TYPE(domain_nodes_type),
POINTER :: nodes_topology
9764 TYPE(varying_string) :: local_error
9766 enters(
"Field_InterpolationParametersScaleFactorsLineGet",err,error,*999)
9768 IF(
ASSOCIATED(interpolation_parameters))
THEN 9769 SELECT CASE(interpolation_parameters%FIELD%SCALINGS%SCALING_TYPE)
9770 CASE(field_no_scaling)
9771 CALL flagerror(
"Can not scale factors for a field with no scaling.",err,error,*999)
9772 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
9773 DO component_idx=1,interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
9774 lines_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%LINES
9775 IF(line_number>0.AND.line_number<=lines_topology%NUMBER_OF_LINES)
THEN 9776 basis=>lines_topology%LINES(line_number)%BASIS
9777 interpolation_parameters%BASES(component_idx)%PTR=>basis
9778 IF(component_idx==1)
THEN 9779 interpolation_parameters%NUMBER_OF_XI=basis%NUMBER_OF_XI
9781 IF(basis%NUMBER_OF_XI/=interpolation_parameters%NUMBER_OF_XI) &
9782 &
CALL flagerror(
"Inconsistent number of xi directions???",err,error,*999)
9784 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
9785 CASE(field_constant_interpolation)
9786 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9787 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9788 CASE(field_element_based_interpolation)
9789 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9790 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9791 CASE(field_node_based_interpolation)
9792 nodes_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%NODES
9793 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=basis%NUMBER_OF_ELEMENT_PARAMETERS
9794 scaling_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%SCALING_INDEX
9795 NULLIFY(scale_factors)
9796 CALL distributed_vector_data_get(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
9797 & scale_factors,scale_factors,err,error,*999)
9798 DO nn=1,basis%NUMBER_OF_NODES
9799 np=lines_topology%LINES(line_number)%NODES_IN_LINE(nn)
9800 DO mk=1,basis%NUMBER_OF_DERIVATIVES(nn)
9801 nk=lines_topology%LINES(line_number)%DERIVATIVES_IN_LINE(1,mk,nn)
9802 nv=lines_topology%LINES(line_number)%DERIVATIVES_IN_LINE(2,mk,nn)
9803 ns=basis%ELEMENT_PARAMETER_INDEX(mk,nn)
9804 ny=nodes_topology%NODES(np)%DERIVATIVES(nk)%DOF_INDEX(nv)
9805 interpolation_parameters%SCALE_FACTORS(ns,component_idx)=scale_factors(ny)
9808 CALL distributed_vector_data_restore(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
9809 & scale_factors,scale_factors,err,error,*999)
9810 CASE(field_grid_point_based_interpolation)
9811 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9812 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9813 CASE(field_gauss_point_based_interpolation)
9814 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9815 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9816 CASE(field_data_point_based_interpolation)
9817 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9818 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9820 local_error=
"The interpolation type of "//trim(number_to_vstring(interpolation_parameters%FIELD_VARIABLE% &
9821 & components(component_idx)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
9822 & trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
9823 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9824 CALL flagerror(local_error,err,error,*999)
9827 local_error=
"The line number of "//trim(number_to_vstring(line_number,
"*",err,error))// &
9828 &
" is invalid. The number must be between 1 and "// &
9829 & trim(number_to_vstring(lines_topology%NUMBER_OF_LINES,
"*",err,error))// &
9830 &
" for component number "//trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
9831 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9832 CALL flagerror(local_error,err,error,*999)
9835 CASE(field_arc_length_scaling)
9836 CALL flagerror(
"Not implemented.",err,error,*999)
9838 local_error=
"The scaling type of "//trim(number_to_vstring(interpolation_parameters%FIELD%SCALINGS% &
9839 & scaling_type,
"*",err,error))//
" is invalid for field number "// &
9840 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9841 CALL flagerror(local_error,err,error,*999)
9844 CALL flagerror(
"Interpolation parameters is not associated.",err,error,*999)
9847 IF(diagnostics1)
THEN 9848 CALL write_string(diagnostic_output_type,
"Interpolation scale factors:",err,error,*999)
9849 CALL write_string_value(diagnostic_output_type,
" Field number = ",interpolation_parameters%FIELD%USER_NUMBER,err,error,*999)
9850 CALL write_string_value(diagnostic_output_type,
" Field variable number = ",interpolation_parameters%FIELD_VARIABLE% &
9851 & variable_number,err,error,*999)
9852 CALL write_string_value(diagnostic_output_type,
" Line number = ",line_number,err,error,*999)
9853 CALL write_string_value(diagnostic_output_type,
" Number of components = ",interpolation_parameters%FIELD_VARIABLE% &
9854 & number_of_components,err,error,*999)
9855 DO component_idx=1,interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
9856 CALL write_string_value(diagnostic_output_type,
" Component = ",component_idx,err,error,*999)
9857 CALL write_string_value(diagnostic_output_type,
" Number of parameters = ",interpolation_parameters% &
9858 & number_of_parameters(component_idx),err,error,*999)
9859 CALL write_string_vector(diagnostic_output_type,1,1,interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx),4,4, &
9860 & interpolation_parameters%SCALE_FACTORS(:,component_idx),
'(" Scale factors :",4(X,E13.6))',
'(21X,4(X,E13.6))', &
9865 exits(
"Field_InterpolationParametersScaleFactorsLineGet")
9867 999 errors(
"Field_InterpolationParametersScaleFactorsLineGet",err,error)
9868 exits(
"Field_InterpolationParametersScaleFactorsLineGet")
9871 END SUBROUTINE field_interpolationparametersscalefactorslineget
9878 SUBROUTINE field_interpolationparametersscalefactorsfaceget(FACE_NUMBER,INTERPOLATION_PARAMETERS,ERR,ERROR,*)
9881 INTEGER(INTG),
INTENT(IN) :: face_number
9882 TYPE(field_interpolation_parameters_type),
POINTER :: interpolation_parameters
9883 INTEGER(INTG),
INTENT(OUT) :: err
9884 TYPE(varying_string),
INTENT(OUT) :: error
9886 INTEGER(INTG) :: component_idx,mk,nk,nn,np,ns,ny,scaling_idx,nv
9887 REAL(DP),
POINTER :: scale_factors(:)
9888 TYPE(basis_type),
POINTER :: basis
9889 TYPE(domain_faces_type),
POINTER :: faces_topology
9890 TYPE(domain_nodes_type),
POINTER :: nodes_topology
9891 TYPE(varying_string) :: local_error
9893 enters(
"Field_InterpolationParametersScaleFactorsFaceGet",err,error,*999)
9895 IF(
ASSOCIATED(interpolation_parameters))
THEN 9896 SELECT CASE(interpolation_parameters%FIELD%SCALINGS%SCALING_TYPE)
9897 CASE(field_no_scaling)
9898 CALL flagerror(
"Can not scale factors for a field with no scaling.",err,error,*999)
9899 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
9900 DO component_idx=1,interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
9901 faces_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%FACES
9902 IF(face_number>0.AND.face_number<=faces_topology%NUMBER_OF_FACES)
THEN 9903 basis=>faces_topology%FACES(face_number)%BASIS
9904 interpolation_parameters%BASES(component_idx)%PTR=>basis
9905 IF(component_idx==1)
THEN 9906 interpolation_parameters%NUMBER_OF_XI=basis%NUMBER_OF_XI
9908 IF(basis%NUMBER_OF_XI/=interpolation_parameters%NUMBER_OF_XI) &
9909 &
CALL flagerror(
"Inconsistent number of xi directions???",err,error,*999)
9911 SELECT CASE(interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%INTERPOLATION_TYPE)
9912 CASE(field_constant_interpolation)
9913 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9914 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9915 CASE(field_element_based_interpolation)
9916 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9917 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9918 CASE(field_node_based_interpolation)
9919 nodes_topology=>interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY%NODES
9920 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=basis%NUMBER_OF_ELEMENT_PARAMETERS
9921 scaling_idx=interpolation_parameters%FIELD_VARIABLE%COMPONENTS(component_idx)%SCALING_INDEX
9922 NULLIFY(scale_factors)
9923 CALL distributed_vector_data_get(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
9924 & scale_factors,scale_factors,err,error,*999)
9925 DO nn=1,basis%NUMBER_OF_NODES
9926 np=faces_topology%FACES(face_number)%NODES_IN_FACE(nn)
9927 DO mk=1,basis%NUMBER_OF_DERIVATIVES(nn)
9928 nk=faces_topology%FACES(face_number)%DERIVATIVES_IN_FACE(1,mk,nn)
9929 nv=faces_topology%FACES(face_number)%DERIVATIVES_IN_FACE(2,mk,nn)
9930 ns=basis%ELEMENT_PARAMETER_INDEX(mk,nn)
9931 ny=nodes_topology%NODES(np)%DERIVATIVES(nk)%DOF_INDEX(nv)
9932 interpolation_parameters%SCALE_FACTORS(ns,component_idx)=scale_factors(ny)
9935 CALL distributed_vector_data_restore(interpolation_parameters%FIELD%SCALINGS%SCALINGS(scaling_idx)% &
9936 & scale_factors,scale_factors,err,error,*999)
9937 CASE(field_grid_point_based_interpolation)
9938 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9939 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9940 CASE(field_gauss_point_based_interpolation)
9941 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9942 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9943 CASE(field_data_point_based_interpolation)
9944 interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx)=1
9945 interpolation_parameters%PARAMETERS(1,component_idx)=1.0_dp
9947 local_error=
"The interpolation type of "//trim(number_to_vstring(interpolation_parameters%FIELD_VARIABLE% &
9948 & components(component_idx)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
9949 & trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
9950 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9951 CALL flagerror(local_error,err,error,*999)
9954 local_error=
"The face number of "//trim(number_to_vstring(face_number,
"*",err,error))// &
9955 &
" is invalid. The number must be between 1 and "// &
9956 & trim(number_to_vstring(faces_topology%NUMBER_OF_FACES,
"*",err,error))// &
9957 &
" for component number "//trim(number_to_vstring(component_idx,
"*",err,error))//
" of field number "// &
9958 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9959 CALL flagerror(local_error,err,error,*999)
9962 CASE(field_arc_length_scaling)
9963 CALL flagerror(
"Not implemented.",err,error,*999)
9965 local_error=
"The scaling type of "//trim(number_to_vstring(interpolation_parameters%FIELD%SCALINGS% &
9966 & scaling_type,
"*",err,error))//
" is invalid for field number "// &
9967 & trim(number_to_vstring(interpolation_parameters%FIELD%USER_NUMBER,
"*",err,error))//
"." 9968 CALL flagerror(local_error,err,error,*999)
9971 CALL flagerror(
"Interpolation parameters is not associated.",err,error,*999)
9974 IF(diagnostics1)
THEN 9975 CALL write_string(diagnostic_output_type,
"Interpolation scale factors:",err,error,*999)
9976 CALL write_string_value(diagnostic_output_type,
" Field number = ",interpolation_parameters%FIELD%USER_NUMBER,err,error,*999)
9977 CALL write_string_value(diagnostic_output_type,
" Field variable number = ",interpolation_parameters%FIELD_VARIABLE% &
9978 & variable_number,err,error,*999)
9979 CALL write_string_value(diagnostic_output_type,
" Face number = ",face_number,err,error,*999)
9980 CALL write_string_value(diagnostic_output_type,
" Number of components = ",interpolation_parameters%FIELD_VARIABLE% &
9981 & number_of_components,err,error,*999)
9982 DO component_idx=1,interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
9983 CALL write_string_value(diagnostic_output_type,
" Component = ",component_idx,err,error,*999)
9984 CALL write_string_value(diagnostic_output_type,
" Number of parameters = ",interpolation_parameters% &
9985 & number_of_parameters(component_idx),err,error,*999)
9986 CALL write_string_vector(diagnostic_output_type,1,1,interpolation_parameters%NUMBER_OF_PARAMETERS(component_idx),4,4, &
9987 & interpolation_parameters%SCALE_FACTORS(:,component_idx),
'(" Scale factors :",4(X,E13.6))',
'(21X,4(X,E13.6))', &
9992 exits(
"Field_InterpolationParametersScaleFactorsFaceGet")
9994 999 errors(
"Field_InterpolationParametersScaleFactorsFaceGet",err,error)
9995 exits(
"Field_InterpolationParametersScaleFactorsFaceGet")
9998 END SUBROUTINE field_interpolationparametersscalefactorsfaceget
10005 SUBROUTINE field_physical_point_finalise(PHYSICAL_POINT,ERR,ERROR,*)
10008 TYPE(field_physical_point_type),
POINTER :: physical_point
10009 INTEGER(INTG),
INTENT(OUT) :: err
10010 TYPE(varying_string),
INTENT(OUT) :: error
10013 enters(
"FIELD_PHYSICAL_POINT_FINALISE",err,error,*999)
10015 IF(
ASSOCIATED(physical_point))
THEN 10016 IF(
ALLOCATED(physical_point%VALUES))
DEALLOCATE(physical_point%VALUES)
10017 DEALLOCATE(physical_point)
10020 exits(
"FIELD_PHYSICAL_POINT_FINALISE")
10022 999 errorsexits(
"FIELD_PHYSICAL_POINT_FINALISE",err,error)
10024 END SUBROUTINE field_physical_point_finalise
10031 SUBROUTINE field_physical_point_initialise(FIELD_INTERPOLATED_POINT,GEOMETRIC_INTERPOLATED_POINT,PHYSICAL_POINT, &
10035 TYPE(field_interpolated_point_type),
POINTER :: field_interpolated_point
10036 TYPE(field_interpolated_point_type),
POINTER :: geometric_interpolated_point
10037 TYPE(field_physical_point_type),
POINTER :: physical_point
10038 INTEGER(INTG),
INTENT(OUT) :: err
10039 TYPE(varying_string),
INTENT(OUT) :: error
10041 INTEGER(INTG) :: dummy_err
10042 TYPE(field_type),
POINTER :: field,geometric_field
10043 TYPE(field_interpolation_parameters_type),
POINTER :: field_interpolation_parameters,geometric_interpolation_parameters
10044 TYPE(varying_string) :: dummy_error
10046 enters(
"FIELD_PHYSICAL_POINT_INITIALISE",err,error,*999)
10048 IF(
ASSOCIATED(field_interpolated_point))
THEN 10049 IF(
ASSOCIATED(geometric_interpolated_point))
THEN 10050 field_interpolation_parameters=>field_interpolated_point%INTERPOLATION_PARAMETERS
10051 IF(
ASSOCIATED(field_interpolation_parameters))
THEN 10052 geometric_interpolation_parameters=>geometric_interpolated_point%INTERPOLATION_PARAMETERS
10053 IF(
ASSOCIATED(geometric_interpolation_parameters))
THEN 10054 field=>field_interpolation_parameters%FIELD
10055 IF(
ASSOCIATED(field))
THEN 10056 geometric_field=>geometric_interpolation_parameters%FIELD
10057 IF(
ASSOCIATED(geometric_field))
THEN 10058 IF(
ASSOCIATED(field%GEOMETRIC_FIELD,geometric_field))
THEN 10059 IF(
ASSOCIATED(physical_point))
THEN 10060 CALL flagerror(
"Physical point is already associated.",err,error,*998)
10062 ALLOCATE(physical_point,stat=err)
10063 IF(err/=0)
CALL flagerror(
"Could not allocate physical point",err,error,*999)
10064 physical_point%FIELD_INTERPOLATED_POINT=>field_interpolated_point
10065 physical_point%GEOMETRIC_INTERPOLATED_POINT=>geometric_interpolated_point
10066 physical_point%PHYSICAL_DERIVATIVE_TYPE=0
10067 ALLOCATE(physical_point%VALUES(field_interpolation_parameters%FIELD_VARIABLE%NUMBER_OF_COMPONENTS),stat=err)
10068 IF(err/=0)
CALL flagerror(
"Could not allocate physical point values.",err,error,*999)
10069 physical_point%VALUES=0.0_dp
10072 CALL flagerror(
"The field geometric field and the specified geometric field are not associated.", &
10076 CALL flagerror(
"Geometric interpolation parameters field is not associated.",err,error,*999)
10079 CALL flagerror(
"Field interpolation parameters field is not associated.",err,error,*999)
10082 CALL flagerror(
"Geometric interpolated point interpolation parameters is not associated.",err,error,*999)
10085 CALL flagerror(
"Field interpolated point interpolation parameters is not associated.",err,error,*999)
10088 CALL flagerror(
"Geometric interpolated point is not associated.",err,error,*998)
10091 CALL flagerror(
"Field interpolated point is not associated.",err,error,*998)
10094 exits(
"FIELD_PHYSICAL_POINT_INITIALISE")
10096 999
CALL field_physical_point_finalise(physical_point,dummy_err,dummy_error,*998)
10097 998 errorsexits(
"FIELD_PHYSICAL_POINT_INITIALISE",err,error)
10100 END SUBROUTINE field_physical_point_initialise
10107 SUBROUTINE field_physical_points_finalise(PHYSICAL_POINTS,ERR,ERROR,*)
10110 TYPE(field_physical_point_ptr_type),
POINTER :: physical_points(:)
10111 INTEGER(INTG),
INTENT(OUT) :: err
10112 TYPE(varying_string),
INTENT(OUT) :: error
10114 INTEGER(INTG) :: var_type_idx
10116 enters(
"FIELD_PHYSICAL_POINTS_FINALISE",err,error,*999)
10118 IF(
ASSOCIATED(physical_points))
THEN 10119 DO var_type_idx=1,
SIZE(physical_points,1)
10120 CALL field_physical_point_finalise(physical_points(var_type_idx)%PTR,err,error,*999)
10122 DEALLOCATE(physical_points)
10125 exits(
"FIELD_PHYSICAL_POINTS_FINALISE")
10127 999 errorsexits(
"FIELD_PHYSICAL_POINTS_FINALISE",err,error)
10129 END SUBROUTINE field_physical_points_finalise
10136 SUBROUTINE field_physical_points_initialise(FIELD_INTERPOLATED_POINTS,GEOMETRIC_INTERPOLATED_POINTS, &
10137 & physical_points,err,error,*)
10140 TYPE(field_interpolated_point_ptr_type),
POINTER :: field_interpolated_points(:)
10141 TYPE(field_interpolated_point_ptr_type),
POINTER :: geometric_interpolated_points(:)
10142 TYPE(field_physical_point_ptr_type),
POINTER :: physical_points(:)
10143 INTEGER(INTG),
INTENT(OUT) :: err
10144 TYPE(varying_string),
INTENT(OUT) :: error
10146 INTEGER(INTG) :: dummy_err,var_type_idx
10147 TYPE(varying_string) :: dummy_error
10149 enters(
"FIELD_PHYSICAL_POINTS_INITIALISE",err,error,*998)
10151 IF(
ASSOCIATED(field_interpolated_points))
THEN 10152 IF(
ASSOCIATED(geometric_interpolated_points))
THEN 10153 IF(
ASSOCIATED(physical_points))
THEN 10154 CALL flagerror(
"Physical points is already associated.",err,error,*998)
10156 ALLOCATE(physical_points(field_number_of_variable_types),stat=err)
10157 IF(err/=0)
CALL flagerror(
"Could not allocate physical points.",err,error,*999)
10158 DO var_type_idx=1,field_number_of_variable_types
10160 NULLIFY(physical_points(var_type_idx)%PTR)
10161 IF(
ASSOCIATED(field_interpolated_points(var_type_idx)%PTR).AND. &
10162 &
ASSOCIATED(geometric_interpolated_points(var_type_idx)%PTR)) &
10163 &
CALL field_physical_point_initialise(field_interpolated_points(var_type_idx)%PTR, &
10164 & geometric_interpolated_points(var_type_idx)%PTR,physical_points(var_type_idx)%PTR,err,error,*999)
10168 CALL flagerror(
"Geometric interpolated points is not associated.",err,error,*998)
10171 CALL flagerror(
"Field interpolated points is not associated.",err,error,*998)
10174 exits(
"FIELD_PHYSICAL_POINTS_INITIALISE")
10176 999
CALL field_physical_points_finalise(physical_points,dummy_err,dummy_error,*998)
10177 998 errorsexits(
"FIELD_PHYSICAL_POINTS_INITIALISE",err,error)
10180 END SUBROUTINE field_physical_points_initialise
10187 SUBROUTINE field_mappings_calculate(FIELD,ERR,ERROR,*)
10190 TYPE(field_type),
POINTER :: field
10191 INTEGER(INTG),
INTENT(OUT) :: err
10192 TYPE(varying_string),
INTENT(OUT) :: error
10194 INTEGER(INTG) :: variable_idx,component_idx,domain_type_idx,variable_global_dofs_offset,number_of_global_variable_dofs, &
10195 & NUMBER_OF_CONSTANT_DOFS,NUMBER_OF_ELEMENT_DOFS,NUMBER_OF_NODE_DOFS,NUMBER_OF_GRID_POINT_DOFS,NUMBER_OF_GAUSS_POINT_DOFS, &
10196 & NUMBER_OF_LOCAL_VARIABLE_DOFS,TOTAL_NUMBER_OF_VARIABLE_DOFS,NUMBER_OF_DOMAINS,variable_global_ny, &
10197 & variable_local_ny,domain_idx,domain_no,constant_nyy,element_ny,element_nyy,node_ny,node_nyy,grid_point_nyy, &
10198 & Gauss_point_nyy,version_idx,derivative_idx,ny,NUMBER_OF_COMPUTATIONAL_NODES, &
10199 & my_computational_node_number,domain_type_stop,start_idx,stop_idx,element_idx,node_idx,NUMBER_OF_LOCAL, NGP, MAX_NGP, &
10200 & gp,MPI_IERROR,NUMBER_OF_GLOBAL_DOFS,gauss_point_idx,NUMBER_OF_DATA_POINT_DOFS,data_point_nyy,dataPointIdx,elementIdx, &
10201 & localDataNumber,globalElementNumber
10202 INTEGER(INTG),
ALLOCATABLE :: variable_local_dofs_offsets(:),variable_ghost_dofs_offsets(:), &
10203 & localDataParamCount(:),ghostDataParamCount(:)
10204 TYPE(decomposition_type),
POINTER :: decomposition
10205 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
10206 TYPE(domain_type),
POINTER :: domain
10207 TYPE(domain_mapping_type),
POINTER :: elementsmapping,dofs_mapping,field_variable_dofs_mapping
10208 TYPE(domain_topology_type),
POINTER :: domain_topology
10209 TYPE(field_variable_component_type),
POINTER :: field_component
10210 TYPE(varying_string) :: local_error
10211 TYPE(basis_type),
POINTER :: basis
10213 enters(
"FIELD_MAPPINGS_CALCULATE",err,error,*999)
10215 IF(
ASSOCIATED(field))
THEN 10216 number_of_computational_nodes=computational_nodes_number_get(err,error)
10217 IF(err/=0)
GOTO 999
10218 my_computational_node_number=computational_node_number_get(err,error)
10219 IF(err/=0)
GOTO 999
10222 DO variable_idx=1,field%NUMBER_OF_VARIABLES
10223 number_of_constant_dofs=0
10224 number_of_element_dofs=0
10225 number_of_node_dofs=0
10226 number_of_grid_point_dofs=0
10227 number_of_gauss_point_dofs=0
10228 number_of_data_point_dofs=0
10229 number_of_local_variable_dofs=0
10230 total_number_of_variable_dofs=0
10231 number_of_global_variable_dofs=0
10232 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
10233 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
10234 SELECT CASE(field_component%INTERPOLATION_TYPE)
10235 CASE(field_constant_interpolation)
10236 number_of_constant_dofs=number_of_constant_dofs+1
10237 number_of_local_variable_dofs=number_of_local_variable_dofs+1
10238 total_number_of_variable_dofs=total_number_of_variable_dofs+1
10239 number_of_global_variable_dofs=number_of_global_variable_dofs+1
10240 CASE(field_element_based_interpolation)
10241 domain=>field_component%DOMAIN
10242 domain_topology=>domain%TOPOLOGY
10243 number_of_element_dofs=number_of_element_dofs+domain_topology%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS
10244 number_of_local_variable_dofs=number_of_local_variable_dofs+domain_topology%ELEMENTS%NUMBER_OF_ELEMENTS
10245 total_number_of_variable_dofs=total_number_of_variable_dofs+domain_topology%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS
10246 number_of_global_variable_dofs=number_of_global_variable_dofs+domain_topology%ELEMENTS%NUMBER_OF_GLOBAL_ELEMENTS
10247 CASE(field_node_based_interpolation)
10248 domain=>field_component%DOMAIN
10249 domain_topology=>domain%TOPOLOGY
10250 number_of_node_dofs=number_of_node_dofs+domain_topology%DOFS%TOTAL_NUMBER_OF_DOFS
10251 number_of_local_variable_dofs=number_of_local_variable_dofs+domain_topology%DOFS%NUMBER_OF_DOFS
10252 total_number_of_variable_dofs=total_number_of_variable_dofs+domain_topology%DOFS%TOTAL_NUMBER_OF_DOFS
10253 number_of_global_variable_dofs=number_of_global_variable_dofs+domain_topology%DOFS%NUMBER_OF_GLOBAL_DOFS
10254 CASE(field_grid_point_based_interpolation)
10255 CALL flagerror(
"Not implemented.",err,error,*999)
10256 CASE(field_gauss_point_based_interpolation)
10257 domain=>field_component%DOMAIN
10258 domain_topology=>domain%TOPOLOGY
10260 DO element_idx=1,domain_topology%ELEMENTS%NUMBER_OF_ELEMENTS
10261 basis=>domain_topology%ELEMENTS%ELEMENTS(element_idx)%BASIS
10262 ngp=basis%QUADRATURE%QUADRATURE_SCHEME_MAP(basis_default_quadrature_scheme)%PTR%NUMBER_OF_GAUSS
10263 max_ngp=max(max_ngp,ngp)
10265 CALL mpi_allreduce(mpi_in_place,max_ngp,1,mpi_integer,mpi_max,mpi_comm_world,mpi_ierror)
10266 CALL mpi_error_check(
"MPI_ALLREDUCE",mpi_ierror,err,error,*999)
10267 number_of_gauss_point_dofs=number_of_gauss_point_dofs+domain_topology%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS*max_ngp
10268 number_of_local_variable_dofs=number_of_local_variable_dofs+domain_topology%ELEMENTS%NUMBER_OF_ELEMENTS*max_ngp
10269 total_number_of_variable_dofs=total_number_of_variable_dofs+domain_topology%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS*max_ngp
10270 number_of_global_variable_dofs=number_of_global_variable_dofs+domain_topology%ELEMENTS%NUMBER_OF_GLOBAL_ELEMENTS*max_ngp
10271 CASE(field_data_point_based_interpolation)
10273 decompositiontopology=>field%DECOMPOSITION%TOPOLOGY
10274 number_of_data_point_dofs=number_of_data_point_dofs+decompositiontopology%dataPoints%totalNumberOfDataPoints
10275 number_of_local_variable_dofs=number_of_local_variable_dofs+decompositiontopology%dataPoints%numberOfDataPoints
10276 total_number_of_variable_dofs=total_number_of_variable_dofs+decompositiontopology% &
10277 & datapoints%totalNumberOfDataPoints
10278 number_of_global_variable_dofs=number_of_global_variable_dofs+decompositiontopology%dataPoints% &
10279 & numberofglobaldatapoints
10281 local_error=
"The interpolation type of "// &
10282 & trim(number_to_vstring(field%VARIABLES(variable_idx)%COMPONENTS(component_idx)%INTERPOLATION_TYPE, &
10283 &
"*",err,error))//
" is invalid for component number "//trim(number_to_vstring(component_idx,
"*",err,error))// &
10284 &
" of variable type "//trim(number_to_vstring(field%VARIABLES(variable_idx)%VARIABLE_TYPE,
"*",err,error))//
"." 10285 CALL flagerror(local_error,err,error,*999)
10289 field%VARIABLES(variable_idx)%NUMBER_OF_DOFS=number_of_local_variable_dofs
10290 field%VARIABLES(variable_idx)%TOTAL_NUMBER_OF_DOFS=total_number_of_variable_dofs
10291 field%VARIABLES(variable_idx)%NUMBER_OF_GLOBAL_DOFS=number_of_global_variable_dofs
10292 ALLOCATE(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,total_number_of_variable_dofs),stat=err)
10293 IF(err/=0)
CALL flagerror(
"Could not allocate dof to parameter map.",err,error,*999)
10294 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_DOFS=total_number_of_variable_dofs
10295 IF(number_of_constant_dofs>0)
THEN 10296 ALLOCATE(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%CONSTANT_DOF2PARAM_MAP(number_of_constant_dofs),stat=err)
10297 IF(err/=0)
CALL flagerror(
"Could not allocate dof to parameter constant map.",err,error,*999)
10298 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_CONSTANT_DOFS=number_of_constant_dofs
10300 IF(number_of_element_dofs>0)
THEN 10301 ALLOCATE(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%ELEMENT_DOF2PARAM_MAP(2,number_of_element_dofs),stat=err)
10302 IF(err/=0)
CALL flagerror(
"Could not allocate dof to parameter element map.",err,error,*999)
10303 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_ELEMENT_DOFS=number_of_element_dofs
10305 IF(number_of_node_dofs>0)
THEN 10306 ALLOCATE(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NODE_DOF2PARAM_MAP(4,number_of_node_dofs),stat=err)
10307 IF(err/=0)
CALL flagerror(
"Could not allocate dof to parameter node map.",err,error,*999)
10308 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_NODE_DOFS=number_of_node_dofs
10310 IF(number_of_grid_point_dofs>0)
THEN 10311 ALLOCATE(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%GRID_POINT_DOF2PARAM_MAP(2,number_of_grid_point_dofs),stat=err)
10312 IF(err/=0)
CALL flagerror(
"Could not allocate dof to parameter grid point map.",err,error,*999)
10313 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_GRID_POINT_DOFS=number_of_grid_point_dofs
10315 IF(number_of_gauss_point_dofs>0)
THEN 10316 ALLOCATE(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%GAUSS_POINT_DOF2PARAM_MAP(3,number_of_gauss_point_dofs),stat=err)
10317 IF(err/=0)
CALL flagerror(
"Could not allocate dof to parameter Gauss point map.",err,error,*999)
10318 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_GAUSS_POINT_DOFS=number_of_gauss_point_dofs
10320 IF(number_of_data_point_dofs>0)
THEN 10321 ALLOCATE(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DATA_POINT_DOF2PARAM_MAP(3,number_of_data_point_dofs),stat=err)
10322 IF(err/=0)
CALL flagerror(
"Could not allocate dof to parameter Gauss point map.",err,error,*999)
10323 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_DATA_POINT_DOFS=number_of_data_point_dofs
10327 decomposition=>field%DECOMPOSITION
10328 ALLOCATE(variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1),stat=err)
10329 IF(err/=0)
CALL flagerror(
"Could not allocate variable local dofs offsets.",err,error,*999)
10330 ALLOCATE(variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1),stat=err)
10331 IF(err/=0)
CALL flagerror(
"Could not allocate variable ghost dofs offsets.",err,error,*999)
10334 IF(number_of_computational_nodes==1)
THEN 10340 DO variable_idx=1,field%NUMBER_OF_VARIABLES
10347 variable_local_ny=0
10348 field_variable_dofs_mapping=>field%VARIABLES(variable_idx)%DOMAIN_MAPPING
10349 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10350 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(field%VARIABLES(variable_idx)%NUMBER_OF_GLOBAL_DOFS),stat=err)
10351 IF(err/=0)
CALL flagerror(
"Could not allocate variable dofs mapping global to local map.",err,error,*999)
10352 field_variable_dofs_mapping%NUMBER_OF_GLOBAL=field%VARIABLES(variable_idx)%NUMBER_OF_GLOBAL_DOFS
10360 SELECT CASE(field%VARIABLES(variable_idx)%DOF_ORDER_TYPE)
10361 CASE(field_separated_component_dof_order)
10363 variable_ghost_dofs_offsets=0
10364 DO domain_type_idx=1,domain_type_stop
10365 variable_global_dofs_offset=0
10366 variable_local_dofs_offsets=0
10367 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
10369 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
10370 SELECT CASE(field_component%INTERPOLATION_TYPE)
10371 CASE(field_constant_interpolation)
10373 IF(domain_type_idx==1)
THEN 10374 variable_local_ny=variable_local_ny+1
10376 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10377 variable_global_ny=1+variable_global_dofs_offset
10378 CALL domain_mappings_mapping_global_initialise(field_variable_dofs_mapping% &
10379 & global_to_local_map(variable_global_ny),err,error,*999)
10380 number_of_domains=number_of_computational_nodes
10381 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(number_of_domains), &
10383 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local number.", &
10385 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(number_of_domains), &
10387 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
10389 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(number_of_domains), &
10391 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local type.", &
10394 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS=number_of_domains
10395 DO domain_idx=1,number_of_domains
10396 domain_no=domain_idx-1
10397 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10398 & 1+variable_local_dofs_offsets(domain_no)
10399 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)=domain_no
10400 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)= &
10401 & domain_local_internal
10404 constant_nyy=constant_nyy+1
10406 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(1,variable_local_ny)=field_constant_dof_type
10407 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,variable_local_ny)=constant_nyy
10408 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%CONSTANT_DOF2PARAM_MAP(constant_nyy)=component_idx
10410 field_component%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS=1
10411 field_component%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP=variable_local_ny
10413 variable_global_dofs_offset=variable_global_dofs_offset+1
10414 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10415 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+1
10417 CASE(field_element_based_interpolation)
10418 domain=>field_component%DOMAIN
10419 domain_topology=>domain%TOPOLOGY
10420 elementsmapping=>domain%MAPPINGS%ELEMENTS
10421 IF(domain_type_idx==1)
THEN 10423 dofs_mapping=>domain%MAPPINGS%ELEMENTS
10424 ALLOCATE(field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS(domain_topology%ELEMENTS% &
10425 & total_number_of_elements),stat=err)
10426 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof element map.",err,error,*999)
10427 field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS= &
10428 & domain_topology%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS
10430 DO ny=1,elementsmapping%NUMBER_OF_GLOBAL
10432 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10433 variable_global_ny=ny+variable_global_dofs_offset
10434 CALL domain_mappings_mapping_global_initialise(field_variable_dofs_mapping% &
10435 & global_to_local_map(variable_global_ny),err,error,*999)
10436 number_of_domains=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%NUMBER_OF_DOMAINS
10437 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
10438 & local_number(number_of_domains),stat=err)
10439 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local number.", &
10441 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
10442 & domain_number(number_of_domains),stat=err)
10443 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
10445 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(number_of_domains), &
10447 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local type.", &
10449 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS=number_of_domains
10450 DO domain_idx=1,number_of_domains
10451 domain_no=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
10452 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10453 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_NUMBER(domain_idx)+variable_local_dofs_offsets(domain_no)
10454 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)= &
10455 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
10456 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)= &
10457 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_TYPE(domain_idx)
10462 stop_idx=elementsmapping%NUMBER_OF_LOCAL
10464 IF(component_idx>1) &
10465 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10466 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+elementsmapping%NUMBER_OF_DOMAIN_LOCAL
10467 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10468 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+ &
10469 & elementsmapping%NUMBER_OF_DOMAIN_LOCAL+elementsmapping%NUMBER_OF_DOMAIN_GHOST
10474 IF(component_idx>1) &
10475 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10476 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)-elementsmapping%NUMBER_OF_DOMAIN_LOCAL
10477 DO ny=1,elementsmapping%NUMBER_OF_GLOBAL
10479 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10480 variable_global_ny=ny+variable_global_dofs_offset
10481 number_of_domains=field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS
10482 DO domain_idx=1,number_of_domains
10483 domain_no=field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)
10484 IF(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)== &
10485 & domain_local_ghost)
THEN 10486 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10487 & field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)+ &
10488 & variable_ghost_dofs_offsets(domain_no)
10490 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10491 & field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)+ &
10492 & variable_local_dofs_offsets(domain_no)
10497 start_idx=elementsmapping%NUMBER_OF_LOCAL+1
10498 stop_idx=elementsmapping%TOTAL_NUMBER_OF_LOCAL
10500 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10501 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)-elementsmapping%NUMBER_OF_DOMAIN_GHOST
10504 variable_global_dofs_offset=variable_global_dofs_offset+elementsmapping%NUMBER_OF_GLOBAL
10506 DO element_idx=start_idx,stop_idx
10507 variable_local_ny=variable_local_ny+1
10508 element_nyy=element_nyy+1
10510 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(1,variable_local_ny)=field_element_dof_type
10511 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,variable_local_ny)=element_nyy
10512 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%ELEMENT_DOF2PARAM_MAP(1,element_nyy)=element_idx
10513 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%ELEMENT_DOF2PARAM_MAP(2,element_nyy)=component_idx
10515 field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS(element_idx)=variable_local_ny
10517 CASE(field_node_based_interpolation)
10518 domain=>field_component%DOMAIN
10519 domain_topology=>domain%TOPOLOGY
10520 dofs_mapping=>domain%MAPPINGS%DOFS
10521 IF(domain_type_idx==1)
THEN 10522 ALLOCATE(field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES( &
10523 domain_topology%NODES%TOTAL_NUMBER_OF_NODES),stat=err)
10524 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof node map (nodes).",err,error,*999)
10525 field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS = &
10526 & domain_topology%NODES%TOTAL_NUMBER_OF_NODES
10528 DO node_idx=1,domain_topology%NODES%TOTAL_NUMBER_OF_NODES
10529 ALLOCATE(field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%DERIVATIVES( &
10530 & domain_topology%NODES%NODES(node_idx)%NUMBER_OF_DERIVATIVES),stat=err)
10531 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof node map (derivatives).", &
10533 field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%NUMBER_OF_DERIVATIVES = &
10534 & domain_topology%NODES%NODES(node_idx)%NUMBER_OF_DERIVATIVES
10535 DO derivative_idx=1,domain_topology%NODES%NODES(node_idx)%NUMBER_OF_DERIVATIVES
10536 ALLOCATE(field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%DERIVATIVES(derivative_idx)% &
10537 & versions(domain_topology%NODES%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions),stat=err)
10538 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof node map (versions).", &
10540 field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%DERIVATIVES(derivative_idx)% &
10541 & number_of_versions = domain_topology%NODES%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
10544 DO ny=1,dofs_mapping%NUMBER_OF_GLOBAL
10546 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10547 variable_global_ny=ny+variable_global_dofs_offset
10548 CALL domain_mappings_mapping_global_initialise(field_variable_dofs_mapping% &
10549 & global_to_local_map(variable_global_ny),err,error,*999)
10550 number_of_domains=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%NUMBER_OF_DOMAINS
10551 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
10552 & local_number(number_of_domains),stat=err)
10553 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local number.", &
10555 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
10556 & domain_number(number_of_domains),stat=err)
10557 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
10559 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(number_of_domains), &
10561 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local type.", &
10563 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS=number_of_domains
10564 DO domain_idx=1,number_of_domains
10565 domain_no=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
10566 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10567 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_NUMBER(domain_idx)+variable_local_dofs_offsets(domain_no)
10568 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)= &
10569 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
10570 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)= &
10571 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_TYPE(domain_idx)
10576 stop_idx=dofs_mapping%NUMBER_OF_LOCAL
10578 IF(component_idx>1) &
10579 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10580 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+dofs_mapping%NUMBER_OF_DOMAIN_LOCAL
10581 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10582 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+ &
10583 & dofs_mapping%NUMBER_OF_DOMAIN_LOCAL+dofs_mapping%NUMBER_OF_DOMAIN_GHOST
10588 IF(component_idx>1) &
10589 variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10590 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)-dofs_mapping%NUMBER_OF_DOMAIN_LOCAL
10591 DO ny=1,dofs_mapping%NUMBER_OF_GLOBAL
10593 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10594 variable_global_ny=ny+variable_global_dofs_offset
10595 number_of_domains=field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS
10596 DO domain_idx=1,number_of_domains
10597 domain_no=field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)
10598 IF(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)== &
10599 & domain_local_ghost)
THEN 10600 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10601 & field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)+ &
10602 & variable_ghost_dofs_offsets(domain_no)
10604 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10605 & field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)+ &
10606 & variable_local_dofs_offsets(domain_no)
10611 start_idx=dofs_mapping%NUMBER_OF_LOCAL+1
10612 stop_idx=dofs_mapping%TOTAL_NUMBER_OF_LOCAL
10614 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10615 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)-dofs_mapping%NUMBER_OF_DOMAIN_GHOST
10618 variable_global_dofs_offset=variable_global_dofs_offset+dofs_mapping%NUMBER_OF_GLOBAL
10620 DO ny=start_idx,stop_idx
10621 variable_local_ny=variable_local_ny+1
10622 node_nyy=node_nyy+1
10623 version_idx=domain%TOPOLOGY%DOFS%DOF_INDEX(1,ny)
10624 derivative_idx=domain%TOPOLOGY%DOFS%DOF_INDEX(2,ny)
10625 node_idx=domain%TOPOLOGY%DOFS%DOF_INDEX(3,ny)
10627 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(1,variable_local_ny)=field_node_dof_type
10628 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,variable_local_ny)=node_nyy
10629 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NODE_DOF2PARAM_MAP(1,node_nyy)=version_idx
10630 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NODE_DOF2PARAM_MAP(2,node_nyy)=derivative_idx
10631 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NODE_DOF2PARAM_MAP(3,node_nyy)=node_idx
10632 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NODE_DOF2PARAM_MAP(4,node_nyy)=component_idx
10634 field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%DERIVATIVES(derivative_idx)% &
10635 & versions(version_idx) = variable_local_ny
10637 CASE(field_grid_point_based_interpolation)
10638 CALL flagerror(
"Not implemented.",err,error,*999)
10639 CASE(field_gauss_point_based_interpolation)
10640 domain=>field_component%DOMAIN
10641 elementsmapping=>domain%MAPPINGS%ELEMENTS
10642 domain_topology=>domain%TOPOLOGY
10643 IF(domain_type_idx==1)
THEN 10645 dofs_mapping=>domain%MAPPINGS%ELEMENTS
10647 ALLOCATE(field_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(&
10648 & max_ngp,domain_topology%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS),stat=err)
10649 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof Gauss point map.",err,error,*999)
10651 field_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%NUMBER_OF_GAUSS_POINT_PARAMETERS= &
10652 & domain_topology%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS*max_ngp
10654 DO ny=1,elementsmapping%NUMBER_OF_GLOBAL
10657 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10658 variable_global_ny= (ny-1) * max_ngp + gp + variable_global_dofs_offset
10659 CALL domain_mappings_mapping_global_initialise(field_variable_dofs_mapping% &
10660 & global_to_local_map(variable_global_ny),err,error,*999)
10661 number_of_domains=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%NUMBER_OF_DOMAINS
10662 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
10663 & local_number(number_of_domains),stat=err)
10664 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local number.", &
10666 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
10667 & domain_number(number_of_domains),stat=err)
10668 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
10670 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(number_of_domains), &
10672 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
10674 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS=number_of_domains
10675 DO domain_idx=1,number_of_domains
10676 domain_no=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
10678 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10679 & (dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_NUMBER(domain_idx) - 1) * max_ngp + gp &
10680 & + variable_local_dofs_offsets(domain_no)
10682 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)= &
10683 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
10684 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)= &
10685 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_TYPE(domain_idx)
10691 stop_idx=elementsmapping%NUMBER_OF_LOCAL
10693 IF(component_idx>1) &
10694 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10695 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+ &
10696 & elementsmapping%NUMBER_OF_DOMAIN_LOCAL*max_ngp
10697 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10698 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+ &
10699 & (elementsmapping%NUMBER_OF_DOMAIN_LOCAL+elementsmapping%NUMBER_OF_DOMAIN_GHOST)*max_ngp
10704 IF(component_idx>1) &
10705 variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10706 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)- &
10707 & elementsmapping%NUMBER_OF_DOMAIN_LOCAL*max_ngp
10708 DO ny=1,elementsmapping%NUMBER_OF_GLOBAL
10711 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10712 variable_global_ny= (ny-1) * max_ngp + gp + variable_global_dofs_offset
10713 number_of_domains=field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS
10714 DO domain_idx=1,number_of_domains
10715 domain_no=field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)
10716 IF(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)== &
10717 & domain_local_ghost)
THEN 10718 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10719 & field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)+ &
10720 & variable_ghost_dofs_offsets(domain_no)
10722 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10723 & field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)+ &
10724 & variable_local_dofs_offsets(domain_no)
10730 start_idx=elementsmapping%NUMBER_OF_LOCAL+1
10731 stop_idx=elementsmapping%TOTAL_NUMBER_OF_LOCAL
10733 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10734 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)- &
10735 & elementsmapping%NUMBER_OF_DOMAIN_GHOST*max_ngp
10738 variable_global_dofs_offset=variable_global_dofs_offset+elementsmapping%NUMBER_OF_GLOBAL*max_ngp
10740 DO element_idx=start_idx,stop_idx
10742 variable_local_ny= variable_local_ny+1
10743 gauss_point_nyy = gauss_point_nyy+1
10745 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(1,variable_local_ny)=field_gauss_point_dof_type
10746 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,variable_local_ny)=gauss_point_nyy
10747 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%GAUSS_POINT_DOF2PARAM_MAP(1,gauss_point_nyy)=gp
10748 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%GAUSS_POINT_DOF2PARAM_MAP(2,gauss_point_nyy)=element_idx
10749 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%GAUSS_POINT_DOF2PARAM_MAP(3,gauss_point_nyy)=component_idx
10751 field_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gp,element_idx)=variable_local_ny
10754 CASE(field_data_point_based_interpolation)
10755 domain=>field_component%DOMAIN
10756 elementsmapping=>domain%MAPPINGS%ELEMENTS
10757 decompositiontopology=>domain%DECOMPOSITION%TOPOLOGY
10758 IF(domain_type_idx==1)
THEN 10761 ALLOCATE(field_component%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP%DATA_POINTS(decompositiontopology% &
10762 & datapoints%totalNumberOfDataPoints),stat=err)
10763 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof data point map.",err,error,*999)
10765 field_component%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP%NUMBER_OF_DATA_POINT_PARAMETERS= &
10766 & decompositiontopology%dataPoints%totalNumberOfDataPoints
10767 ALLOCATE(localdataparamcount(0:decomposition%NUMBER_OF_DOMAINS-1),stat=err)
10768 IF(err/=0)
CALL flagerror(
"Could not allocate data point parameter local count.",err,error,*999)
10769 ALLOCATE(ghostdataparamcount(0:decomposition%NUMBER_OF_DOMAINS-1),stat=err)
10770 IF(err/=0)
CALL flagerror(
"Could not allocate data point parameter ghost count.",err,error,*999)
10771 localdataparamcount=0
10772 ghostdataparamcount(0:decomposition%NUMBER_OF_DOMAINS-1)=decompositiontopology%dataPoints%numberOfDomainLocal
10774 variable_global_ny=variable_global_dofs_offset
10775 DO elementidx=1,elementsmapping%NUMBER_OF_GLOBAL
10776 DO datapointidx=1,decompositiontopology%dataPoints%numberOfelementDataPoints(elementidx)
10777 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10778 variable_global_ny=variable_global_ny+1
10779 CALL domain_mappings_mapping_global_initialise(field_variable_dofs_mapping% &
10780 & global_to_local_map(variable_global_ny),err,error,*999)
10781 number_of_domains=elementsmapping%GLOBAL_TO_LOCAL_MAP(elementidx)%NUMBER_OF_DOMAINS
10782 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
10783 & local_number(number_of_domains),stat=err)
10784 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local number.", &
10786 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
10787 & domain_number(number_of_domains),stat=err)
10788 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
10790 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
10791 & local_type(number_of_domains),stat=err)
10792 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local type.", &
10794 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS=number_of_domains
10795 DO domain_idx=1,number_of_domains
10796 domain_no=elementsmapping%GLOBAL_TO_LOCAL_MAP(elementidx)%DOMAIN_NUMBER(domain_idx)
10797 IF(elementsmapping%GLOBAL_TO_LOCAL_MAP(elementidx)%LOCAL_TYPE(domain_idx)== &
10798 & domain_local_ghost)
THEN 10799 ghostdataparamcount(domain_no)=ghostdataparamcount(domain_no)+1
10800 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10801 & ghostdataparamcount(domain_no)+variable_local_dofs_offsets(domain_no)
10803 localdataparamcount(domain_no)=localdataparamcount(domain_no)+1
10804 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10805 & localdataparamcount(domain_no)+variable_local_dofs_offsets(domain_no)
10807 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)= &
10808 & elementsmapping%GLOBAL_TO_LOCAL_MAP(elementidx)%DOMAIN_NUMBER(domain_idx)
10809 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)= &
10810 & elementsmapping%GLOBAL_TO_LOCAL_MAP(elementidx)%LOCAL_TYPE(domain_idx)
10815 IF(
ALLOCATED(localdataparamcount))
DEALLOCATE(localdataparamcount)
10816 IF(
ALLOCATED(ghostdataparamcount))
DEALLOCATE(ghostdataparamcount)
10818 stop_idx=elementsmapping%NUMBER_OF_LOCAL
10820 IF(component_idx>1)
THEN 10821 variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10822 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+ &
10823 & decompositiontopology%dataPoints%numberOfDomainLocal
10825 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10826 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+ &
10827 & decompositiontopology%dataPoints%numberOfDomainLocal+decompositiontopology%dataPoints%numberOfDomainGhost
10832 IF(component_idx>1)
THEN 10833 variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10834 & variable_ghost_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)- &
10835 & decompositiontopology%dataPoints%numberOfDomainLocal
10838 variable_global_ny=variable_global_dofs_offset
10839 DO elementidx=1,elementsmapping%NUMBER_OF_GLOBAL
10840 DO datapointidx=1,decompositiontopology%dataPoints%numberOfelementDataPoints(elementidx)
10841 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10842 variable_global_ny=variable_global_ny+1
10843 number_of_domains=elementsmapping%GLOBAL_TO_LOCAL_MAP(elementidx)%NUMBER_OF_DOMAINS
10844 DO domain_idx=1,number_of_domains
10845 domain_no=elementsmapping%GLOBAL_TO_LOCAL_MAP(elementidx)%DOMAIN_NUMBER(domain_idx)
10846 IF(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)== &
10847 & domain_local_ghost)
THEN 10848 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10849 & field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)+ &
10850 & variable_ghost_dofs_offsets(domain_no)
10852 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10853 & field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)+ &
10854 & variable_local_dofs_offsets(domain_no)
10861 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10862 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)- &
10863 & decompositiontopology%dataPoints%numberOfDomainGhost
10864 start_idx=elementsmapping%NUMBER_OF_LOCAL+1
10865 stop_idx=elementsmapping%TOTAL_NUMBER_OF_LOCAL
10868 variable_global_dofs_offset=variable_global_dofs_offset+decompositiontopology%dataPoints%&
10869 & numberofglobaldatapoints
10871 DO elementidx=start_idx,stop_idx
10872 globalelementnumber=elementsmapping%LOCAL_TO_GLOBAL_MAP(elementidx)
10873 DO datapointidx=1,decompositiontopology%dataPoints%numberOfelementDataPoints(globalelementnumber)
10874 variable_local_ny=variable_local_ny+1
10875 data_point_nyy=data_point_nyy+1
10876 localdatanumber=decompositiontopology%dataPoints%elementDataPoint(elementidx)%dataIndices(datapointidx)% &
10879 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(1,variable_local_ny)=field_data_point_dof_type
10880 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,variable_local_ny)=data_point_nyy
10881 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DATA_POINT_DOF2PARAM_MAP(1,data_point_nyy)=localdatanumber
10882 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DATA_POINT_DOF2PARAM_MAP(2,data_point_nyy)=elementidx
10883 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DATA_POINT_DOF2PARAM_MAP(3,data_point_nyy)=component_idx
10885 field_component%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP%DATA_POINTS(localdatanumber)=variable_local_ny
10889 local_error=
"The interpolation type of "// &
10890 & trim(number_to_vstring(field%VARIABLES(variable_idx)%COMPONENTS(component_idx)%INTERPOLATION_TYPE, &
10891 &
"*",err,error))//
" is invalid for component number "//trim(number_to_vstring(component_idx,
"*",err,error))// &
10892 &
" of variable type "//trim(number_to_vstring(field%VARIABLES(variable_idx)%VARIABLE_TYPE,
"*",err,error))//
"." 10893 CALL flagerror(local_error,err,error,*999)
10897 CASE(field_contiguous_component_dof_order)
10900 variable_local_dofs_offsets=0
10901 variable_global_dofs_offset=0
10902 variable_ghost_dofs_offsets=0
10903 IF(field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS>=1)
THEN 10904 SELECT CASE(field%VARIABLES(variable_idx)%COMPONENTS(1)%INTERPOLATION_TYPE)
10905 CASE(field_constant_interpolation)
10906 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
10907 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
10908 variable_local_ny=1+variable_local_dofs_offsets(my_computational_node_number)
10910 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10911 variable_global_ny=1+variable_global_dofs_offset
10912 CALL domain_mappings_mapping_global_initialise(field_variable_dofs_mapping% &
10913 & global_to_local_map(variable_global_ny),err,error,*999)
10914 number_of_domains=number_of_computational_nodes
10915 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(number_of_domains), &
10917 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local number.", &
10919 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(number_of_domains), &
10921 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
10923 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(number_of_domains), &
10925 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local type.", &
10928 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS=number_of_domains
10929 DO domain_idx=1,number_of_domains
10930 domain_no=domain_idx-1
10931 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10932 & 1+variable_local_dofs_offsets(domain_no)
10933 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)=domain_no
10934 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)=domain_local_internal
10937 constant_nyy=constant_nyy+1
10939 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(1,variable_local_ny)=field_constant_dof_type
10940 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,variable_local_ny)=constant_nyy
10941 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%CONSTANT_DOF2PARAM_MAP(constant_nyy)=component_idx
10943 field_component%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS=1
10944 field_component%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP=variable_local_ny
10946 variable_global_dofs_offset=variable_global_dofs_offset+1
10947 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
10948 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+1
10950 CASE(field_element_based_interpolation)
10951 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
10952 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
10953 domain=>field_component%DOMAIN
10954 domain_topology=>domain%TOPOLOGY
10956 ALLOCATE(field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS(domain_topology%ELEMENTS% &
10957 & total_number_of_elements),stat=err)
10958 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof element map.",err,error,*999)
10959 field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS= &
10960 & domain_topology%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS
10964 DO ny=1,elementsmapping%NUMBER_OF_GLOBAL
10965 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
10966 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
10967 domain=>field_component%DOMAIN
10968 dofs_mapping=>domain%MAPPINGS%ELEMENTS
10970 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 10971 element_ny=element_ny+1
10972 variable_global_ny=element_ny+variable_global_dofs_offset
10973 CALL domain_mappings_mapping_global_initialise(field_variable_dofs_mapping% &
10974 & global_to_local_map(variable_global_ny),err,error,*999)
10975 number_of_domains=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%NUMBER_OF_DOMAINS
10976 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(number_of_domains), &
10978 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local number.", &
10980 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(number_of_domains), &
10982 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
10984 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(number_of_domains), &
10986 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local type.", &
10988 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS=number_of_domains
10989 DO domain_idx=1,number_of_domains
10990 domain_no=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
10991 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
10992 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_NUMBER(domain_idx)+variable_local_dofs_offsets(domain_no)
10993 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)= &
10994 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
10995 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)= &
10996 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_TYPE(domain_idx)
11002 DO domain_type_idx=1,domain_type_stop
11003 IF(domain_type_idx==1)
THEN 11005 stop_idx=elementsmapping%NUMBER_OF_LOCAL
11007 start_idx=elementsmapping%NUMBER_OF_LOCAL+1
11008 stop_idx=elementsmapping%TOTAL_NUMBER_OF_LOCAL
11012 DO element_idx=start_idx,stop_idx
11013 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
11014 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
11015 element_ny=element_ny+1
11016 variable_local_ny=element_ny+variable_local_dofs_offsets(my_computational_node_number)
11017 element_nyy=element_nyy+1
11019 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(1,variable_local_ny)=field_element_dof_type
11020 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,variable_local_ny)=element_nyy
11021 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%ELEMENT_DOF2PARAM_MAP(1,element_nyy)=element_idx
11022 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%ELEMENT_DOF2PARAM_MAP(2,element_nyy)=component_idx
11024 field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS(element_idx)=variable_local_ny
11028 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
11029 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+ &
11030 & field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS* &
11031 & elementsmapping%NUMBER_OF_DOMAIN_LOCAL
11032 IF(domain_type_idx==1)
THEN 11033 variable_global_dofs_offset=variable_global_dofs_offset+field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS* &
11034 & elementsmapping%NUMBER_OF_GLOBAL
11037 CASE(field_node_based_interpolation)
11038 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
11039 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
11040 domain=>field_component%DOMAIN
11041 domain_topology=>domain%TOPOLOGY
11042 ALLOCATE(field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(domain_topology%NODES%TOTAL_NUMBER_OF_NODES), &
11044 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof node map (nodes).",err,error,*999)
11045 field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS = &
11046 & domain_topology%NODES%TOTAL_NUMBER_OF_NODES
11048 DO node_idx=1,domain_topology%NODES%TOTAL_NUMBER_OF_NODES
11049 ALLOCATE(field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%DERIVATIVES( &
11050 & domain_topology%NODES%NODES(node_idx)%NUMBER_OF_DERIVATIVES),stat=err)
11051 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof node map (derivatives).", &
11053 field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%NUMBER_OF_DERIVATIVES = &
11054 & domain_topology%NODES%NODES(node_idx)%NUMBER_OF_DERIVATIVES
11055 DO derivative_idx=1,domain_topology%NODES%NODES(node_idx)%NUMBER_OF_DERIVATIVES
11056 ALLOCATE(field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%DERIVATIVES(derivative_idx)% &
11057 & versions(domain_topology%NODES%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions),stat=err)
11058 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof node map (versions).", &
11060 field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%DERIVATIVES(derivative_idx)% &
11061 number_of_versions = domain_topology%NODES%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
11069 number_of_global_dofs=field%VARIABLES(variable_idx)%COMPONENTS(1)%DOMAIN%MAPPINGS%DOFS%NUMBER_OF_GLOBAL
11070 DO ny=1,number_of_global_dofs
11071 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
11072 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
11073 domain=>field_component%DOMAIN
11074 dofs_mapping=>domain%MAPPINGS%DOFS
11076 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 11078 variable_global_ny=node_ny+variable_global_dofs_offset
11079 CALL domain_mappings_mapping_global_initialise(field_variable_dofs_mapping% &
11080 & global_to_local_map(variable_global_ny),err,error,*999)
11081 number_of_domains=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%NUMBER_OF_DOMAINS
11082 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
11083 & local_number(number_of_domains),stat=err)
11084 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local number.", &
11086 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
11087 & domain_number(number_of_domains),stat=err)
11088 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
11090 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(number_of_domains), &
11092 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local type.", &
11094 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS=number_of_domains
11095 DO domain_idx=1,number_of_domains
11096 domain_no=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
11097 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
11098 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_NUMBER(domain_idx)+variable_local_dofs_offsets(domain_no)
11099 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)= &
11100 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
11101 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)= &
11102 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_TYPE(domain_idx)
11108 DO domain_type_idx=1,domain_type_stop
11109 IF(domain_type_idx==1)
THEN 11111 stop_idx=dofs_mapping%NUMBER_OF_LOCAL
11113 start_idx=dofs_mapping%NUMBER_OF_LOCAL+1
11114 stop_idx=dofs_mapping%TOTAL_NUMBER_OF_LOCAL
11118 DO ny=start_idx,stop_idx
11119 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
11120 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
11121 domain=>field_component%DOMAIN
11123 variable_local_ny=node_ny+variable_local_dofs_offsets(my_computational_node_number)
11124 node_nyy=node_nyy+1
11125 version_idx=domain%TOPOLOGY%DOFS%DOF_INDEX(1,ny)
11126 derivative_idx=domain%TOPOLOGY%DOFS%DOF_INDEX(2,ny)
11127 node_idx=domain%TOPOLOGY%DOFS%DOF_INDEX(3,ny)
11129 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(1,variable_local_ny)=field_node_dof_type
11130 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,variable_local_ny)=node_nyy
11131 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NODE_DOF2PARAM_MAP(1,node_nyy)=version_idx
11132 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NODE_DOF2PARAM_MAP(2,node_nyy)=derivative_idx
11133 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NODE_DOF2PARAM_MAP(3,node_nyy)=node_idx
11134 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NODE_DOF2PARAM_MAP(4,node_nyy)=component_idx
11136 field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%DERIVATIVES(derivative_idx)% &
11137 & versions(version_idx) = variable_local_ny
11141 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
11142 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+ &
11143 & field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS* &
11144 & dofs_mapping%NUMBER_OF_DOMAIN_LOCAL
11145 IF(domain_type_idx==1)
THEN 11146 variable_global_dofs_offset=variable_global_dofs_offset+field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS* &
11147 & dofs_mapping%NUMBER_OF_GLOBAL
11150 CASE(field_grid_point_based_interpolation)
11151 CALL flagerror(
"Not implemented.",err,error,*999)
11152 CASE(field_gauss_point_based_interpolation)
11153 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
11154 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
11155 domain=>field_component%DOMAIN
11156 domain_topology=>domain%TOPOLOGY
11158 ALLOCATE(field_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(max_ngp,domain_topology% &
11159 & elements%TOTAL_NUMBER_OF_ELEMENTS),stat=err)
11160 IF(err/=0)
CALL flagerror(
"Could not allocate field component parameter to dof gauss point map (gauss points).", &
11162 field_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%NUMBER_OF_GAUSS_POINT_PARAMETERS= &
11163 & max_ngp*domain_topology%ELEMENTS%TOTAL_NUMBER_OF_ELEMENTS
11167 number_of_global_dofs=field%VARIABLES(variable_idx)%COMPONENTS(1)%DOMAIN%MAPPINGS%ELEMENTS%NUMBER_OF_GLOBAL
11168 DO ny=1,number_of_global_dofs
11169 DO gauss_point_idx=1,max_ngp
11170 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
11171 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
11172 domain=>field_component%DOMAIN
11173 dofs_mapping=>domain%MAPPINGS%ELEMENTS
11175 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 11176 element_ny=element_ny+1
11177 variable_global_ny=element_ny+variable_global_dofs_offset
11178 CALL domain_mappings_mapping_global_initialise(field_variable_dofs_mapping% &
11179 & global_to_local_map(variable_global_ny),err,error,*999)
11180 number_of_domains=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%NUMBER_OF_DOMAINS
11181 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
11182 & local_number(number_of_domains),stat=err)
11183 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local number.", &
11185 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)% &
11186 & domain_number(number_of_domains),stat=err)
11187 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map domain number.", &
11189 ALLOCATE(field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(number_of_domains), &
11191 IF(err/=0)
CALL flagerror(
"Could not allocate field variable dofs global to local map local type.", &
11193 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%NUMBER_OF_DOMAINS=number_of_domains
11194 DO domain_idx=1,number_of_domains
11195 domain_no=dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
11196 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_NUMBER(domain_idx)= &
11197 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_NUMBER(domain_idx)+variable_local_dofs_offsets(domain_no)
11198 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%DOMAIN_NUMBER(domain_idx)= &
11199 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%DOMAIN_NUMBER(domain_idx)
11200 field_variable_dofs_mapping%GLOBAL_TO_LOCAL_MAP(variable_global_ny)%LOCAL_TYPE(domain_idx)= &
11201 & dofs_mapping%GLOBAL_TO_LOCAL_MAP(ny)%LOCAL_TYPE(domain_idx)
11208 DO domain_type_idx=1,domain_type_stop
11209 IF(domain_type_idx==1)
THEN 11211 stop_idx=dofs_mapping%NUMBER_OF_LOCAL
11213 start_idx=dofs_mapping%NUMBER_OF_LOCAL+1
11214 stop_idx=dofs_mapping%TOTAL_NUMBER_OF_LOCAL
11218 DO ny=start_idx,stop_idx
11219 DO gauss_point_idx=1,max_ngp
11220 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
11221 field_component=>field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
11222 domain=>field_component%DOMAIN
11223 element_ny=element_ny+1
11224 variable_local_ny=element_ny+variable_local_dofs_offsets(my_computational_node_number)
11225 node_nyy=node_nyy+1
11227 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(1,variable_local_ny)=field_gauss_point_dof_type
11228 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%DOF_TYPE(2,variable_local_ny)=node_nyy
11229 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%GAUSS_POINT_DOF2PARAM_MAP(1,node_nyy)=gauss_point_idx
11230 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%GAUSS_POINT_DOF2PARAM_MAP(2,node_nyy)=ny
11231 field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%GAUSS_POINT_DOF2PARAM_MAP(3,node_nyy)=component_idx
11233 field_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_idx,ny)= &
11234 & variable_local_ny
11239 variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)= &
11240 & variable_local_dofs_offsets(0:decomposition%NUMBER_OF_DOMAINS-1)+ &
11241 & field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS* &
11242 & dofs_mapping%NUMBER_OF_DOMAIN_LOCAL*max_ngp
11243 IF(domain_type_idx==1)
THEN 11244 variable_global_dofs_offset=variable_global_dofs_offset+field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS* &
11245 & dofs_mapping%NUMBER_OF_GLOBAL*max_ngp
11248 CASE(field_data_point_based_interpolation)
11249 CALL flagerror(
"Not implemented.",err,error,*999)
11251 local_error=
"The interpolation type of "// &
11252 & trim(number_to_vstring(field%VARIABLES(variable_idx)%COMPONENTS(component_idx)%INTERPOLATION_TYPE, &
11253 &
"*",err,error))//
" is invalid for component number 1 of variable type "//trim(number_to_vstring( &
11254 & field%VARIABLES(variable_idx)%VARIABLE_TYPE,
"*",err,error))//
"." 11255 CALL flagerror(local_error,err,error,*999)
11258 CALL flagerror(
"The field must have at least one component.",err,error,*999)
11261 local_error=
"The DOF order type of "//trim(number_to_vstring(field%VARIABLES(variable_idx)%DOF_ORDER_TYPE, &
11262 &
"*",err,error))//
" is invalid for variable type "//trim(number_to_vstring(field%VARIABLES(variable_idx)% &
11263 & variable_type,
"*",err,error))//
"." 11264 CALL flagerror(local_error,err,error,*999)
11266 IF(
ASSOCIATED(field_variable_dofs_mapping))
THEN 11267 CALL domain_mappings_local_from_global_calculate(field_variable_dofs_mapping,err,error,*999)
11270 IF(
ALLOCATED(variable_local_dofs_offsets))
DEALLOCATE(variable_local_dofs_offsets)
11271 IF(
ALLOCATED(variable_ghost_dofs_offsets))
DEALLOCATE(variable_ghost_dofs_offsets)
11273 IF(diagnostics1)
THEN 11274 CALL write_string(diagnostic_output_type,
"Field DOF mappings:",err,error,*999)
11275 CALL write_string_value(diagnostic_output_type,
" Field user number = ",field%USER_NUMBER,err,error,*999)
11276 CALL write_string_value(diagnostic_output_type,
" Number of variables = ",field%NUMBER_OF_VARIABLES,err,error,*999)
11277 DO variable_idx=1,field%NUMBER_OF_VARIABLES
11278 CALL write_string_value(diagnostic_output_type,
" Variable : ",variable_idx,err,error,*999)
11279 CALL write_string_value(diagnostic_output_type,
" Variable type = ",field%VARIABLES(variable_idx)%VARIABLE_TYPE, &
11281 CALL write_string_value(diagnostic_output_type,
" Number of local DOFs = ",field%VARIABLES(variable_idx)% &
11282 & number_of_dofs,err,error,*999)
11283 CALL write_string_value(diagnostic_output_type,
" Total number of local DOFs = ",field%VARIABLES(variable_idx)% &
11284 & total_number_of_dofs,err,error,*999)
11285 CALL write_string_value(diagnostic_output_type,
" Number of global DOFs = ",field%VARIABLES(variable_idx)% &
11286 & number_of_global_dofs,err,error,*999)
11287 CALL write_string(diagnostic_output_type,
" DOF to parameter map:",err,error,*999)
11288 DO variable_local_ny=1,field%VARIABLES(variable_idx)%TOTAL_NUMBER_OF_DOFS
11289 CALL write_string_value(diagnostic_output_type,
" DOF : ",variable_local_ny,err,error,*999)
11290 CALL write_string_vector(diagnostic_output_type,1,1,2,2,2,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP% &
11291 & dof_type(:,variable_local_ny),
'(" DOF type :",2(X,I8))',
'(18X,2(X,I8))',err,error,*999)
11293 CALL write_string_value(diagnostic_output_type,
" Number of constant DOFs = ",field%VARIABLES(variable_idx)% &
11294 & dof_to_param_map%NUMBER_OF_CONSTANT_DOFS,err,error,*999)
11295 IF(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_CONSTANT_DOFS>0)
THEN 11296 CALL write_string(diagnostic_output_type,
" Constant DOFs:",err,error,*999)
11297 DO constant_nyy=1,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_CONSTANT_DOFS
11298 CALL write_string_value(diagnostic_output_type,
" Constant DOF : ",constant_nyy,err,error,*999)
11299 CALL write_string_fmt_value(diagnostic_output_type,
" DOF 2 Parameters : ", &
11300 & field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%CONSTANT_DOF2PARAM_MAP(constant_nyy),
'(I8)',err,error,*999)
11303 CALL write_string_value(diagnostic_output_type,
" Number of element DOFs = ",field%VARIABLES(variable_idx)% &
11304 & dof_to_param_map%NUMBER_OF_ELEMENT_DOFS,err,error,*999)
11305 IF(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_ELEMENT_DOFS>0)
THEN 11306 CALL write_string(diagnostic_output_type,
" Element DOFs:",err,error,*999)
11307 DO element_nyy=1,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_ELEMENT_DOFS
11308 CALL write_string_value(diagnostic_output_type,
" Element DOF : ",element_nyy,err,error,*999)
11309 CALL write_string_vector(diagnostic_output_type,1,1,2,2,2,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP% &
11310 & element_dof2param_map(:,element_nyy),
'(" DOF 2 Parameters :",2(X,I8))',
'(28X,2(X,I8))',err,error,*999)
11313 CALL write_string_value(diagnostic_output_type,
" Number of nodal DOFs = ",field%VARIABLES(variable_idx)% &
11314 & dof_to_param_map%NUMBER_OF_NODE_DOFS,err,error,*999)
11315 IF(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_NODE_DOFS>0)
THEN 11316 CALL write_string(diagnostic_output_type,
" Nodal DOFs:",err,error,*999)
11317 DO node_nyy=1,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_NODE_DOFS
11318 CALL write_string_value(diagnostic_output_type,
" Node DOF : ",node_nyy,err,error,*999)
11319 CALL write_string_vector(diagnostic_output_type,1,1,4,4,4,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP% &
11320 & node_dof2param_map(:,node_nyy),
'(" DOF 2 Parameters :",4(X,I8))',
'(28X,4(X,I8))',err,error,*999)
11323 CALL write_string_value(diagnostic_output_type,
" Number of grid point DOFs = ",field%VARIABLES(variable_idx)% &
11324 & dof_to_param_map%NUMBER_OF_GRID_POINT_DOFS,err,error,*999)
11325 IF(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_GRID_POINT_DOFS>0)
THEN 11326 CALL write_string(diagnostic_output_type,
" Grid point DOFs:",err,error,*999)
11327 DO grid_point_nyy=1,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_GRID_POINT_DOFS
11328 CALL write_string_value(diagnostic_output_type,
" Grid point DOF : ",grid_point_nyy,err,error,*999)
11329 CALL write_string_vector(diagnostic_output_type,1,1,2,2,2,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP% &
11330 & grid_point_dof2param_map(:,grid_point_nyy),
'(" DOF 2 Parameters :",2(X,I8))',
'(28X,2(X,I8))', &
11334 CALL write_string_value(diagnostic_output_type,
" Number of Gauss point DOFs = ",field%VARIABLES(variable_idx)% &
11335 & dof_to_param_map%NUMBER_OF_GAUSS_POINT_DOFS,err,error,*999)
11336 IF(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_GAUSS_POINT_DOFS>0)
THEN 11337 CALL write_string(diagnostic_output_type,
" Gauss point DOFs:",err,error,*999)
11338 DO gauss_point_nyy=1,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_GAUSS_POINT_DOFS
11339 CALL write_string_value(diagnostic_output_type,
" Gauss point DOF : ",gauss_point_nyy,err,error,*999)
11340 CALL write_string_vector(diagnostic_output_type,1,1,3,3,3,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP% &
11341 & gauss_point_dof2param_map(:,gauss_point_nyy),
'(" DOF 2 Parameters :",3(X,I8))',
'(28X,3(X,I8))', &
11345 CALL write_string_value(diagnostic_output_type,
" Number of data point DOFs = ",field%VARIABLES(variable_idx)% &
11346 & dof_to_param_map%NUMBER_OF_DATA_POINT_DOFS,err,error,*999)
11347 IF(field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_DATA_POINT_DOFS>0)
THEN 11348 CALL write_string(diagnostic_output_type,
" data point DOFs:",err,error,*999)
11349 DO data_point_nyy=1,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP%NUMBER_OF_DATA_POINT_DOFS
11350 CALL write_string_value(diagnostic_output_type,
" data point DOF : ",data_point_nyy,err,error,*999)
11351 CALL write_string_vector(diagnostic_output_type,1,1,3,3,3,field%VARIABLES(variable_idx)%DOF_TO_PARAM_MAP% &
11352 & data_point_dof2param_map(:,data_point_nyy),
'(" DOF 2 Parameters :",3(X,I8))',
'(28X,3(X,I8))', &
11356 CALL write_string(diagnostic_output_type,
" Parameter to DOF map:",err,error,*999)
11357 CALL write_string_value(diagnostic_output_type,
" Number of components = ",field%VARIABLES(variable_idx)% &
11358 & number_of_components,err,error,*999)
11359 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
11360 field_component => field%VARIABLES(variable_idx)%COMPONENTS(component_idx)
11361 CALL write_string_value(diagnostic_output_type,
" Component : ",component_idx,err,error,*999)
11362 CALL write_string_value(diagnostic_output_type,
" Number of constant parameters = ", &
11363 & field_component%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS,err,error,*999)
11364 IF(field_component%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 11365 CALL write_string_value(diagnostic_output_type,
" Constant DOF = ", &
11366 & field_component%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP,err,error,*999)
11368 CALL write_string_value(diagnostic_output_type,
" Number of element parameters = ", &
11369 & field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS,err,error,*999)
11370 IF(field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS>0)
THEN 11371 DO element_idx=1,field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS
11372 CALL write_string_value(diagnostic_output_type,
" Element : ",element_idx,err,error,*999)
11373 CALL write_string_value(diagnostic_output_type,
" Element DOF = ", &
11374 & field_component%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS(element_idx), &
11378 CALL write_string_value(diagnostic_output_type,
" Number of node parameters = ", &
11379 & field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS,err,error,*999)
11380 IF(field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS>0)
THEN 11381 DO node_idx=1,field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS
11382 CALL write_string_value(diagnostic_output_type,
" Node : ",node_idx,err,error,*999)
11383 CALL write_string_value(diagnostic_output_type,
" Number of Derivatives = ", &
11384 & field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%NUMBER_OF_DERIVATIVES,err,error,*999)
11385 DO derivative_idx=1,field_component%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node_idx)%NUMBER_OF_DERIVATIVES
11386 CALL write_string_value(diagnostic_output_type,
" Derivative : ",derivative_idx,err,error,*999)
11387 CALL write_string_vector(diagnostic_output_type,1,1,field_component%PARAM_TO_DOF_MAP% &
11388 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(derivative_idx)%NUMBER_OF_VERSIONS,8,8,field_component% &
11389 & param_to_dof_map%NODE_PARAM2DOF_MAP%NODES(node_idx)%DERIVATIVES(derivative_idx)%VERSIONS(:), &
11390 &
'(" Version DOFs :",8(X,I8))',
'(23X,8(X,I8))',err,error,*999)
11394 CALL write_string_value(diagnostic_output_type,
" Number of grid point parameters = ", &
11395 & field_component%PARAM_TO_DOF_MAP%GRID_POINT_PARAM2DOF_MAP%NUMBER_OF_GRID_POINT_PARAMETERS,err,error,*999)
11396 IF(field_component%PARAM_TO_DOF_MAP%GRID_POINT_PARAM2DOF_MAP%NUMBER_OF_GRID_POINT_PARAMETERS>0)
THEN 11398 CALL write_string_value(diagnostic_output_type,
" Number of Gauss point parameters = ", &
11399 & field_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%NUMBER_OF_GAUSS_POINT_PARAMETERS,err,error,*999)
11400 IF(field_component%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%NUMBER_OF_GAUSS_POINT_PARAMETERS>0)
THEN 11402 CALL write_string_value(diagnostic_output_type,
" Number of data point parameters = ", &
11403 & field_component%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP%NUMBER_OF_DATA_POINT_PARAMETERS,err,error,*999)
11404 IF(field_component%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP%NUMBER_OF_DATA_POINT_PARAMETERS>0)
THEN 11411 CALL flagerror(
"Field is not associated.",err,error,*999)
11414 exits(
"FIELD_MAPPINGS_CALCULATE")
11416 999
IF(
ALLOCATED(variable_local_dofs_offsets))
DEALLOCATE(variable_local_dofs_offsets)
11417 IF(
ALLOCATED(variable_ghost_dofs_offsets))
DEALLOCATE(variable_ghost_dofs_offsets)
11418 errorsexits(
"FIELD_MAPPINGS_CALCULATE",err,error)
11420 END SUBROUTINE field_mappings_calculate
11427 SUBROUTINE field_dof_to_param_map_finalise(DOF_TO_PARAM_MAP,ERR,ERROR,*)
11430 TYPE(field_dof_to_param_map_type) :: dof_to_param_map
11431 INTEGER(INTG),
INTENT(OUT) :: err
11432 TYPE(varying_string),
INTENT(OUT) :: error
11435 enters(
"FIELD_DOF_TO_PARAM_MAP_FINALISE",err,error,*999)
11437 IF(
ALLOCATED(dof_to_param_map%DOF_TYPE))
DEALLOCATE(dof_to_param_map%DOF_TYPE)
11438 IF(
ALLOCATED(dof_to_param_map%CONSTANT_DOF2PARAM_MAP))
DEALLOCATE(dof_to_param_map%CONSTANT_DOF2PARAM_MAP)
11439 IF(
ALLOCATED(dof_to_param_map%ELEMENT_DOF2PARAM_MAP))
DEALLOCATE(dof_to_param_map%ELEMENT_DOF2PARAM_MAP)
11440 IF(
ALLOCATED(dof_to_param_map%NODE_DOF2PARAM_MAP))
DEALLOCATE(dof_to_param_map%NODE_DOF2PARAM_MAP)
11441 IF(
ALLOCATED(dof_to_param_map%GRID_POINT_DOF2PARAM_MAP))
DEALLOCATE(dof_to_param_map%GRID_POINT_DOF2PARAM_MAP)
11442 IF(
ALLOCATED(dof_to_param_map%GAUSS_POINT_DOF2PARAM_MAP))
DEALLOCATE(dof_to_param_map%GAUSS_POINT_DOF2PARAM_MAP)
11443 IF(
ALLOCATED(dof_to_param_map%DATA_POINT_DOF2PARAM_MAP))
DEALLOCATE(dof_to_param_map%DATA_POINT_DOF2PARAM_MAP)
11444 dof_to_param_map%NUMBER_OF_DOFS=0
11445 dof_to_param_map%NUMBER_OF_CONSTANT_DOFS=0
11446 dof_to_param_map%NUMBER_OF_ELEMENT_DOFS=0
11447 dof_to_param_map%NUMBER_OF_NODE_DOFS=0
11448 dof_to_param_map%NUMBER_OF_GRID_POINT_DOFS=0
11449 dof_to_param_map%NUMBER_OF_GAUSS_POINT_DOFS=0
11450 dof_to_param_map%NUMBER_OF_DATA_POINT_DOFS=0
11452 exits(
"FIELD_DOF_TO_PARAM_MAP_FINALISE")
11454 999 errorsexits(
"FIELD_DOF_TO_PARAM_MAP_FINALISE",err,error)
11456 END SUBROUTINE field_dof_to_param_map_finalise
11463 SUBROUTINE field_dof_to_param_map_initialise(DOF_TO_PARAM_MAP,ERR,ERROR,*)
11466 TYPE(field_dof_to_param_map_type) :: dof_to_param_map
11467 INTEGER(INTG),
INTENT(OUT) :: err
11468 TYPE(varying_string),
INTENT(OUT) :: error
11471 enters(
"FIELD_DOF_TO_PARAM_INITIALISE",err,error,*999)
11473 dof_to_param_map%NUMBER_OF_DOFS=0
11474 dof_to_param_map%NUMBER_OF_CONSTANT_DOFS=0
11475 dof_to_param_map%NUMBER_OF_ELEMENT_DOFS=0
11476 dof_to_param_map%NUMBER_OF_NODE_DOFS=0
11477 dof_to_param_map%NUMBER_OF_GRID_POINT_DOFS=0
11478 dof_to_param_map%NUMBER_OF_GAUSS_POINT_DOFS=0
11479 dof_to_param_map%NUMBER_OF_DATA_POINT_DOFS=0
11481 exits(
"FIELD_DOF_TO_PARAM_MAP_INITIALISE")
11483 999 errorsexits(
"FIELD_DOF_TO_PARAM_MAP_INITIALISE",err,error)
11485 END SUBROUTINE field_dof_to_param_map_initialise
11492 SUBROUTINE field_geometric_field_get(FIELD,GEOMETRIC_FIELD,ERR,ERROR,*)
11495 TYPE(field_type),
POINTER :: field
11496 TYPE(field_type),
POINTER :: geometric_field
11497 INTEGER(INTG),
INTENT(OUT) :: err
11498 TYPE(varying_string),
INTENT(OUT) :: error
11500 TYPE(varying_string) :: local_error
11502 enters(
"FIELD_GEOMETRIC_FIELD_GET",err,error,*999)
11504 IF(
ASSOCIATED(field))
THEN 11505 IF(field%FIELD_FINISHED)
THEN 11506 IF(
ASSOCIATED(geometric_field))
THEN 11507 CALL flagerror(
"Geometric field is already associated.",err,error,*999)
11509 geometric_field=>field%GEOMETRIC_FIELD
11512 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
11513 &
" has not been finished." 11514 CALL flagerror(local_error,err,error,*999)
11517 CALL flagerror(
"Field is not associated.",err,error,*999)
11520 exits(
"FIELD_GEOMETRIC_FIELD_GET")
11522 999 errorsexits(
"FIELD_GEOMETRIC_FIELD_GET",err,error)
11524 END SUBROUTINE field_geometric_field_get
11531 SUBROUTINE field_geometric_field_set(FIELD,GEOMETRIC_FIELD,ERR,ERROR,*)
11534 TYPE(field_type),
POINTER :: field
11535 TYPE(field_type),
POINTER :: geometric_field
11536 INTEGER(INTG),
INTENT(OUT) :: err
11537 TYPE(varying_string),
INTENT(OUT) :: error
11539 TYPE(varying_string) :: local_error
11541 enters(
"FIELD_GEOMETRIC_FIELD_SET",err,error,*999)
11543 IF(
ASSOCIATED(field))
THEN 11544 IF(field%FIELD_FINISHED)
THEN 11545 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
11546 &
" has been finished." 11547 CALL flagerror(local_error,err,error,*999)
11549 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 11550 IF(field%CREATE_VALUES_CACHE%GEOMETRIC_FIELD_LOCKED)
THEN 11551 local_error=
"The geometric field has been locked for field number "// &
11552 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 11553 CALL flagerror(local_error,err,error,*999)
11555 IF(
ASSOCIATED(field%GEOMETRIC_FIELD))
THEN 11556 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
11557 &
" already has a geometric field associated." 11558 CALL flagerror(local_error,err,error,*999)
11560 IF(
ASSOCIATED(field%DECOMPOSITION))
THEN 11561 IF(
ASSOCIATED(geometric_field))
THEN 11562 IF(geometric_field%TYPE==field_geometric_type)
THEN 11563 IF(geometric_field%FIELD_FINISHED)
THEN 11564 IF(field%DECOMPOSITION%MESH%USER_NUMBER==geometric_field%DECOMPOSITION%MESH%USER_NUMBER)
THEN 11565 SELECT CASE(field%TYPE)
11566 CASE(field_fibre_type,field_general_type,field_material_type,field_geometric_general_type)
11567 field%GEOMETRIC_FIELD=>geometric_field
11568 CASE(field_geometric_type)
11569 CALL flagerror(
"Can not set the geometric field for a geometric field.",err,error,*999)
11571 local_error=
"The field type "//trim(number_to_vstring(field%TYPE,
"*",err,error))//
" is invalid." 11572 CALL flagerror(local_error,err,error,*999)
11575 local_error=
"The specified field is decomposed on mesh user number "// &
11576 & trim(number_to_vstring(field%DECOMPOSITION%MESH%USER_NUMBER,
"*",err,error))// &
11577 &
" and the geometric field is decomposed on mesh user number "// &
11578 & trim(number_to_vstring(geometric_field%DECOMPOSITION%MESH%USER_NUMBER,
"*",err,error))// &
11579 &
". The two fields must use the same mesh." 11580 CALL flagerror(local_error,err,error,*999)
11583 CALL flagerror(
"The specified geometric field has not been finished.",err,error,*999)
11586 CALL flagerror(
"The specified geometric field is not a geometric field.",err,error,*999)
11589 CALL flagerror(
"Geometric field is not associated.",err,error,*999)
11592 CALL flagerror(
"The field does not have a decomposition associated.",err,error,*999)
11597 local_error=
"Field create values cache is not associated for field number "// &
11598 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 11599 CALL flagerror(local_error,err,error,*999)
11603 CALL flagerror(
"Field is not associated.",err,error,*999)
11606 exits(
"FIELD_GEOMETRIC_FIELD_SET")
11608 999 errorsexits(
"FIELD_GEOMETRIC_FIELD_SET",err,error)
11610 END SUBROUTINE field_geometric_field_set
11617 SUBROUTINE field_geometric_field_set_and_lock(FIELD,GEOMETRIC_FIELD,ERR,ERROR,*)
11620 TYPE(field_type),
POINTER :: field
11621 TYPE(field_type),
POINTER :: geometric_field
11622 INTEGER(INTG),
INTENT(OUT) :: err
11623 TYPE(varying_string),
INTENT(OUT) :: error
11625 TYPE(varying_string) :: local_error
11627 enters(
"FIELD_GEOMETRIC_FIELD_SET_AND_LOCK",err,error,*999)
11629 CALL field_geometric_field_set(field,geometric_field,err,error,*999)
11630 IF(
ASSOCIATED(field))
THEN 11631 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 11632 field%CREATE_VALUES_CACHE%GEOMETRIC_FIELD_LOCKED=.true.
11634 local_error=
"Field create values cache is not associated for field number "// &
11635 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 11636 CALL flagerror(local_error,err,error,*999)
11639 CALL flagerror(
"Field is not associated.",err,error,*999)
11642 exits(
"FIELD_GEOMETRIC_FIELD_SET_AND_LOCK")
11644 999 errorsexits(
"FIELD_GEOMETRIC_FIELD_SET_AND_LOCK",err,error)
11646 END SUBROUTINE field_geometric_field_set_and_lock
11653 SUBROUTINE field_geometric_parameters_calculate(FIELD,ERR,ERROR,*)
11656 TYPE(field_type),
POINTER :: field
11657 INTEGER(INTG),
INTENT(OUT) :: err
11658 TYPE(varying_string),
INTENT(OUT) :: error
11660 TYPE(varying_string) :: local_error
11662 enters(
"FIELD_GEOMETRIC_PARAMETERS_CALCULATE",err,error,*999)
11664 IF(
ASSOCIATED(field))
THEN 11665 IF(field%FIELD_FINISHED)
THEN 11666 IF(field%TYPE==field_geometric_type)
THEN 11667 IF(field%DECOMPOSITION%CALCULATE_LINES)
THEN 11668 CALL field_geometricparameterslinelengthscalculate(field,err,error,*999)
11673 CALL field_geometricparameterselementvolumescalculate(field,err,error,*999)
11675 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not a geometric field." 11676 CALL flagerror(local_error,err,error,*999)
11679 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 11680 CALL flagerror(local_error,err,error,*999)
11683 CALL flagerror(
"Field is not associated.",err,error,*999)
11686 exits(
"FIELD_GEOMETRIC_PARAMETERS_CALCULATE")
11688 999 errorsexits(
"FIELD_GEOMETRIC_PARAMETERS_CALCULATE",err,error)
11690 END SUBROUTINE field_geometric_parameters_calculate
11697 SUBROUTINE field_geometric_parameters_finalise(GEOMETRIC_PARAMETERS,ERR,ERROR,*)
11700 TYPE(field_geometric_parameters_type),
POINTER :: geometric_parameters
11701 INTEGER(INTG),
INTENT(OUT) :: err
11702 TYPE(varying_string),
INTENT(OUT) :: error
11704 INTEGER(INTG) :: field_idx
11705 TYPE(field_type),
POINTER :: field2
11707 enters(
"FIELD_GEOMETRIC_PARAMETERS_FINALISE",err,error,*999)
11709 IF(
ASSOCIATED(geometric_parameters))
THEN 11711 DO field_idx=1,geometric_parameters%NUMBER_OF_FIELDS_USING
11712 field2=>geometric_parameters%FIELDS_USING(field_idx)%PTR
11713 IF(
ASSOCIATED(field2))
NULLIFY(field2%GEOMETRIC_FIELD)
11715 IF(
ASSOCIATED(geometric_parameters%FIELDS_USING))
DEALLOCATE(geometric_parameters%FIELDS_USING)
11716 IF(
ALLOCATED(geometric_parameters%LENGTHS))
DEALLOCATE(geometric_parameters%LENGTHS)
11718 IF(
ALLOCATED(geometric_parameters%VOLUMES))
DEALLOCATE(geometric_parameters%VOLUMES)
11719 DEALLOCATE(geometric_parameters)
11722 exits(
"FIELD_GEOMETRIC_PARAMETERS_FINALISE")
11724 999 errorsexits(
"FIELD_GEOMETRIC_PARAMETERS_FINALISE",err,error)
11726 END SUBROUTINE field_geometric_parameters_finalise
11733 SUBROUTINE field_geometric_parameters_initialise(FIELD,ERR,ERROR,*)
11736 TYPE(field_type),
POINTER :: field
11737 INTEGER(INTG),
INTENT(OUT) :: err
11738 TYPE(varying_string),
INTENT(OUT) :: error
11740 INTEGER(INTG) :: field_idx
11741 TYPE(field_ptr_type),
POINTER :: new_fields_using(:)
11743 NULLIFY(new_fields_using)
11745 enters(
"FIELD_GEOMETRIC_PARAMETERS_INITIALISE",err,error,*999)
11747 IF(
ASSOCIATED(field))
THEN 11748 IF(field%TYPE==field_geometric_type)
THEN 11750 ALLOCATE(field%GEOMETRIC_FIELD_PARAMETERS,stat=err)
11751 IF(err/=0)
CALL flagerror(
"Could not allocate geometric field parameters.",err,error,*999)
11752 IF(field%DECOMPOSITION%CALCULATE_LINES)
THEN 11753 field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_LINES=field%DECOMPOSITION%TOPOLOGY%LINES%NUMBER_OF_LINES
11754 ALLOCATE(field%GEOMETRIC_FIELD_PARAMETERS%LENGTHS(field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_LINES),stat=err)
11755 IF(err/=0)
CALL flagerror(
"Could not allocate lengths.",err,error,*999)
11756 field%GEOMETRIC_FIELD_PARAMETERS%LENGTHS=0.0_dp
11764 field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_VOLUMES=field%DECOMPOSITION%TOPOLOGY%ELEMENTS%NUMBER_OF_ELEMENTS
11765 ALLOCATE(field%GEOMETRIC_FIELD_PARAMETERS%VOLUMES(field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_VOLUMES),stat=err)
11766 IF(err/=0)
CALL flag_error(
"Could not allocate volumes.",err,error,*999)
11767 field%GEOMETRIC_FIELD_PARAMETERS%VOLUMES=0.0_dp
11771 ALLOCATE(field%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING(1),stat=err)
11772 IF(err/=0)
CALL flagerror(
"Could not allocate fields using.",err,error,*999)
11773 field%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING(1)%PTR=>field
11774 field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING=1
11777 NULLIFY(field%GEOMETRIC_FIELD_PARAMETERS)
11778 IF(
ASSOCIATED(field%GEOMETRIC_FIELD))
THEN 11780 ALLOCATE(new_fields_using(field%GEOMETRIC_FIELD%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING+1),stat=err)
11781 IF(err/=0)
CALL flagerror(
"Could not allocate new fields using.",err,error,*999)
11782 DO field_idx=1,field%GEOMETRIC_FIELD%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING
11783 new_fields_using(field_idx)%PTR=>field%GEOMETRIC_FIELD%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING(field_idx)%PTR
11785 new_fields_using(field%GEOMETRIC_FIELD%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING+1)%PTR=>field
11786 field%GEOMETRIC_FIELD%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING=field%GEOMETRIC_FIELD% &
11787 & geometric_field_parameters%NUMBER_OF_FIELDS_USING+1
11788 IF(
ASSOCIATED(field%GEOMETRIC_FIELD%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING)) &
11789 &
DEALLOCATE(field%GEOMETRIC_FIELD%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING)
11790 field%GEOMETRIC_FIELD%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING=>new_fields_using
11792 CALL flagerror(
"Field does not have a geometric field associated.",err,error,*999)
11796 CALL flagerror(
"Field is not associated.",err,error,*999)
11799 exits(
"FIELD_GEOMETRIC_PARAMETERS_INITIALISE")
11801 999
IF(
ASSOCIATED(new_fields_using))
DEALLOCATE(new_fields_using)
11802 errorsexits(
"FIELD_GEOMETRIC_PARAMETERS_INITIALISE",err,error)
11804 END SUBROUTINE field_geometric_parameters_initialise
11811 SUBROUTINE field_geometricparameterselementlinelengthget(field,elementNumber,elementLineNumber,lineLength,err,error,*)
11814 TYPE(field_type),
POINTER :: field
11815 INTEGER(INTG),
INTENT(IN) :: elementnumber
11816 INTEGER(INTG),
INTENT(IN) :: elementlinenumber
11817 REAL(DP),
INTENT(OUT) :: linelength
11818 INTEGER(INTG),
INTENT(OUT) :: err
11819 TYPE(varying_string),
INTENT(OUT) :: error
11821 TYPE(decomposition_element_type),
POINTER :: decompositionelement
11822 TYPE(domain_element_type),
POINTER :: domainelement
11823 TYPE(varying_string) :: localerror
11824 INTEGER(INTG) :: globallinenumber
11826 enters(
"Field_GeometricParametersElementLineLengthGet",err,error,*999)
11828 IF(
ASSOCIATED(field))
THEN 11829 IF(field%FIELD_FINISHED)
THEN 11830 IF(field%TYPE==field_geometric_type)
THEN 11831 IF(
ASSOCIATED(field%GEOMETRIC_FIELD_PARAMETERS))
THEN 11833 IF(elementnumber>=1.AND.elementnumber<=field%DECOMPOSITION%TOPOLOGY%ELEMENTS%NUMBER_OF_ELEMENTS)
THEN 11834 domainelement=>field%DECOMPOSITION%DOMAIN(field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
11835 & topology%ELEMENTS%ELEMENTS(elementnumber)
11836 decompositionelement=>field%DECOMPOSITION%TOPOLOGY%ELEMENTS%ELEMENTS(elementnumber)
11837 IF(elementlinenumber>=1.AND.elementlinenumber<=domainelement%BASIS%NUMBER_OF_LOCAL_LINES)
THEN 11838 globallinenumber=decompositionelement%ELEMENT_LINES(elementlinenumber)
11839 linelength=field%GEOMETRIC_FIELD_PARAMETERS%LENGTHS(globallinenumber)
11841 localerror=
"Element basis line number "//trim(number_to_vstring(elementnumber,
"*",err,error))// &
11842 &
" is not valid and needs to be >=1 and <="//trim(number_to_vstring( &
11843 & domainelement%BASIS%NUMBER_OF_LOCAL_LINES,
"*",err,error))
11844 CALL flagerror(localerror,err,error,*999)
11847 localerror=
"Element number "//trim(number_to_vstring(elementnumber,
"*",err,error))// &
11848 &
" is not present in this fields decomposition" 11849 CALL flagerror(localerror,err,error,*999)
11852 localerror=
"Geometric parameters are not associated for field number "// &
11853 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 11854 CALL flagerror(localerror,err,error,*999)
11857 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not a geometric field." 11858 CALL flagerror(localerror,err,error,*999)
11861 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 11862 CALL flagerror(localerror,err,error,*999)
11865 CALL flagerror(
"Field is not associated.",err,error,*999)
11868 exits(
"Field_GeometricParametersElementLineLengthGet")
11870 999 errors(
"Field_GeometricParametersElementLineLengthGet",err,error)
11871 exits(
"Field_GeometricParametersElementLineLengthGet")
11874 END SUBROUTINE field_geometricparameterselementlinelengthget
11882 SUBROUTINE field_geometricparameterselementvolumeget(field,elementNumber,elementVolume,err,error,*)
11885 TYPE(field_type),
POINTER :: field
11886 INTEGER(INTG),
INTENT(IN) :: elementnumber
11887 REAL(DP),
INTENT(OUT) :: elementvolume
11888 INTEGER(INTG),
INTENT(OUT) :: err
11889 TYPE(varying_string),
INTENT(OUT) :: error
11891 TYPE(decomposition_element_type),
POINTER :: decompositionelement
11892 TYPE(domain_element_type),
POINTER :: domainelement
11893 TYPE(varying_string) :: localerror
11894 INTEGER(INTG) :: globallinenumber
11895 TYPE(coordinate_system_type),
POINTER :: coordinatesystem
11896 enters(
"Field_GeometricParametersElementVolumeGet",err,error,*999)
11898 IF(
ASSOCIATED(field))
THEN 11899 IF(field%FIELD_FINISHED)
THEN 11900 IF(field%TYPE==field_geometric_type)
THEN 11901 IF(
ASSOCIATED(field%GEOMETRIC_FIELD_PARAMETERS))
THEN 11904 IF(elementnumber>=1.AND.elementnumber<=field%DECOMPOSITION%TOPOLOGY%ELEMENTS%NUMBER_OF_ELEMENTS)
THEN 11905 domainelement=>field%DECOMPOSITION%DOMAIN(field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
11906 & topology%ELEMENTS%ELEMENTS(elementnumber)
11907 decompositionelement=>field%DECOMPOSITION%TOPOLOGY%ELEMENTS%ELEMENTS(elementnumber)
11908 NULLIFY(coordinatesystem)
11909 CALL field_coordinatesystemget(field,coordinatesystem,err,error,*999)
11910 IF(coordinatesystem%NUMBER_OF_DIMENSIONS.EQ.3)
THEN 11911 elementvolume = field%GEOMETRIC_FIELD_PARAMETERS%VOLUMES(elementnumber)
11913 localerror =
"Volumes can only be calculated for 3D elements." 11914 CALL flagerror(localerror,err,error,*999)
11918 localerror=
"Element number "//trim(number_to_vstring(elementnumber,
"*",err,error))// &
11919 &
" is not present in this fields decomposition" 11920 CALL flagerror(localerror,err,error,*999)
11923 localerror=
"Geometric parameters are not associated for field number "// &
11924 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 11925 CALL flagerror(localerror,err,error,*999)
11928 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not a geometric field." 11929 CALL flagerror(localerror,err,error,*999)
11932 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 11933 CALL flagerror(localerror,err,error,*999)
11936 CALL flagerror(
"Field is not associated.",err,error,*999)
11939 exits(
"Field_GeometricParametersElementVolumeGet")
11941 999 errors(
"Field_GeometricParametersElementVolumeGet",err,error)
11942 exits(
"Field_GeometricParametersElementVolumeGet")
11945 END SUBROUTINE field_geometricparameterselementvolumeget
11952 SUBROUTINE field_geometricparameterselementvolumescalculate(field,err,error,*)
11955 TYPE(field_type),
POINTER :: field
11956 INTEGER(INTG),
INTENT(OUT) :: err
11957 TYPE(varying_string),
INTENT(OUT) :: error
11959 INTEGER(INTG) :: dummyerr,ng,ne,max_gauss
11960 INTEGER(INTG) :: numbergausspoints
11961 REAL(DP) :: w,elementvolume
11962 REAL(DP),
ALLOCATABLE :: xig(:,:),wig(:),xi(:)
11963 TYPE(field_variable_type),
POINTER :: fieldvariable
11964 TYPE(domain_type),
POINTER :: domain
11965 TYPE(domain_topology_type),
POINTER :: topology
11966 TYPE(decomposition_topology_type),
POINTER :: decomptopology
11967 TYPE(decomposition_type),
POINTER :: decomposition
11968 TYPE(decomposition_elements_type),
POINTER :: decompelements
11969 TYPE(basis_type),
POINTER:: basis
11970 TYPE(coordinate_system_type),
POINTER :: coordinatesystem
11971 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolatedpoint(:)
11972 TYPE(field_interpolated_point_metrics_ptr_type),
POINTER :: interpolatedpointmetrics(:)
11973 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolationparameters(:)
11974 TYPE(varying_string) :: dummyerror,localerror
11977 NULLIFY(interpolatedpoint)
11978 NULLIFY(interpolatedpointmetrics)
11979 NULLIFY(interpolationparameters)
11980 NULLIFY(fieldvariable)
11982 enters(
"Field_GeometricParametersElementVolumesCalculate",err,error,*999)
11983 IF(
ASSOCIATED(field))
THEN 11984 IF(field%FIELD_FINISHED)
THEN 11985 IF(field%TYPE==field_geometric_type)
THEN 11986 IF(
ASSOCIATED(field%GEOMETRIC_FIELD_PARAMETERS))
THEN 11987 NULLIFY(coordinatesystem)
11988 CALL field_coordinatesystemget(field,coordinatesystem,err,error,*999)
11989 IF(coordinatesystem%NUMBER_OF_DIMENSIONS.EQ.3)
THEN 11990 CALL field_interpolationparametersinitialise(field,interpolationparameters,err,error,*999)
11991 CALL field_interpolatedpointsinitialise(interpolationparameters,interpolatedpoint,err,error,*999)
11992 CALL field_interpolatedpointsmetricsinitialise(interpolatedpoint,interpolatedpointmetrics,err,error,*999)
11994 CALL field_variableget(field,field_u_variable_type,fieldvariable,err,error,*999)
11995 IF(
ASSOCIATED(fieldvariable))
THEN 11996 domain=>fieldvariable%COMPONENTS(1)%DOMAIN
11997 IF(
ASSOCIATED(domain))
THEN 11998 topology=>domain%TOPOLOGY
11999 IF(
ASSOCIATED(topology))
THEN 12000 decomposition=>field%DECOMPOSITION
12001 IF(
ASSOCIATED(decomposition))
THEN 12002 decomptopology=>decomposition%TOPOLOGY
12003 IF(
ASSOCIATED(decomptopology))
THEN 12004 decompelements=>decomptopology%ELEMENTS
12005 IF(
ASSOCIATED(decompelements))
THEN 12006 basis=>topology%ELEMENTS%ELEMENTS(1)%BASIS
12007 SELECT CASE(basis%TYPE)
12008 CASE(basis_lagrange_hermite_tp_type)
12010 ALLOCATE(xi(3),stat=err)
12011 IF(err/=0)
CALL flag_error(
"Could not allocate XI matrix",err,error,*999)
12012 ALLOCATE(xig(3,max_gauss),stat=err)
12013 IF(err/=0)
CALL flag_error(
"Could not allocate XIG matrix",err,error,*999)
12014 ALLOCATE(wig(max_gauss),stat=err)
12015 IF(err/=0)
CALL flag_error(
"Could not allocate W matrix",err,error,*999)
12016 CALL basis_gauss_points_calculate(basis,4,3,numbergausspoints,xig,wig,err,error,*999)
12017 CASE(basis_simplex_type)
12020 ALLOCATE(xi(4),stat=err)
12021 IF(err/=0)
CALL flag_error(
"Could not allocate XI matrix",err,error,*999)
12022 ALLOCATE(xig(4,max_gauss),stat=err)
12023 IF(err/=0)
CALL flag_error(
"Could not allocate XIG matrix",err,error,*999)
12024 ALLOCATE(wig(max_gauss),stat=err)
12025 IF(err/=0)
CALL flag_error(
"Could not allocate W matrix",err,error,*999)
12026 CALL basis_gauss_points_calculate(basis,4,3,numbergausspoints,xig,wig,err,error,*999)
12028 localerror=
"Basis type "//trim(number_to_vstring(basis%TYPE,
"*",err,error))//
" & 12029 & is invalid or not implemented" 12030 CALL flag_error(localerror,err,error,*999)
12033 CALL flag_error(
"Elements are not associated with the decomposition",err,error,*999)
12036 CALL flag_error(
"Decomposition topology is not associated",err,error,*999)
12039 CALL flag_error(
"Decomposition is not associated",err,error,*999)
12042 CALL flag_error(
"Domain topology is not associated",err,error,*999)
12045 CALL flag_error(
"Domain is not associated with the geometric field component 1",err,error,*999)
12048 CALL flag_error(
"Field variable is not associated",err,error,*999)
12051 SELECT CASE(basis%TYPE)
12052 CASE(basis_lagrange_hermite_tp_type)
12054 DO ne=1,field%DECOMPOSITION%TOPOLOGY%ELEMENTS%NUMBER_OF_ELEMENTS
12055 CALL field_interpolation_parameters_element_get(field_values_set_type,ne, &
12056 & interpolationparameters(field_u_variable_type)%PTR,err,error,*999)
12057 elementvolume=0.0_dp
12058 DO ng=1,numbergausspoints
12059 xi(1:3)=xig(1:3,ng)
12061 CALL field_interpolate_xi(first_part_deriv,xi,interpolatedpoint(field_u_variable_type)%PTR,err,error,*999)
12062 CALL field_interpolated_point_metrics_calculate(coordinate_jacobian_volume_type, &
12063 & interpolatedpointmetrics(field_u_variable_type)%PTR,err,error,*999)
12064 elementvolume=elementvolume+w*interpolatedpointmetrics(field_u_variable_type)%PTR%JACOBIAN
12066 field%GEOMETRIC_FIELD_PARAMETERS%VOLUMES(ne)=elementvolume
12068 CASE(basis_simplex_type)
12070 DO ne=1,field%DECOMPOSITION%TOPOLOGY%ELEMENTS%NUMBER_OF_ELEMENTS
12071 CALL field_interpolation_parameters_element_get(field_values_set_type,ne, &
12072 & interpolationparameters(field_u_variable_type)%PTR,err,error,*999)
12073 elementvolume=0.0_dp
12074 DO ng=1,numbergausspoints
12075 xi(1:4)=xig(1:4,ng)
12077 CALL field_interpolate_xi(first_part_deriv,xi,interpolatedpoint(field_u_variable_type)%PTR,err,error,*999)
12078 CALL field_interpolated_point_metrics_calculate(coordinate_jacobian_volume_type, &
12079 & interpolatedpointmetrics(field_u_variable_type)%PTR,err,error,*999)
12080 elementvolume=elementvolume+w*interpolatedpointmetrics(field_u_variable_type)%PTR%JACOBIAN
12082 elementvolume = elementvolume
12083 field%GEOMETRIC_FIELD_PARAMETERS%VOLUMES(ne)=elementvolume
12086 localerror=
"Basis type "//trim(number_to_vstring(basis%TYPE,
"*",err,error))//
" & 12087 & is invalid or not implemented" 12088 CALL flag_error(localerror,err,error,*999)
12091 CALL field_interpolated_point_metrics_finalise(interpolatedpointmetrics(field_u_variable_type)%PTR,err,error,*999)
12092 CALL field_interpolated_points_finalise(interpolatedpoint,err,error,*999)
12093 CALL field_interpolation_parameters_finalise(interpolationparameters,err,error,*999)
12096 localerror=
"Geometric parameters are not associated for field number "// &
12097 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12098 CALL flag_error(localerror,err,error,*999)
12101 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not a geometric field." 12102 CALL flag_error(localerror,err,error,*999)
12105 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 12106 CALL flag_error(localerror,err,error,*999)
12109 CALL flag_error(
"Field is not associated.",err,error,*999)
12112 IF(diagnostics1)
THEN 12113 CALL write_string(diagnostic_output_type,
"Element volumes:",err,error,*999)
12114 CALL write_string_value(diagnostic_output_type,
" Number of elements = ", &
12115 & field%DECOMPOSITION%TOPOLOGY%ELEMENTS%NUMBER_OF_ELEMENTS, &
12117 DO ne=1,field%DECOMPOSITION%TOPOLOGY%ELEMENTS%NUMBER_OF_ELEMENTS
12118 CALL write_string_fmt_two_value(diagnostic_output_type,
" Element ",ne,
"(I8)",
" volume = ",field% &
12119 & geometric_field_parameters%VOLUMES(ne),
"*",err,error,*999)
12124 exits(
"Field_GeometricParametersElementVolumesCalculate")
12126 999
IF(
ASSOCIATED(interpolatedpoint))
CALL field_interpolated_points_finalise(interpolatedpoint,dummyerr,dummyerror,*999)
12127 IF(
ASSOCIATED(interpolationparameters))
CALL field_interpolation_parameters_finalise(interpolationparameters, &
12128 & dummyerr,dummyerror,*999)
12129 errors(
"Field_GeometricParametersElementVolumesCalculate",err,error)
12130 exits(
"Field_GeometricParametersElementVolumesCalculate")
12132 END SUBROUTINE field_geometricparameterselementvolumescalculate
12141 SUBROUTINE field_geometricparameterslinelengthscalculate(FIELD,ERR,ERROR,*)
12144 TYPE(field_type),
POINTER :: field
12145 INTEGER(INTG),
INTENT(OUT) :: err
12146 TYPE(varying_string),
INTENT(OUT) :: error
12148 INTEGER(INTG) :: dummy_err,iteration_number,maximum_difference_line,ng,nl
12149 INTEGER(INTG),
PARAMETER :: lines_maximum_number_of_iterations=20
12150 INTEGER(INTG) :: gauss_start(4) = [ 0,1,3,6 ]
12151 INTEGER(INTG) :: number_of_gauss_points=4
12152 REAL(DP) :: last_maximum_length_difference,length_difference,maximum_length_difference,xi(1),w,deriv_norm,line_length, &
12163 REAL(DP) :: xig(10),wig(10)
12164 REAL(DP),
PARAMETER :: line_increment_tolerance=convergence_tolerance
12165 LOGICAL :: iterate,update_fields_using
12166 TYPE(coordinate_system_type),
POINTER :: coordinate_system
12167 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_point(:)
12168 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolation_parameters(:)
12169 TYPE(varying_string) :: dummy_error,local_error
12171 xig = [ 0.500000000000000_dp, &
12172 & 0.211324865405187_dp,0.788675134594813_dp, &
12173 & 0.112701665379258_dp,0.500000000000000_dp,0.887298334620742_dp, &
12174 & 0.06943184420297349_dp,0.330009478207572_dp,0.669990521792428_dp,0.930568155797026_dp ]
12175 wig = [ 1.000000000000000_dp, &
12176 & 0.500000000000000_dp,0.500000000000000_dp, &
12177 & 0.277777777777778_dp,0.444444444444444_dp,0.277777777777778_dp, &
12178 & 0.173927422568727_dp,0.326072577431273_dp,0.326072577431273_dp,0.173927422568727_dp ]
12180 NULLIFY(interpolated_point)
12181 NULLIFY(interpolation_parameters)
12183 enters(
"Field_GeometricParametersLineLengthsCalculate",err,error,*997)
12185 IF(
ASSOCIATED(field))
THEN 12186 IF(field%FIELD_FINISHED)
THEN 12187 IF(field%TYPE==field_geometric_type)
THEN 12188 IF(
ASSOCIATED(field%GEOMETRIC_FIELD_PARAMETERS))
THEN 12189 NULLIFY(coordinate_system)
12190 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
12192 CALL field_interpolation_parameters_initialise(field,interpolation_parameters,err,error,*999)
12193 CALL field_interpolated_points_initialise(interpolation_parameters,interpolated_point,err,error,*999)
12196 last_maximum_length_difference=0.0_dp
12197 DO WHILE(iterate.AND.iteration_number<=lines_maximum_number_of_iterations)
12198 maximum_length_difference=0.0_dp
12199 maximum_difference_line=1
12201 DO nl=1,field%DECOMPOSITION%TOPOLOGY%LINES%NUMBER_OF_LINES
12202 CALL field_interpolation_parameters_line_get(field_values_set_type,nl, &
12203 & interpolation_parameters(field_u_variable_type)%PTR,err,error,*999)
12204 old_line_length=field%GEOMETRIC_FIELD_PARAMETERS%LENGTHS(nl)
12207 DO ng=1,number_of_gauss_points
12208 xi(1)=xig(gauss_start(number_of_gauss_points)+ng)
12209 w=wig(gauss_start(number_of_gauss_points)+ng)
12210 CALL field_interpolate_xi(first_part_deriv,xi,interpolated_point(field_u_variable_type)%PTR,err,error,*999)
12211 CALL coordinate_derivative_norm(coordinate_system,part_deriv_s1, &
12212 & interpolated_point(field_u_variable_type)%PTR,deriv_norm,err,error,*999)
12213 line_length=line_length+w*deriv_norm
12215 field%GEOMETRIC_FIELD_PARAMETERS%LENGTHS(nl)=line_length
12216 length_difference=abs(line_length-old_line_length)/(1.0_dp+old_line_length)
12217 IF(length_difference>maximum_length_difference)
THEN 12218 maximum_length_difference=length_difference
12219 maximum_difference_line=nl
12222 iterate=maximum_length_difference>line_increment_tolerance
12224 IF(iteration_number==1)
THEN 12225 last_maximum_length_difference=maximum_length_difference
12226 ELSE IF(maximum_length_difference<loose_tolerance.AND. &
12227 & maximum_length_difference>=last_maximum_length_difference)
THEN 12231 last_maximum_length_difference=maximum_length_difference
12234 iteration_number=iteration_number+1
12235 IF(diagnostics2)
THEN 12236 CALL write_string(diagnostic_output_type,
"Line iteration report:",err,error,*999)
12237 CALL write_string_value(diagnostic_output_type,
" Number of iterations = ",iteration_number,err,error,*999)
12238 CALL write_string_value(diagnostic_output_type,
" Maximum length difference = ",maximum_length_difference, &
12240 CALL write_string_value(diagnostic_output_type,
" Difference tolerance = ",line_increment_tolerance, &
12242 CALL write_string_value(diagnostic_output_type,
" Maximum difference line = ",maximum_difference_line, &
12245 IF(.NOT.iterate.OR.iteration_number==lines_maximum_number_of_iterations)
THEN 12246 update_fields_using=.true.
12248 update_fields_using=.false.
12250 CALL field_geometricparametersscalefactorsupdate(field,update_fields_using,err,error,*999)
12252 CALL field_interpolated_points_finalise(interpolated_point,err,error,*999)
12253 CALL field_interpolation_parameters_finalise(interpolation_parameters,err,error,*999)
12255 local_error=
"Geometric parameters are not associated for field number "// &
12256 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12257 CALL flagerror(local_error,err,error,*999)
12260 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not a geometric field." 12261 CALL flagerror(local_error,err,error,*999)
12264 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 12265 CALL flagerror(local_error,err,error,*999)
12268 CALL flagerror(
"Field is not associated.",err,error,*999)
12271 IF(diagnostics1)
THEN 12272 CALL write_string(diagnostic_output_type,
"Line lengths:",err,error,*999)
12273 CALL write_string_value(diagnostic_output_type,
" Number of iterations = ",iteration_number,err,error,*999)
12274 CALL write_string_value(diagnostic_output_type,
" Maximum length difference = ",maximum_length_difference,err,error,*999)
12275 CALL write_string_value(diagnostic_output_type,
" Difference tolerance = ",line_increment_tolerance,err,error,*999)
12276 CALL write_string_value(diagnostic_output_type,
" Maximum difference line = ",maximum_difference_line,err,error,*999)
12277 CALL write_string_value(diagnostic_output_type,
" Number of lines = ",field%DECOMPOSITION%TOPOLOGY%LINES%NUMBER_OF_LINES, &
12279 DO nl=1,field%DECOMPOSITION%TOPOLOGY%LINES%NUMBER_OF_LINES
12280 CALL write_string_fmt_two_value(diagnostic_output_type,
" Line ",nl,
"(I8)",
" length = ",field% &
12281 & geometric_field_parameters% LENGTHS(nl),
"*",err,error,*999)
12285 exits(
"Field_GeometricParametersLineLengthsCalculate")
12287 999
IF(
ASSOCIATED(interpolated_point))
CALL field_interpolated_points_finalise(interpolated_point,dummy_err,dummy_error,*998)
12288 998
IF(
ASSOCIATED(interpolation_parameters))
CALL field_interpolation_parameters_finalise(interpolation_parameters, &
12289 & dummy_err,dummy_error,*997)
12290 997 errors(
"Field_GeometricParametersLineLengthsCalculate",err,error)
12291 exits(
"Field_GeometricParametersLineLengthsCalculate")
12294 END SUBROUTINE field_geometricparameterslinelengthscalculate
12301 SUBROUTINE field_geometricparametersfaceareascalculate(FIELD,ERR,ERROR,*)
12304 TYPE(field_type),
POINTER :: field
12305 INTEGER(INTG),
INTENT(OUT) :: err
12306 TYPE(varying_string),
INTENT(OUT) :: error
12309 INTEGER(INTG) :: dummy_err,ng,nf
12310 INTEGER(INTG) :: gauss_start(4) = [ 0,1,3,6 ]
12311 INTEGER(INTG) :: number_of_gauss_points=4
12312 REAL(DP) :: xi(1),w,face_area
12313 REAL(DP) :: xig(10),wig(10)
12314 TYPE(coordinate_system_type),
POINTER :: coordinate_system
12315 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_point(:)
12316 TYPE(field_interpolated_point_metrics_ptr_type),
POINTER :: interpolated_point_metrics(:)
12317 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolation_parameters(:)
12318 TYPE(varying_string) :: dummy_error,local_error
12320 xig = [ 0.500000000000000_dp, &
12321 & 0.211324865405187_dp,0.788675134594813_dp, &
12322 & 0.112701665379258_dp,0.500000000000000_dp,0.887298334620742_dp, &
12323 & 0.06943184420297349_dp,0.330009478207572_dp,0.669990521792428_dp,0.930568155797026_dp ]
12324 wig = [ 1.000000000000000_dp, &
12325 & 0.500000000000000_dp,0.500000000000000_dp, &
12326 & 0.277777777777778_dp,0.444444444444444_dp,0.277777777777778_dp, &
12327 & 0.173927422568727_dp,0.326072577431273_dp,0.326072577431273_dp,0.173927422568727_dp ]
12328 NULLIFY(interpolated_point)
12329 NULLIFY(interpolated_point_metrics)
12330 NULLIFY(interpolation_parameters)
12332 enters(
"Field_GeometricParametersFaceAreasCalculate",err,error,*999)
12334 IF(
ASSOCIATED(field))
THEN 12335 IF(field%FIELD_FINISHED)
THEN 12336 IF(field%TYPE==field_geometric_type)
THEN 12337 IF(
ASSOCIATED(field%GEOMETRIC_FIELD_PARAMETERS))
THEN 12338 NULLIFY(coordinate_system)
12339 CALL field_coordinate_system_get(field,coordinate_system,err,error,*999)
12340 CALL field_interpolation_parameters_initialise(field,interpolation_parameters,err,error,*999)
12341 CALL field_interpolated_points_initialise(interpolation_parameters,interpolated_point,err,error,*999)
12342 CALL field_interpolatedpointsmetricsinitialise(interpolated_point,interpolated_point_metrics,err,error,*999)
12345 DO nf=1,field%DECOMPOSITION%TOPOLOGY%FACES%NUMBER_OF_FACES
12346 CALL field_interpolation_parameters_face_get(field_values_set_type,nf, &
12347 & interpolation_parameters(field_u_variable_type)%PTR,err,error,*999)
12349 DO ng=1,number_of_gauss_points
12350 xi(1)=xig(gauss_start(number_of_gauss_points)+ng)
12351 w=wig(gauss_start(number_of_gauss_points)+ng)
12352 CALL field_interpolate_xi(first_part_deriv,xi,interpolated_point(field_u_variable_type)%PTR,err,error,*999)
12353 CALL field_interpolated_point_metrics_calculate(coordinate_jacobian_area_type, &
12354 & interpolated_point_metrics(field_u_variable_type)%PTR,err,error,*999)
12355 face_area=face_area+w*interpolated_point_metrics(field_u_variable_type)%PTR%JACOBIAN
12357 field%GEOMETRIC_FIELD_PARAMETERS%AREAS(nf)=face_area
12360 CALL field_interpolatedpointsmetricsfinalise(interpolated_point_metrics,err,error,*999)
12361 CALL field_interpolated_points_finalise(interpolated_point,err,error,*999)
12362 CALL field_interpolation_parameters_finalise(interpolation_parameters,err,error,*999)
12364 local_error=
"Geometric parameters are not associated for field number "// &
12365 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12366 CALL flagerror(local_error,err,error,*999)
12369 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is not a geometric field." 12370 CALL flagerror(local_error,err,error,*999)
12373 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 12374 CALL flagerror(local_error,err,error,*999)
12377 CALL flagerror(
"Field is not associated.",err,error,*999)
12380 IF(diagnostics1)
THEN 12381 CALL write_string(diagnostic_output_type,
"Face areas:",err,error,*999)
12382 CALL write_string_value(diagnostic_output_type,
" Number of faces = ",field%DECOMPOSITION%TOPOLOGY%FACES%NUMBER_OF_FACES, &
12384 DO nf=1,field%DECOMPOSITION%TOPOLOGY%FACES%NUMBER_OF_FACES
12385 CALL write_string_fmt_two_value(diagnostic_output_type,
" Face ",nf,
"(I8)",
" area = ",field% &
12386 & geometric_field_parameters%AREAS(nf),
"*",err,error,*999)
12390 exits(
"Field_GeometricParametersFaceAreasCalculate")
12392 999
IF(
ASSOCIATED(interpolated_point_metrics))
CALL field_interpolatedpointsmetricsfinalise(interpolated_point_metrics, &
12393 & dummy_err,dummy_error,*999)
12394 IF(
ASSOCIATED(interpolated_point))
CALL field_interpolated_points_finalise(interpolated_point,dummy_err,dummy_error,*999)
12395 IF(
ASSOCIATED(interpolation_parameters))
CALL field_interpolation_parameters_finalise(interpolation_parameters, &
12396 & dummy_err,dummy_error,*999)
12397 errorsexits(
"Field_GeometricParametersFaceAreasCalculate",err,error)
12400 END SUBROUTINE field_geometricparametersfaceareascalculate
12407 SUBROUTINE field_geometricparametersscalefactorsupdate(FIELD,UPDATE_FIELDS_USING,ERR,ERROR,*)
12410 TYPE(field_type),
POINTER :: field
12411 LOGICAL,
INTENT(IN) :: update_fields_using
12412 INTEGER(INTG),
INTENT(OUT) :: err
12413 TYPE(varying_string),
INTENT(OUT) :: error
12415 INTEGER(INTG) :: field_idx,last_field_idx
12416 TYPE(field_type),
POINTER :: field2
12418 enters(
"Field_GeometricParametersScaleFactorsUpdate",err,error,*999)
12420 IF(
ASSOCIATED(field))
THEN 12421 IF(field%TYPE==field_geometric_type)
THEN 12422 IF(update_fields_using)
THEN 12423 last_field_idx=field%GEOMETRIC_FIELD_PARAMETERS%NUMBER_OF_FIELDS_USING
12427 DO field_idx=1,last_field_idx
12428 field2=>field%GEOMETRIC_FIELD_PARAMETERS%FIELDS_USING(field_idx)%PTR
12429 CALL field_scalings_calculate(field2,err,error,*999)
12432 CALL flagerror(
"Field is not geometric field.",err,error,*999)
12435 CALL flagerror(
"Field is not associated.",err,error,*999)
12438 exits(
"Field_GeometricParametersScaleFactorsUpdate")
12440 999 errorsexits(
"Field_GeometricParametersScaleFactorsUpdate",err,error)
12443 END SUBROUTINE field_geometricparametersscalefactorsupdate
12450 SUBROUTINE field_label_get_c(FIELD,LABEL,ERR,ERROR,*)
12453 TYPE(field_type),
POINTER :: field
12454 CHARACTER(LEN=*),
INTENT(OUT) :: label
12455 INTEGER(INTG),
INTENT(OUT) :: err
12456 TYPE(varying_string),
INTENT(OUT) :: error
12458 INTEGER(INTG) :: c_length,vs_length
12459 TYPE(varying_string) :: local_error
12461 enters(
"FIELD_LABEL_GET_C",err,error,*999)
12463 IF(
ASSOCIATED(field))
THEN 12464 IF(field%FIELD_FINISHED)
THEN 12465 c_length=len(label)
12466 vs_length=len_trim(field%LABEL)
12467 IF(c_length>vs_length)
THEN 12468 label=char(len_trim(field%LABEL))
12470 label=char(field%LABEL,c_length)
12473 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
12474 &
" has not been finished." 12475 CALL flagerror(local_error,err,error,*999)
12478 CALL flagerror(
"Field is not associated.",err,error,*999)
12481 exits(
"FIELD_LABEL_GET_C")
12483 999 errorsexits(
"FIELD_LABEL_GET_C",err,error)
12485 END SUBROUTINE field_label_get_c
12492 SUBROUTINE field_label_get_vs(FIELD,LABEL,ERR,ERROR,*)
12495 TYPE(field_type),
POINTER :: field
12496 TYPE(varying_string),
INTENT(OUT) :: label
12497 INTEGER(INTG),
INTENT(OUT) :: err
12498 TYPE(varying_string),
INTENT(OUT) :: error
12500 TYPE(varying_string) :: local_error
12502 enters(
"FIELD_LABEL_GET_VS",err,error,*999)
12504 IF(
ASSOCIATED(field))
THEN 12505 IF(field%FIELD_FINISHED)
THEN 12508 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
12509 &
" has not been finished." 12510 CALL flagerror(local_error,err,error,*999)
12513 CALL flagerror(
"Field is not associated.",err,error,*999)
12516 exits(
"FIELD_LABEL_GET_VS")
12518 999 errorsexits(
"FIELD_LABEL_GET_VS",err,error)
12520 END SUBROUTINE field_label_get_vs
12527 SUBROUTINE field_label_set_c(FIELD,LABEL,ERR,ERROR,*)
12530 TYPE(field_type),
POINTER :: field
12531 CHARACTER(LEN=*),
INTENT(IN) :: label
12532 INTEGER(INTG),
INTENT(OUT) :: err
12533 TYPE(varying_string),
INTENT(OUT) :: error
12535 TYPE(varying_string) :: local_error
12537 enters(
"FIELD_LABEL_SET_C",err,error,*999)
12539 IF(
ASSOCIATED(field))
THEN 12540 IF(field%FIELD_FINISHED)
THEN 12541 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
12542 &
" has been finished." 12543 CALL flagerror(local_error,err,error,*999)
12545 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 12546 IF(field%CREATE_VALUES_CACHE%LABEL_LOCKED)
THEN 12547 local_error=
"The field label has been locked for field number "// &
12548 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 12549 CALL flagerror(local_error,err,error,*999)
12554 local_error=
"Field create values cache is not associated for field number "// &
12555 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12556 CALL flagerror(local_error,err,error,*999)
12560 CALL flagerror(
"Field is not associated.",err,error,*999)
12563 exits(
"FIELD_LABEL_SET_C")
12565 999 errorsexits(
"FIELD_LABEL_SET_C",err,error)
12567 END SUBROUTINE field_label_set_c
12574 SUBROUTINE field_label_set_vs(FIELD,LABEL,ERR,ERROR,*)
12577 TYPE(field_type),
POINTER :: field
12578 TYPE(varying_string),
INTENT(IN) :: label
12579 INTEGER(INTG),
INTENT(OUT) :: err
12580 TYPE(varying_string),
INTENT(OUT) :: error
12582 TYPE(varying_string) :: local_error
12584 enters(
"FIELD_LABEL_SET_VS",err,error,*999)
12586 IF(
ASSOCIATED(field))
THEN 12587 IF(field%FIELD_FINISHED)
THEN 12588 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
12589 &
" has been finished." 12590 CALL flagerror(local_error,err,error,*999)
12592 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 12593 IF(field%CREATE_VALUES_CACHE%LABEL_LOCKED)
THEN 12594 local_error=
"The field label has been locked for field number "// &
12595 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 12596 CALL flagerror(local_error,err,error,*999)
12601 local_error=
"Field create values cache is not associated for field number "// &
12602 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12603 CALL flagerror(local_error,err,error,*999)
12607 CALL flagerror(
"Field is not associated.",err,error,*999)
12610 exits(
"FIELD_LABEL_SET_VS")
12612 999 errorsexits(
"FIELD_LABEL_SET_VS",err,error)
12614 END SUBROUTINE field_label_set_vs
12621 SUBROUTINE field_label_set_and_lock_c(FIELD,LABEL,ERR,ERROR,*)
12624 TYPE(field_type),
POINTER :: field
12625 CHARACTER(LEN=*),
INTENT(IN) :: label
12626 INTEGER(INTG),
INTENT(OUT) :: err
12627 TYPE(varying_string),
INTENT(OUT) :: error
12629 TYPE(varying_string) :: local_error
12631 enters(
"FIELD_LABEL_SET_AND_LOCK_C",err,error,*999)
12633 CALL field_label_set(field,label,err,error,*999)
12634 IF(
ASSOCIATED(field))
THEN 12635 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 12636 field%CREATE_VALUES_CACHE%LABEL_LOCKED=.true.
12638 local_error=
"Field create values cache is not associated for field number "// &
12639 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12640 CALL flagerror(local_error,err,error,*999)
12643 CALL flagerror(
"Field is not associated.",err,error,*999)
12646 exits(
"FIELD_LABEL_SET_AND_LOCK_C")
12648 999 errorsexits(
"FIELD_LABEL_SET_AND_LOCK_C",err,error)
12650 END SUBROUTINE field_label_set_and_lock_c
12657 SUBROUTINE field_label_set_and_lock_vs(FIELD,LABEL,ERR,ERROR,*)
12660 TYPE(field_type),
POINTER :: field
12661 TYPE(varying_string),
INTENT(IN) :: label
12662 INTEGER(INTG),
INTENT(OUT) :: err
12663 TYPE(varying_string),
INTENT(OUT) :: error
12665 TYPE(varying_string) :: local_error
12667 enters(
"FIELD_LABEL_SET_AND_LOCK_VS",err,error,*999)
12669 CALL field_label_set(field,label,err,error,*999)
12670 IF(
ASSOCIATED(field))
THEN 12671 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 12672 field%CREATE_VALUES_CACHE%LABEL_LOCKED=.true.
12674 local_error=
"Field create values cache is not associated for field number "// &
12675 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12676 CALL flagerror(local_error,err,error,*999)
12679 CALL flagerror(
"Field is not associated.",err,error,*999)
12682 exits(
"FIELD_LABEL_SET_AND_LOCK_VS")
12684 999 errorsexits(
"FIELD_LABEL_SET_AND_LOCK_VS",err,error)
12686 END SUBROUTINE field_label_set_and_lock_vs
12693 SUBROUTINE field_mesh_decomposition_get(FIELD,MESH_DECOMPOSITION,ERR,ERROR,*)
12696 TYPE(field_type),
POINTER :: field
12697 TYPE(decomposition_type),
POINTER :: mesh_decomposition
12698 INTEGER(INTG),
INTENT(OUT) :: err
12699 TYPE(varying_string),
INTENT(OUT) :: error
12701 TYPE(varying_string) :: local_error
12703 enters(
"FIELD_MESH_DECOMPOSITION_GET",err,error,*999)
12705 IF(
ASSOCIATED(field))
THEN 12706 IF(field%FIELD_FINISHED)
THEN 12707 IF(
ASSOCIATED(mesh_decomposition))
THEN 12708 CALL flagerror(
"Mesh decomposition is already associated.",err,error,*999)
12710 NULLIFY(mesh_decomposition)
12711 mesh_decomposition=>field%DECOMPOSITION
12712 IF(.NOT.
ASSOCIATED(mesh_decomposition))
CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
12715 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
12716 &
" has not been finished." 12717 CALL flagerror(local_error,err,error,*999)
12720 CALL flagerror(
"Field is not associated.",err,error,*999)
12723 exits(
"FIELD_MESH_DECOMPOSITION_GET")
12725 999 errorsexits(
"FIELD_MESH_DECOMPOSITION_GET",err,error)
12727 END SUBROUTINE field_mesh_decomposition_get
12734 SUBROUTINE field_mesh_decomposition_set(FIELD,MESH_DECOMPOSITION,ERR,ERROR,*)
12737 TYPE(field_type),
POINTER :: field
12738 TYPE(decomposition_type),
POINTER :: mesh_decomposition
12739 INTEGER(INTG),
INTENT(OUT) :: err
12740 TYPE(varying_string),
INTENT(OUT) :: error
12742 TYPE(mesh_type),
POINTER :: mesh
12743 TYPE(interface_type),
POINTER :: mesh_interface,field_interface
12744 TYPE(region_type),
POINTER :: mesh_region,field_region,parent_region
12745 TYPE(varying_string) :: local_error
12747 enters(
"FIELD_MESH_DECOMPOSITION_SET",err,error,*999)
12749 IF(
ASSOCIATED(field))
THEN 12750 IF(field%FIELD_FINISHED)
THEN 12751 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
12752 &
" has been finished." 12753 CALL flagerror(local_error,err,error,*999)
12755 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 12756 IF(field%CREATE_VALUES_CACHE%DECOMPOSITION_LOCKED)
THEN 12757 local_error=
"The mesh decomposition has been locked for field number "// &
12758 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 12759 CALL flagerror(local_error,err,error,*999)
12761 IF(
ASSOCIATED(mesh_decomposition))
THEN 12762 mesh=>mesh_decomposition%MESH
12763 IF(
ASSOCIATED(mesh))
THEN 12764 NULLIFY(mesh_interface)
12765 mesh_region=>mesh%REGION
12766 IF(
ASSOCIATED(mesh_region))
THEN 12767 NULLIFY(field_interface)
12768 field_region=>field%REGION
12769 IF(
ASSOCIATED(field_region))
THEN 12770 IF(mesh_region%USER_NUMBER==field_region%USER_NUMBER)
THEN 12771 field%DECOMPOSITION=>mesh_decomposition
12773 local_error=
"Inconsitent regions. The field is defined on region number "// &
12774 & trim(number_to_vstring(field%REGION%USER_NUMBER,
"*",err,error))// &
12775 &
" and the mesh decomposition is defined on region number "//&
12776 & trim(number_to_vstring(mesh_decomposition%MESH%REGION%USER_NUMBER,
"*",err,error))//
"." 12777 CALL flagerror(local_error,err,error,*999)
12780 field_interface=>field%INTERFACE
12781 IF(
ASSOCIATED(field_interface))
THEN 12782 parent_region=>field_interface%PARENT_REGION
12783 IF(
ASSOCIATED(parent_region))
THEN 12784 local_error=
"Inconsitent setup. The field is defined on interface number "// &
12785 & trim(number_to_vstring(field_interface%USER_NUMBER,
"*",err,error))// &
12786 &
" of parent region number "//trim(number_to_vstring(parent_region%USER_NUMBER,
"*",err,error))// &
12787 &
" and the mesh decomposition is defined on region number "// &
12788 & trim(number_to_vstring(mesh_region%USER_NUMBER,
"*",err,error))//
"." 12789 CALL flagerror(local_error,err,error,*999)
12791 CALL flagerror(
"Field interface has no parent region.",err,error,*999)
12794 local_error=
"Region or interface is not associated for field number "// &
12795 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12796 CALL flagerror(local_error,err,error,*999)
12800 mesh_interface=>mesh%INTERFACE
12801 IF(
ASSOCIATED(mesh_interface))
THEN 12802 parent_region=>mesh_interface%PARENT_REGION
12803 IF(
ASSOCIATED(parent_region))
THEN 12804 field_region=>field%REGION
12805 IF(
ASSOCIATED(field_region))
THEN 12806 local_error=
"Inconsitent setup. The field is defined on region number "// &
12807 & trim(number_to_vstring(field_region%USER_NUMBER,
"*",err,error))// &
12808 &
" and the mesh decomposition is defined on interface number "// &
12809 & trim(number_to_vstring(mesh_interface%USER_NUMBER,
"*",err,error))// &
12810 &
" of parent region number "//trim(number_to_vstring(parent_region%USER_NUMBER,
"*",err,error))//
"." 12811 CALL flagerror(local_error,err,error,*999)
12813 field_interface=>field%INTERFACE
12814 IF(
ASSOCIATED(field_interface))
THEN 12815 parent_region=>field_interface%PARENT_REGION
12816 IF(
ASSOCIATED(parent_region))
THEN 12817 IF(mesh_interface%USER_NUMBER==field_interface%USER_NUMBER)
THEN 12818 field%DECOMPOSITION=>mesh_decomposition
12820 local_error=
"Inconsitent interfaces. The field is defined on interface number "// &
12821 & trim(number_to_vstring(field_interface%USER_NUMBER,
"*",err,error))// &
12822 &
" of parent region number "// &
12823 & trim(number_to_vstring(parent_region%USER_NUMBER,
"*",err,error))// &
12824 &
" and the mesh decomposition is defined on region number "//&
12825 & trim(number_to_vstring(mesh_region%USER_NUMBER,
"*",err,error))//
"." 12826 CALL flagerror(local_error,err,error,*999)
12830 CALL flagerror(
"Field interface parent region is not associated.",err,error,*999)
12833 local_error=
"Region or interface is not associated for field number "// &
12834 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12835 CALL flagerror(local_error,err,error,*999)
12839 CALL flagerror(
"Mesh interface parent region is not associated.",err,error,*999)
12842 local_error=
"Region or interface is not associated for mesh number "// &
12843 & trim(number_to_vstring(mesh%USER_NUMBER,
"*",err,error))//
"." 12844 CALL flagerror(local_error,err,error,*999)
12848 CALL flagerror(
"Mesh is not associated for the mesh decomposition.",err,error,*999)
12851 CALL flagerror(
"Mesh decomposition is not assocaited.",err,error,*999)
12855 local_error=
"Field create values cache is not associated for field number "// &
12856 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12857 CALL flagerror(local_error,err,error,*999)
12861 CALL flagerror(
"Field is not associated.",err,error,*999)
12864 exits(
"FIELD_MESH_DECOMPOSITION_SET")
12866 999 errorsexits(
"FIELD_MESH_DECOMPOSITION_SET",err,error)
12868 END SUBROUTINE field_mesh_decomposition_set
12875 SUBROUTINE field_mesh_decomposition_set_and_lock(FIELD,MESH_DECOMPOSITION,ERR,ERROR,*)
12878 TYPE(field_type),
POINTER :: field
12879 TYPE(decomposition_type),
POINTER :: mesh_decomposition
12880 INTEGER(INTG),
INTENT(OUT) :: err
12881 TYPE(varying_string),
INTENT(OUT) :: error
12883 TYPE(varying_string) :: local_error
12885 enters(
"FIELD_MESH_DECOMPOSITION_SET_AND_LOCK",err,error,*999)
12887 CALL field_mesh_decomposition_set(field,mesh_decomposition,err,error,*999)
12888 IF(
ASSOCIATED(field))
THEN 12889 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 12890 field%CREATE_VALUES_CACHE%DECOMPOSITION_LOCKED=.true.
12892 local_error=
"Field create values cache is not associated for field number "// &
12893 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12894 CALL flagerror(local_error,err,error,*999)
12897 CALL flagerror(
"Field is not associated.",err,error,*999)
12900 exits(
"FIELD_MESH_DECOMPOSITION_SET_AND_LOCK")
12902 999 errorsexits(
"FIELD_MESH_DECOMPOSITION_SET_AND_LOCK",err,error)
12904 END SUBROUTINE field_mesh_decomposition_set_and_lock
12911 SUBROUTINE field_dataprojectionset(field,dataProjection,err,error,*)
12914 TYPE(field_type),
POINTER :: field
12915 TYPE(data_projection_type),
POINTER :: dataprojection
12916 INTEGER(INTG),
INTENT(OUT) :: err
12917 TYPE(varying_string),
INTENT(OUT) :: error
12918 TYPE(varying_string) :: localerror
12920 enters(
"Field_DataProjectionSet",err,error,*999)
12922 IF(
ASSOCIATED(field))
THEN 12923 IF(field%FIELD_FINISHED)
THEN 12924 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
12925 &
" has been finished." 12926 CALL flagerror(localerror,err,error,*999)
12928 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 12929 IF(field%CREATE_VALUES_CACHE%DataProjectionLocked)
THEN 12930 localerror=
"The data projection has been locked for field number "// &
12931 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 12932 CALL flagerror(localerror,err,error,*999)
12934 IF(
ASSOCIATED(dataprojection))
THEN 12935 field%DataProjection=>dataprojection
12937 CALL flagerror(
"Data projection is not associated.",err,error,*999)
12941 localerror=
"Field create values cache is not associated for field number "// &
12942 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12943 CALL flagerror(localerror,err,error,*999)
12947 CALL flagerror(
"Field is not associated.",err,error,*999)
12950 exits(
"Field_DataProjectionSet")
12952 999 errorsexits(
"Field_DataProjectionSet",err,error)
12954 END SUBROUTINE field_dataprojectionset
12961 SUBROUTINE field_number_of_components_check(FIELD,VARIABLE_TYPE,NUMBER_OF_COMPONENTS,ERR,ERROR,*)
12964 TYPE(field_type),
POINTER :: field
12965 INTEGER(INTG),
INTENT(IN) :: variable_type
12966 INTEGER(INTG),
INTENT(IN) :: number_of_components
12967 INTEGER(INTG),
INTENT(OUT) :: err
12968 TYPE(varying_string),
INTENT(OUT) :: error
12970 TYPE(field_variable_type),
POINTER :: field_variable
12971 TYPE(varying_string) :: local_error
12973 enters(
"FIELD_NUMBER_OF_COMPONENTS_CHECK",err,error,*999)
12975 IF(
ASSOCIATED(field))
THEN 12976 IF(field%FIELD_FINISHED)
THEN 12977 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 12978 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
12979 IF(
ASSOCIATED(field_variable))
THEN 12980 IF(field_variable%NUMBER_OF_COMPONENTS/=number_of_components)
THEN 12981 local_error=
"Invalid number of components. The number components for variable type "// &
12982 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
12983 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
12984 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
12985 &
" which does not correspond to the specified number of components of "// &
12986 & trim(number_to_vstring(number_of_components,
"*",err,error))//
"." 12987 CALL flagerror(local_error,err,error,*999)
12990 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
12991 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 12994 local_error=
"The supplied variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
12995 &
" is invalid. The field variable type must be > 1 and <= "// &
12996 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 12997 CALL flagerror(local_error,err,error,*999)
13000 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
13001 &
" has not been finished." 13002 CALL flagerror(local_error,err,error,*999)
13005 CALL flagerror(
"Field is not associated.",err,error,*999)
13008 exits(
"FIELD_NUMBER_OF_COMPONENTS_CHECK")
13010 999 errorsexits(
"FIELD_NUMBER_OF_COMPONENTS_CHECK",err,error)
13012 END SUBROUTINE field_number_of_components_check
13019 SUBROUTINE field_number_of_components_get(FIELD,VARIABLE_TYPE,NUMBER_OF_COMPONENTS,ERR,ERROR,*)
13022 TYPE(field_type),
POINTER :: field
13023 INTEGER(INTG),
INTENT(IN) :: variable_type
13024 INTEGER(INTG),
INTENT(OUT) :: number_of_components
13025 INTEGER(INTG),
INTENT(OUT) :: err
13026 TYPE(varying_string),
INTENT(OUT) :: error
13028 TYPE(field_variable_type),
POINTER :: field_variable
13029 TYPE(varying_string) :: local_error
13031 enters(
"FIELD_NUMBER_OF_COMPONENTS_GET",err,error,*999)
13033 IF(
ASSOCIATED(field))
THEN 13034 IF(field%FIELD_FINISHED)
THEN 13035 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 13036 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
13037 IF(
ASSOCIATED(field_variable))
THEN 13038 number_of_components=field_variable%NUMBER_OF_COMPONENTS
13040 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
13041 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13044 local_error=
"The supplied variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
13045 &
" is invalid. The field variable type must be > 1 and <= "// &
13046 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 13047 CALL flagerror(local_error,err,error,*999)
13050 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
13051 &
" has not been finished." 13052 CALL flagerror(local_error,err,error,*999)
13055 CALL flagerror(
"Field is not associated.",err,error,*999)
13058 exits(
"FIELD_NUMBER_OF_COMPONENTS_GET")
13060 999 errorsexits(
"FIELD_NUMBER_OF_COMPONENTS_GET",err,error)
13062 END SUBROUTINE field_number_of_components_get
13069 SUBROUTINE field_number_of_components_set(FIELD,VARIABLE_TYPE,NUMBER_OF_COMPONENTS,ERR,ERROR,*)
13072 TYPE(field_type),
POINTER :: field
13073 INTEGER(INTG),
INTENT(IN) :: variable_type
13074 INTEGER(INTG),
INTENT(IN) :: number_of_components
13075 INTEGER(INTG),
INTENT(OUT) :: err
13076 TYPE(varying_string),
INTENT(OUT) :: error
13078 INTEGER(INTG) :: component_idx,new_number_of_components,old_number_of_components,overlap_number_of_components,variable_idx
13079 INTEGER(INTG),
ALLOCATABLE :: new_interpolation_type(:,:),new_mesh_component_number(:,:)
13080 LOGICAL,
ALLOCATABLE ::new_component_labels_locked(:,:), new_interpolation_type_locked(:,:), &
13081 & NEW_MESH_COMPONENT_NUMBER_LOCKED(:,:)
13082 TYPE(varying_string) :: local_error
13083 TYPE(varying_string),
ALLOCATABLE :: new_component_labels(:,:)
13085 enters(
"FIELD_NUMBER_OF_COMPONENTS_SET",err,error,*999)
13087 IF(
ASSOCIATED(field))
THEN 13088 IF(field%FIELD_FINISHED)
THEN 13089 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 13090 CALL flagerror(local_error,err,error,*999)
13092 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 13093 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 13094 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 13095 IF(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS_LOCKED(variable_type))
THEN 13096 local_error=
"The number of components has been locked for variable type "// &
13097 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
13098 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 13099 CALL flagerror(local_error,err,error,*999)
13101 SELECT CASE(field%CREATE_VALUES_CACHE%DIMENSION(variable_type))
13102 CASE(field_scalar_dimension_type)
13103 IF(number_of_components/=1)
THEN 13104 local_error=
"Scalar fields cannot have "//trim(number_to_vstring(number_of_components,
"*",err,error))// &
13106 CALL flagerror(local_error,err,error,*999)
13108 CASE(field_vector_dimension_type)
13109 IF(number_of_components>0)
THEN 13110 IF(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)/=number_of_components)
THEN 13111 old_number_of_components=maxval(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS)
13112 new_number_of_components=number_of_components
13113 DO variable_idx=1,field_number_of_variable_types
13114 IF (field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_idx) > new_number_of_components)
THEN 13115 IF (variable_idx /= variable_type)
THEN 13116 new_number_of_components=field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_idx)
13120 overlap_number_of_components=min(old_number_of_components,new_number_of_components)
13121 ALLOCATE(new_component_labels(new_number_of_components,field_number_of_variable_types),stat=err)
13122 IF(err/=0)
CALL flagerror(
"Could not allocate new component labels.",err,error,*999)
13123 ALLOCATE(new_component_labels_locked(new_number_of_components,field_number_of_variable_types),stat=err)
13124 IF(err/=0)
CALL flagerror(
"Could not allocate new component labels locked.",err,error,*999)
13125 ALLOCATE(new_interpolation_type(new_number_of_components,field_number_of_variable_types),stat=err)
13126 IF(err/=0)
CALL flagerror(
"Could not allocate new interpolation type.",err,error,*999)
13127 ALLOCATE(new_interpolation_type_locked(new_number_of_components,field_number_of_variable_types),stat=err)
13128 IF(err/=0)
CALL flagerror(
"Could not allocate new interpolation type locked.",err,error,*999)
13129 ALLOCATE(new_mesh_component_number(new_number_of_components,field_number_of_variable_types),stat=err)
13130 IF(err/=0)
CALL flagerror(
"Could not allocate new mesh component number.",err,error,*999)
13131 ALLOCATE(new_mesh_component_number_locked(new_number_of_components,field_number_of_variable_types),stat=err)
13132 IF(err/=0)
CALL flagerror(
"Could not allocate new mesh component number locked.",err,error,*999)
13134 new_component_labels=
'' 13135 new_component_labels_locked=.false.
13136 new_interpolation_type=0
13137 new_interpolation_type_locked=.false.
13138 new_mesh_component_number=0
13139 new_mesh_component_number_locked=.false.
13140 new_component_labels(1:overlap_number_of_components,:) = &
13141 & field%CREATE_VALUES_CACHE%COMPONENT_LABELS(1:overlap_number_of_components,:)
13142 new_component_labels_locked(1:overlap_number_of_components,:) = &
13143 & field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED(1:overlap_number_of_components,:)
13144 new_interpolation_type(1:overlap_number_of_components,:) = &
13145 & field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(1:overlap_number_of_components,:)
13146 new_interpolation_type_locked(1:overlap_number_of_components,:) = &
13147 & field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED(1:overlap_number_of_components,:)
13148 new_mesh_component_number(1:overlap_number_of_components,:) = &
13149 & field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(1:overlap_number_of_components,:)
13150 new_mesh_component_number_locked(1:overlap_number_of_components,:) = &
13151 & field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED(1:overlap_number_of_components,:)
13153 IF(old_number_of_components<number_of_components)
THEN 13154 DO variable_idx=1,field_number_of_variable_types
13155 DO component_idx=old_number_of_components+1,number_of_components
13156 new_component_labels(component_idx,variable_idx)= &
13157 & trim(number_to_vstring(component_idx,
"*",err,error))
13158 IF(err/=0)
GOTO 999
13160 new_interpolation_type(old_number_of_components+1:number_of_components,variable_idx) = &
13161 & field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(1,variable_idx)
13162 new_mesh_component_number(old_number_of_components+1:number_of_components,variable_idx) = &
13163 & field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(1,variable_idx)
13167 CALL move_alloc(new_component_labels,field%CREATE_VALUES_CACHE%COMPONENT_LABELS)
13168 CALL move_alloc(new_component_labels_locked,field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED)
13169 CALL move_alloc(new_interpolation_type,field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE)
13170 CALL move_alloc(new_interpolation_type_locked,field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED)
13171 CALL move_alloc(new_mesh_component_number,field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER)
13172 CALL move_alloc(new_mesh_component_number_locked,field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED)
13174 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)=number_of_components
13177 local_error=
"Vector fields cannot have "//trim(number_to_vstring(number_of_components,
"*",err,error))// &
13179 CALL flagerror(local_error,err,error,*999)
13181 CASE(field_tensor_dimension_type)
13182 CALL flagerror(
"Not implemented.",err,error,*999)
13184 local_error=
"Field dimension "//trim(number_to_vstring(field%CREATE_VALUES_CACHE%DIMENSION( &
13185 & variable_type),
"*",err,error))//
" is not valid." 13186 CALL flagerror(local_error,err,error,*999)
13190 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
13191 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13192 CALL flagerror(local_error,err,error,*999)
13195 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
13196 &
" is invalid. The variable type must be between 1 and "// &
13197 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 13198 CALL flagerror(local_error,err,error,*999)
13201 local_error=
"Field create values cache is not associated for field number "// &
13202 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13203 CALL flagerror(local_error,err,error,*999)
13207 CALL flagerror(
"Field is not associated.",err,error,*999)
13210 exits(
"FIELD_NUMBER_OF_COMPONENTS_SET")
13212 999
IF(
ALLOCATED(new_component_labels))
DEALLOCATE(new_component_labels)
13213 IF(
ALLOCATED(new_component_labels_locked))
DEALLOCATE(new_component_labels_locked)
13214 IF(
ALLOCATED(new_interpolation_type))
DEALLOCATE(new_interpolation_type)
13215 IF(
ALLOCATED(new_interpolation_type_locked))
DEALLOCATE(new_interpolation_type_locked)
13216 IF(
ALLOCATED(new_mesh_component_number))
DEALLOCATE(new_mesh_component_number)
13217 IF(
ALLOCATED(new_mesh_component_number_locked))
DEALLOCATE(new_mesh_component_number_locked)
13218 errorsexits(
"FIELD_NUMBER_OF_COMPONENTS_SET",err,error)
13220 END SUBROUTINE field_number_of_components_set
13227 SUBROUTINE field_number_of_components_set_and_lock(FIELD,VARIABLE_TYPE,NUMBER_OF_COMPONENTS,ERR,ERROR,*)
13230 TYPE(field_type),
POINTER :: field
13231 INTEGER(INTG),
INTENT(IN) :: variable_type
13232 INTEGER(INTG),
INTENT(IN) :: number_of_components
13233 INTEGER(INTG),
INTENT(OUT) :: err
13234 TYPE(varying_string),
INTENT(OUT) :: error
13236 TYPE(varying_string) :: local_error
13238 enters(
"FIELD_NUMBER_OF_COMPONENTS_SET_AND_LOCK",err,error,*999)
13240 CALL field_number_of_components_set(field,variable_type,number_of_components,err,error,*999)
13241 IF(
ASSOCIATED(field))
THEN 13242 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 13243 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS_LOCKED(variable_type)=.true.
13245 local_error=
"Field create values cache is not associated for field number "// &
13246 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13247 CALL flagerror(local_error,err,error,*999)
13250 CALL flagerror(
"Field is not associated.",err,error,*999)
13253 exits(
"FIELD_NUMBER_OF_COMPONENTS_SET_AND_LOCK")
13255 999 errorsexits(
"FIELD_NUMBER_OF_COMPONENTS_SET_AND_LOCK",err,error)
13257 END SUBROUTINE field_number_of_components_set_and_lock
13264 SUBROUTINE field_number_of_variables_check(FIELD,NUMBER_OF_VARIABLES,ERR,ERROR,*)
13267 TYPE(field_type),
POINTER :: field
13268 INTEGER(INTG),
INTENT(IN) :: number_of_variables
13269 INTEGER(INTG),
INTENT(OUT) :: err
13270 TYPE(varying_string),
INTENT(OUT) :: error
13272 TYPE(varying_string) :: local_error
13274 enters(
"FIELD_NUMBER_OF_VARIABLES_CHECK",err,error,*999)
13276 IF(
ASSOCIATED(field))
THEN 13277 IF(field%FIELD_FINISHED)
THEN 13278 IF(field%NUMBER_OF_VARIABLES/=number_of_variables)
THEN 13279 local_error=
"Invalid number of variables. The number of variables for field number "// &
13280 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
13281 & trim(number_to_vstring(field%NUMBER_OF_VARIABLES,
"*",err,error))// &
13282 &
" which is does correspond to the specified number of variables of "// &
13283 & trim(number_to_vstring(number_of_variables,
"*",err,error))//
"." 13284 CALL flagerror(local_error,err,error,*999)
13287 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
13288 &
" has not been finished." 13289 CALL flagerror(local_error,err,error,*999)
13292 CALL flagerror(
"Field is not associated.",err,error,*999)
13295 exits(
"FIELD_NUMBER_OF_VARIABLES_CHECK")
13297 999 errorsexits(
"FIELD_NUMBER_OF_VARIABLES_CHECK",err,error)
13299 END SUBROUTINE field_number_of_variables_check
13306 SUBROUTINE field_number_of_variables_get(FIELD,NUMBER_OF_VARIABLES,ERR,ERROR,*)
13309 TYPE(field_type),
POINTER :: field
13310 INTEGER(INTG),
INTENT(OUT) :: number_of_variables
13311 INTEGER(INTG),
INTENT(OUT) :: err
13312 TYPE(varying_string),
INTENT(OUT) :: error
13314 TYPE(varying_string) :: local_error
13316 enters(
"FIELD_NUMBER_OF_VARIABLES_GET",err,error,*999)
13318 IF(
ASSOCIATED(field))
THEN 13319 IF(field%FIELD_FINISHED)
THEN 13320 number_of_variables=field%NUMBER_OF_VARIABLES
13322 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
13323 &
" has not been finished." 13324 CALL flagerror(local_error,err,error,*999)
13327 CALL flagerror(
"Field is not associated.",err,error,*999)
13330 exits(
"FIELD_NUMBER_OF_VARIABLES_GET")
13332 999 errorsexits(
"FIELD_NUMBER_OF_VARIABLES_GET",err,error)
13334 END SUBROUTINE field_number_of_variables_get
13341 SUBROUTINE field_number_of_variables_set(FIELD,NUMBER_OF_VARIABLES,ERR,ERROR,*)
13344 TYPE(field_type),
POINTER :: field
13345 INTEGER(INTG),
INTENT(IN) :: number_of_variables
13346 INTEGER(INTG),
INTENT(OUT) :: err
13347 TYPE(varying_string),
INTENT(OUT) :: error
13349 INTEGER(INTG) :: variable_idx,variable_idx2,variable_type
13350 INTEGER(INTG),
ALLOCATABLE :: old_variable_types(:)
13352 TYPE(varying_string) :: local_error
13354 enters(
"FIELD_NUMBER_OF_VARIABLES_SET",err,error,*999)
13356 IF(
ASSOCIATED(field))
THEN 13357 IF(field%FIELD_FINISHED)
THEN 13358 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
13359 &
" has been finished." 13360 CALL flagerror(local_error,err,error,*999)
13362 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 13363 IF(field%CREATE_VALUES_CACHE%NUMBER_OF_VARIABLES_LOCKED)
THEN 13364 local_error=
"The number of variables has been locked field number "// &
13365 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 13366 CALL flagerror(local_error,err,error,*999)
13368 IF(number_of_variables>0.AND.number_of_variables<=field_number_of_variable_types)
THEN 13369 IF(field%NUMBER_OF_VARIABLES/=number_of_variables)
THEN 13370 ALLOCATE(old_variable_types(field%NUMBER_OF_VARIABLES),stat=err)
13371 IF(err/=0)
CALL flagerror(
"Could not allocate old variable types.",err,error,*999)
13372 old_variable_types(1:field%NUMBER_OF_VARIABLES)=field%CREATE_VALUES_CACHE%VARIABLE_TYPES(1: &
13373 & field%NUMBER_OF_VARIABLES)
13374 DEALLOCATE(field%CREATE_VALUES_CACHE%VARIABLE_TYPES)
13375 ALLOCATE(field%CREATE_VALUES_CACHE%VARIABLE_TYPES(number_of_variables),stat=err)
13376 IF(err/=0)
CALL flagerror(
"Could not allocate variable types.",err,error,*999)
13377 field%CREATE_VALUES_CACHE%VARIABLE_TYPES=0
13378 IF(number_of_variables<field%NUMBER_OF_VARIABLES)
THEN 13379 field%CREATE_VALUES_CACHE%VARIABLE_TYPES(1:number_of_variables)=old_variable_types(1:number_of_variables)
13380 DO variable_idx=number_of_variables+1,field%NUMBER_OF_VARIABLES
13381 variable_type=old_variable_types(variable_idx)
13382 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=
"" 13383 field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED(variable_type)=.false.
13384 field%CREATE_VALUES_CACHE%DIMENSION(variable_type)=0
13385 field%CREATE_VALUES_CACHE%DIMENSION_LOCKED(variable_type)=.false.
13386 field%CREATE_VALUES_CACHE%DATA_TYPES(variable_type)=0
13387 field%CREATE_VALUES_CACHE%DATA_TYPES_LOCKED(variable_type)=.false.
13388 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES(variable_type)=0
13389 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES_LOCKED(variable_type)=.false.
13390 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)=0
13391 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS_LOCKED(variable_type)=.false.
13392 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(:,variable_type)=0
13393 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED(:,variable_type)=.false.
13394 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(:,variable_type)=0
13395 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED(:,variable_type)=.false.
13398 field%CREATE_VALUES_CACHE%VARIABLE_TYPES(1:field%NUMBER_OF_VARIABLES)= &
13399 & old_variable_types(1:field%NUMBER_OF_VARIABLES)
13400 DO variable_idx=field%NUMBER_OF_VARIABLES+1,number_of_variables
13402 DO variable_type=1,field_number_of_variable_types
13404 DO variable_idx2=1,field%NUMBER_OF_VARIABLES
13405 IF(field%CREATE_VALUES_CACHE%VARIABLE_TYPES(variable_idx2)==variable_type)
THEN 13410 IF(.NOT.found)
EXIT 13413 CALL flagerror(
"Could not find free variable type???",err,error,*999)
13415 field%CREATE_VALUES_CACHE%VARIABLE_TYPES(variable_idx)=variable_type
13416 SELECT CASE(variable_type)
13417 CASE(field_u_variable_type)
13418 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=
"U" 13419 CASE(field_deludeln_variable_type)
13420 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=
"del U/del n" 13421 CASE(field_deludelt_variable_type)
13422 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=
"del U/del t" 13423 CASE(field_del2udelt2_variable_type)
13424 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=
"del^2 U/del t^2" 13425 CASE(field_v_variable_type)
13426 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=
"V" 13427 CASE(field_delvdeln_variable_type)
13428 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=
"del V/del n" 13430 local_error=
"The variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))//
" is invalid." 13431 CALL flagerror(local_error,err,error,*999)
13433 field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED(variable_type)=.false.
13434 field%CREATE_VALUES_CACHE%DIMENSION(variable_type)=field%CREATE_VALUES_CACHE%DIMENSION( &
13435 & old_variable_types(1))
13436 field%CREATE_VALUES_CACHE%DIMENSION_LOCKED(variable_type)=.false.
13437 field%CREATE_VALUES_CACHE%DATA_TYPES(variable_type)=field%CREATE_VALUES_CACHE%DATA_TYPES( &
13438 & old_variable_types(1))
13439 field%CREATE_VALUES_CACHE%DATA_TYPES_LOCKED(variable_type)=.false.
13440 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES(variable_type)=field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES( &
13441 & old_variable_types(1))
13442 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES_LOCKED(variable_type)=.false.
13443 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)=field%CREATE_VALUES_CACHE% &
13444 & number_of_components(old_variable_types(1))
13445 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS_LOCKED(variable_type)=.false.
13446 field%CREATE_VALUES_CACHE%COMPONENT_LABELS(:,variable_type)=field%CREATE_VALUES_CACHE% &
13447 component_labels(:,field%CREATE_VALUES_CACHE%VARIABLE_TYPES(old_variable_types(1)))
13448 field%CREATE_VALUES_CACHE%COMPONENT_LABELS_LOCKED(:,variable_type)=.false.
13449 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(:,variable_type)=field%CREATE_VALUES_CACHE% &
13450 interpolation_type(:,field%CREATE_VALUES_CACHE%VARIABLE_TYPES(old_variable_types(1)))
13451 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED(:,variable_type)=.false.
13452 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(:,variable_type)=field%CREATE_VALUES_CACHE% &
13453 mesh_component_number(:,field%CREATE_VALUES_CACHE%VARIABLE_TYPES(old_variable_types(1)))
13454 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED(:,variable_type)=.false.
13458 DEALLOCATE(old_variable_types)
13459 field%NUMBER_OF_VARIABLES=number_of_variables
13462 local_error=
"The specified number of variables of "//trim(number_to_vstring(number_of_variables,
"*",err,error))// &
13463 &
" is invalid. The number of variables must be between 1 and "// &
13464 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 13465 CALL flagerror(local_error,err,error,*999)
13469 local_error=
"Field create values cache is not associated for field number "// &
13470 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13471 CALL flagerror(local_error,err,error,*999)
13475 CALL flagerror(
"Field is not associated.",err,error,*999)
13478 exits(
"FIELD_NUMBER_OF_VARIABLES_SET")
13480 999
IF(
ALLOCATED(old_variable_types))
DEALLOCATE(old_variable_types)
13481 errorsexits(
"FIELD_NUMBER_OF_VARIABLES_SET",err,error)
13483 END SUBROUTINE field_number_of_variables_set
13490 SUBROUTINE field_number_of_variables_set_and_lock(FIELD,NUMBER_OF_VARIABLES,ERR,ERROR,*)
13493 TYPE(field_type),
POINTER :: field
13494 INTEGER(INTG),
INTENT(IN) :: number_of_variables
13495 INTEGER(INTG),
INTENT(OUT) :: err
13496 TYPE(varying_string),
INTENT(OUT) :: error
13498 TYPE(varying_string) :: local_error
13500 enters(
"FIELD_NUMBER_OF_VARIABLES_SET_AND_LOCK",err,error,*999)
13502 CALL field_number_of_variables_set(field,number_of_variables,err,error,*999)
13503 IF(
ASSOCIATED(field))
THEN 13504 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 13505 field%CREATE_VALUES_CACHE%NUMBER_OF_VARIABLES_LOCKED=.true.
13508 local_error=
"Field create values cache is not associated for field number "// &
13509 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13510 CALL flagerror(local_error,err,error,*999)
13513 CALL flagerror(
"Field is not associated.",err,error,*999)
13516 exits(
"FIELD_NUMBER_OF_VARIABLES_SET_AND_LOCK")
13518 999 errorsexits(
"FIELD_NUMBER_OF_VARIABLES_SET_AND_LOCK",err,error)
13520 END SUBROUTINE field_number_of_variables_set_and_lock
13527 SUBROUTINE field_parameter_sets_add_dp(FIELD,VARIABLE_TYPE,ALPHA,FIELD_FROM_SET_TYPE,FIELD_TO_SET_TYPE,ERR,ERROR,*)
13530 TYPE(field_type),
POINTER :: field
13531 INTEGER(INTG),
INTENT(IN) :: variable_type
13532 REAL(DP),
INTENT(IN) :: alpha(:)
13533 INTEGER(INTG),
INTENT(IN) :: field_from_set_type(:)
13534 INTEGER(INTG),
INTENT(IN) :: field_to_set_type
13535 INTEGER(INTG),
INTENT(OUT) :: err
13536 TYPE(varying_string),
INTENT(OUT) :: error
13538 INTEGER(INTG) :: dof_idx,parameter_set_idx
13540 TYPE(real_dp_ptr_type) :: field_from_parameters(size(field_from_set_type,1))
13541 TYPE(field_parameter_set_type),
POINTER :: field_from_parameter_set,field_to_parameter_set
13542 TYPE(field_parameter_set_ptr_type) :: field_from_parameter_sets(size(field_from_set_type,1))
13543 TYPE(field_variable_type),
POINTER :: field_variable
13544 TYPE(varying_string) :: local_error
13546 enters(
"FIELD_PARAMETER_SETS_ADD_DP",err,error,*999)
13548 IF(
ASSOCIATED(field))
THEN 13549 IF(field%FIELD_FINISHED)
THEN 13550 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 13551 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
13552 IF(
ASSOCIATED(field_variable))
THEN 13554 IF(field_to_set_type>0.AND.field_to_set_type<field_number_of_set_types)
THEN 13555 field_to_parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_to_set_type)%PTR
13556 IF(
ASSOCIATED(field_to_parameter_set))
THEN 13557 IF(
SIZE(alpha,1)==
SIZE(field_from_set_type,1))
THEN 13558 DO parameter_set_idx=1,
SIZE(field_from_set_type,1)
13559 IF(field_from_set_type(parameter_set_idx)>0.AND. &
13560 & field_from_set_type(parameter_set_idx)<field_number_of_set_types)
THEN 13561 field_from_parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_from_set_type( &
13562 & parameter_set_idx))%PTR
13563 IF(
ASSOCIATED(field_to_parameter_set))
THEN 13564 field_from_parameter_sets(parameter_set_idx)%PTR=>field_from_parameter_set
13565 NULLIFY(field_from_parameters(parameter_set_idx)%PTR)
13566 CALL distributed_vector_data_get(field_from_parameter_sets(parameter_set_idx)%PTR%PARAMETERS, &
13567 & field_from_parameters(parameter_set_idx)%PTR,err,error,*999)
13569 local_error=
"The field from set type of "// &
13570 & trim(number_to_vstring(field_from_set_type(parameter_set_idx),
"*",err,error))// &
13571 &
" in parameter set index "//trim(number_to_vstring(parameter_set_idx,
"*",err,error))// &
13572 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
13574 CALL flagerror(local_error,err,error,*999)
13577 local_error=
"The field from set type of "// &
13578 & trim(number_to_vstring(field_from_set_type(parameter_set_idx),
"*",err,error))// &
13579 &
" for parameter set index "//trim(number_to_vstring(parameter_set_idx,
"*",err,error))// &
13580 &
" is invalid. The field parameter set type must be between 1 and "// &
13581 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 13582 CALL flagerror(local_error,err,error,*999)
13587 DO dof_idx=1,field_variable%TOTAL_NUMBER_OF_DOFS
13589 DO parameter_set_idx=1,
SIZE(field_from_set_type,1)
13590 VALUE=
VALUE+alpha(parameter_set_idx)*field_from_parameters(parameter_set_idx)%PTR(dof_idx)
13592 CALL distributed_vector_values_add(field_to_parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
13595 DO parameter_set_idx=1,
SIZE(field_from_set_type,1)
13596 CALL distributed_vector_data_restore(field_from_parameter_sets(parameter_set_idx)%PTR%PARAMETERS, &
13597 & field_from_parameters(parameter_set_idx)%PTR,err,error,*999)
13600 local_error=
"The size of the alpha array ("//trim(number_to_vstring(
SIZE(alpha,1),
"*",err,error))// &
13601 &
") does not match the size of the from set type array ("// &
13602 & trim(number_to_vstring(
SIZE(field_from_set_type,1),
"*",err,error))//
"." 13605 local_error=
"The field to set type of "//trim(number_to_vstring(field_to_set_type,
"*",err,error))// &
13606 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13607 CALL flagerror(local_error,err,error,*999)
13610 local_error=
"The field to set type of "//trim(number_to_vstring(field_to_set_type,
"*",err,error))// &
13611 &
" is invalid. The field parameter set type must be between 1 and "// &
13612 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 13613 CALL flagerror(local_error,err,error,*999)
13616 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
13617 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13618 CALL flagerror(local_error,err,error,*999)
13621 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
13622 &
" is invalid. The variable type must be between 1 and "// &
13623 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 13624 CALL flagerror(local_error,err,error,*999)
13627 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 13628 CALL flagerror(local_error,err,error,*999)
13631 CALL flagerror(
"Field is not associated.",err,error,*999)
13634 exits(
"FIELD_PARAMETER_SETS_ADD_DP")
13637 999 errorsexits(
"FIELD_PARAMETER_SETS_ADD_DP",err,error)
13639 END SUBROUTINE field_parameter_sets_add_dp
13646 SUBROUTINE field_parameter_sets_add_dp1(FIELD,VARIABLE_TYPE,ALPHA,FIELD_FROM_SET_TYPE,FIELD_TO_SET_TYPE,ERR,ERROR,*)
13649 TYPE(field_type),
POINTER :: field
13650 INTEGER(INTG),
INTENT(IN) :: variable_type
13651 REAL(DP),
INTENT(IN) :: alpha
13652 INTEGER(INTG),
INTENT(IN) :: field_from_set_type
13653 INTEGER(INTG),
INTENT(IN) :: field_to_set_type
13654 INTEGER(INTG),
INTENT(OUT) :: err
13655 TYPE(varying_string),
INTENT(OUT) :: error
13658 enters(
"FIELD_PARAMETER_SETS_ADD_DP1",err,error,*999)
13660 CALL field_parameter_sets_add_dp(field,variable_type,[alpha],[field_from_set_type],field_to_set_type,err,error,*999)
13662 exits(
"FIELD_PARAMETER_SETS_ADD_DP1")
13664 999 errorsexits(
"FIELD_PARAMETER_SETS_ADD_DP1",err,error)
13666 END SUBROUTINE field_parameter_sets_add_dp1
13673 SUBROUTINE field_parameter_sets_copy(FIELD,VARIABLE_TYPE,FIELD_FROM_SET_TYPE,FIELD_TO_SET_TYPE,ALPHA,ERR,ERROR,*)
13676 TYPE(field_type),
POINTER :: field
13677 INTEGER(INTG),
INTENT(IN) :: variable_type
13678 INTEGER(INTG),
INTENT(IN) :: field_from_set_type
13679 INTEGER(INTG),
INTENT(IN) :: field_to_set_type
13680 REAL(DP),
INTENT(IN) :: alpha
13681 INTEGER(INTG),
INTENT(OUT) :: err
13682 TYPE(varying_string),
INTENT(OUT) :: error
13684 TYPE(field_parameter_set_type),
POINTER :: field_from_parameter_set,field_to_parameter_set
13685 TYPE(field_variable_type),
POINTER :: field_variable
13686 TYPE(varying_string) :: local_error
13688 enters(
"FIELD_PARAMETER_SETS_COPY",err,error,*999)
13690 IF(
ASSOCIATED(field))
THEN 13691 IF(field%FIELD_FINISHED)
THEN 13692 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 13693 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
13694 IF(
ASSOCIATED(field_variable))
THEN 13696 IF(field_from_set_type>0.AND.field_from_set_type<field_number_of_set_types)
THEN 13697 field_from_parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_from_set_type)%PTR
13698 IF(
ASSOCIATED(field_from_parameter_set))
THEN 13700 IF(field_to_set_type>0.AND.field_to_set_type<field_number_of_set_types)
THEN 13701 field_to_parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_to_set_type)%PTR
13703 IF(
ASSOCIATED(field_to_parameter_set))
THEN 13704 CALL distributed_vector_copy(field_from_parameter_set%PARAMETERS,field_to_parameter_set%PARAMETERS, &
13705 & alpha,err,error,*999)
13708 IF(
ASSOCIATED(field%INTERFACE))
THEN 13711 local_error=
"The field to set type of "//trim(number_to_vstring(field_to_set_type,
"*",err,error))// &
13712 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13713 CALL flagerror(local_error,err,error,*999)
13717 local_error=
"The field to set type of "//trim(number_to_vstring(field_to_set_type,
"*",err,error))// &
13718 &
" is invalid. The field parameter set type must be between 1 and "// &
13719 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 13720 CALL flagerror(local_error,err,error,*999)
13723 local_error=
"The field from set type of "//trim(number_to_vstring(field_from_set_type,
"*",err,error))// &
13724 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13725 CALL flagerror(local_error,err,error,*999)
13728 local_error=
"The field from set type of "//trim(number_to_vstring(field_from_set_type,
"*",err,error))// &
13729 &
" is invalid. The field parameter set type must be between 1 and "// &
13730 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 13731 CALL flagerror(local_error,err,error,*999)
13734 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
13735 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 13736 CALL flagerror(local_error,err,error,*999)
13739 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
13740 &
" is invalid. The variable type must be between 1 and "// &
13741 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 13742 CALL flagerror(local_error,err,error,*999)
13745 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 13746 CALL flagerror(local_error,err,error,*999)
13749 CALL flagerror(
"Field is not associated.",err,error,*999)
13752 exits(
"FIELD_PARAMETER_SETS_COPY")
13754 999 errorsexits(
"FIELD_PARAMETER_SETS_COPY",err,error)
13757 END SUBROUTINE field_parameter_sets_copy
13765 SUBROUTINE field_parameterstofieldparameterscopy(FROM_FIELD,FROM_VARIABLE_TYPE,FROM_PARAMETER_SET_TYPE, &
13766 & from_component_number,to_field,to_variable_type,to_parameter_set_type,to_component_number,err,error,*)
13769 TYPE(field_type),
POINTER :: from_field
13770 INTEGER(INTG),
INTENT(IN) :: from_variable_type
13771 INTEGER(INTG),
INTENT(IN) :: from_parameter_set_type
13772 INTEGER(INTG),
INTENT(IN) :: from_component_number
13773 TYPE(field_type),
POINTER :: to_field
13774 INTEGER(INTG),
INTENT(IN) :: to_variable_type
13775 INTEGER(INTG),
INTENT(IN) :: to_parameter_set_type
13776 INTEGER(INTG),
INTENT(IN) :: to_component_number
13777 INTEGER(INTG),
INTENT(OUT) :: err
13778 TYPE(varying_string),
INTENT(OUT) :: error
13780 INTEGER(INTG) :: elem_idx,deriv_idx,version_idx,local_ny,node_idx,value_intg,gausspoint_idx
13781 INTEGER(INTG),
POINTER :: from_parameter_data_intg(:)
13782 REAL(SP) :: value_sp
13783 REAL(SP),
POINTER :: from_parameter_data_sp(:)
13784 REAL(DP) :: value_dp
13785 REAL(DP),
POINTER :: from_parameter_data_dp(:)
13787 LOGICAL,
POINTER :: from_parameter_data_l(:)
13788 TYPE(domain_type),
POINTER :: from_domain,to_domain
13789 TYPE(domain_elements_type),
POINTER :: from_domain_elements
13790 TYPE(domain_nodes_type),
POINTER :: from_domain_nodes
13791 TYPE(domain_topology_type),
POINTER :: from_domain_topology
13792 TYPE(field_variable_type),
POINTER :: from_field_variable,to_field_variable
13793 TYPE(varying_string) :: local_error
13795 NULLIFY(from_parameter_data_intg)
13796 NULLIFY(from_parameter_data_sp)
13797 NULLIFY(from_parameter_data_dp)
13798 NULLIFY(from_parameter_data_l)
13800 enters(
"Field_ParametersToFieldParametersCopy",err,error,*999)
13802 IF(
ASSOCIATED(from_field))
THEN 13803 IF(from_field%FIELD_FINISHED)
THEN 13804 IF(from_variable_type>0.AND.from_variable_type<=field_number_of_variable_types)
THEN 13805 from_field_variable=>from_field%VARIABLE_TYPE_MAP(from_variable_type)%PTR
13806 IF(
ASSOCIATED(from_field_variable))
THEN 13807 IF(from_component_number>=1.AND.from_component_number<=from_field_variable%NUMBER_OF_COMPONENTS)
THEN 13808 IF(
ASSOCIATED(to_field))
THEN 13809 IF(to_field%FIELD_FINISHED)
THEN 13810 IF(to_variable_type>0.AND.to_variable_type<=field_number_of_variable_types)
THEN 13811 to_field_variable=>to_field%VARIABLE_TYPE_MAP(to_variable_type)%PTR
13812 IF(
ASSOCIATED(to_field_variable))
THEN 13813 IF(to_component_number>=1.AND.to_component_number<=to_field_variable%NUMBER_OF_COMPONENTS)
THEN 13814 from_domain=>from_field_variable%COMPONENTS(from_component_number)%DOMAIN
13815 to_domain=>to_field_variable%COMPONENTS(to_component_number)%DOMAIN
13816 IF(
ASSOCIATED(from_domain))
THEN 13817 IF(
ASSOCIATED(from_domain,to_domain))
THEN 13818 IF(from_field_variable%COMPONENTS(from_component_number)%INTERPOLATION_TYPE== &
13819 & to_field_variable%COMPONENTS(to_component_number)%INTERPOLATION_TYPE)
THEN 13820 IF(from_field_variable%DATA_TYPE==to_field_variable%DATA_TYPE)
THEN 13821 SELECT CASE(from_field_variable%COMPONENTS(from_component_number)%INTERPOLATION_TYPE)
13822 CASE(field_constant_interpolation)
13823 SELECT CASE(from_field_variable%DATA_TYPE)
13824 CASE(field_intg_type)
13825 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13826 & from_parameter_data_intg,err,error,*999)
13827 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13828 & constant_param2dof_map
13829 value_intg=from_parameter_data_intg(local_ny)
13830 CALL field_parameter_set_update_constant(to_field,to_variable_type,to_parameter_set_type, &
13831 & to_component_number,value_intg,err,error,*999)
13832 CALL field_parameter_set_data_restore(from_field,from_variable_type,from_parameter_set_type, &
13833 & from_parameter_data_intg,err,error,*999)
13834 CASE(field_sp_type)
13835 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13836 & from_parameter_data_sp,err,error,*999)
13837 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13838 & constant_param2dof_map
13839 value_sp=from_parameter_data_sp(local_ny)
13840 CALL field_parameter_set_update_constant(to_field,to_variable_type,to_parameter_set_type, &
13841 & to_component_number,value_sp,err,error,*999)
13842 CALL field_parameter_set_data_restore(from_field,from_variable_type,from_parameter_set_type, &
13843 & from_parameter_data_sp,err,error,*999)
13844 CASE(field_dp_type)
13845 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13846 & from_parameter_data_dp,err,error,*999)
13847 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13848 & constant_param2dof_map
13849 value_dp=from_parameter_data_dp(local_ny)
13850 CALL field_parameter_set_update_constant(to_field,to_variable_type,to_parameter_set_type, &
13851 & to_component_number,value_dp,err,error,*999)
13852 CALL field_parameter_set_data_restore(from_field,from_variable_type,from_parameter_set_type, &
13853 & from_parameter_data_dp,err,error,*999)
13855 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13856 & from_parameter_data_l,err,error,*999)
13857 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13858 & constant_param2dof_map
13859 value_l=from_parameter_data_l(local_ny)
13860 CALL field_parameter_set_update_constant(to_field,to_variable_type,to_parameter_set_type, &
13861 & to_component_number,value_l,err,error,*999)
13862 CALL field_parameter_set_data_restore(from_field,from_variable_type,from_parameter_set_type, &
13863 & from_parameter_data_l,err,error,*999)
13865 local_error=
"The from field variable data type of "// &
13866 & trim(number_to_vstring(from_field_variable%DATA_TYPE,
"*",err,error))// &
13868 CALL flagerror(local_error,err,error,*999)
13870 CASE(field_element_based_interpolation)
13871 from_domain_topology=>from_domain%TOPOLOGY
13872 IF(
ASSOCIATED(from_domain_topology))
THEN 13873 from_domain_elements=>from_domain_topology%ELEMENTS
13874 IF(
ASSOCIATED(from_domain_elements))
THEN 13875 SELECT CASE(from_field_variable%DATA_TYPE)
13876 CASE(field_intg_type)
13877 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13878 & from_parameter_data_intg,err,error,*999)
13879 DO elem_idx=1,from_domain_elements%TOTAL_NUMBER_OF_ELEMENTS
13880 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13881 & element_param2dof_map%ELEMENTS(elem_idx)
13882 value_intg=from_parameter_data_intg(local_ny)
13883 CALL field_parameter_set_update_local_element(to_field,to_variable_type, &
13884 & to_parameter_set_type,elem_idx,to_component_number,value_intg,err,error,*999)
13886 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
13887 & from_parameter_set_type,from_parameter_data_intg,err,error,*999)
13888 CASE(field_sp_type)
13889 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13890 & from_parameter_data_sp,err,error,*999)
13891 DO elem_idx=1,from_domain_elements%TOTAL_NUMBER_OF_ELEMENTS
13892 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13893 & element_param2dof_map%ELEMENTS(elem_idx)
13894 value_sp=from_parameter_data_sp(local_ny)
13895 CALL field_parameter_set_update_local_element(to_field,to_variable_type, &
13896 & to_parameter_set_type,elem_idx,to_component_number,value_sp,err,error,*999)
13898 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
13899 & from_parameter_set_type,from_parameter_data_sp,err,error,*999)
13900 CASE(field_dp_type)
13901 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13902 & from_parameter_data_dp,err,error,*999)
13903 DO elem_idx=1,from_domain_elements%TOTAL_NUMBER_OF_ELEMENTS
13904 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13905 & element_param2dof_map%ELEMENTS(elem_idx)
13906 value_dp=from_parameter_data_dp(local_ny)
13907 CALL field_parameter_set_update_local_element(to_field,to_variable_type, &
13909 & to_parameter_set_type,elem_idx,to_component_number,value_dp,err,error,*999)
13911 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
13912 & from_parameter_set_type,from_parameter_data_dp,err,error,*999)
13914 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13915 & from_parameter_data_l,err,error,*999)
13916 DO elem_idx=1,from_domain_elements%TOTAL_NUMBER_OF_ELEMENTS
13917 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13918 & element_param2dof_map%ELEMENTS(elem_idx)
13919 value_l=from_parameter_data_l(local_ny)
13920 CALL field_parameter_set_update_local_element(to_field,to_variable_type, &
13921 & to_parameter_set_type,elem_idx,to_component_number,value_l,err,error,*999)
13923 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
13924 & from_parameter_set_type,from_parameter_data_l,err,error,*999)
13926 local_error=
"The from field variable data type of "// &
13927 & trim(number_to_vstring(from_field_variable%DATA_TYPE,
"*",err,error))// &
13929 CALL flagerror(local_error,err,error,*999)
13932 CALL flagerror(
"From domain topology elements is not associated.",err,error,*999)
13935 CALL flagerror(
"From domain topology is not associated.",err,error,*999)
13937 CASE(field_node_based_interpolation)
13938 from_domain_topology=>from_domain%TOPOLOGY
13939 IF(
ASSOCIATED(from_domain_topology))
THEN 13940 from_domain_nodes=>from_domain_topology%NODES
13941 IF(
ASSOCIATED(from_domain_nodes))
THEN 13942 SELECT CASE(from_field_variable%DATA_TYPE)
13943 CASE(field_intg_type)
13944 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13945 & from_parameter_data_intg,err,error,*999)
13946 DO node_idx=1,from_domain_nodes%TOTAL_NUMBER_OF_NODES
13947 DO deriv_idx=1,from_domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
13948 DO version_idx=1,from_domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)% &
13950 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13951 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(version_idx)
13952 value_intg=from_parameter_data_intg(local_ny)
13953 CALL field_parameter_set_update_local_node(to_field,to_variable_type, &
13954 & to_parameter_set_type,version_idx,deriv_idx,node_idx,to_component_number, &
13955 & value_intg,err,error,*999)
13959 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
13960 & from_parameter_set_type,from_parameter_data_intg,err,error,*999)
13961 CASE(field_sp_type)
13962 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13963 & from_parameter_data_sp,err,error,*999)
13964 DO node_idx=1,from_domain_nodes%TOTAL_NUMBER_OF_NODES
13965 DO deriv_idx=1,from_domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
13966 DO version_idx=1,from_domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)% &
13968 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13969 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(version_idx)
13970 value_sp=from_parameter_data_sp(local_ny)
13971 CALL field_parameter_set_update_local_node(to_field,to_variable_type, &
13972 & to_parameter_set_type,version_idx,deriv_idx,node_idx,to_component_number, &
13973 & value_sp,err,error,*999)
13977 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
13978 & from_parameter_set_type,from_parameter_data_sp,err,error,*999)
13979 CASE(field_dp_type)
13980 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13981 & from_parameter_data_dp,err,error,*999)
13982 DO node_idx=1,from_domain_nodes%TOTAL_NUMBER_OF_NODES
13983 DO deriv_idx=1,from_domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
13984 DO version_idx=1,from_domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)% &
13986 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
13987 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(version_idx)
13988 value_dp=from_parameter_data_dp(local_ny)
13989 CALL field_parameter_set_update_local_node(to_field,to_variable_type, &
13990 & to_parameter_set_type,version_idx,deriv_idx,node_idx,to_component_number, &
13991 & value_dp,err,error,*999)
13995 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
13996 & from_parameter_set_type,from_parameter_data_dp,err,error,*999)
13998 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
13999 & from_parameter_data_l,err,error,*999)
14000 DO node_idx=1,from_domain_nodes%TOTAL_NUMBER_OF_NODES
14001 DO deriv_idx=1,from_domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
14002 DO version_idx=1,from_domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)% &
14004 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
14005 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(version_idx)
14006 value_l=from_parameter_data_l(local_ny)
14007 CALL field_parameter_set_update_local_node(to_field,to_variable_type, &
14008 & to_parameter_set_type,version_idx,deriv_idx,node_idx,to_component_number, &
14009 & value_l,err,error,*999)
14013 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
14014 & from_parameter_set_type,from_parameter_data_l,err,error,*999)
14016 local_error=
"The from field variable data type of "// &
14017 & trim(number_to_vstring(from_field_variable%DATA_TYPE,
"*",err,error))// &
14019 CALL flagerror(local_error,err,error,*999)
14022 CALL flagerror(
"From domain topology nodes is not associated.",err,error,*999)
14025 CALL flagerror(
"From domain topology is not associated.",err,error,*999)
14027 CASE(field_grid_point_based_interpolation)
14028 CALL flagerror(
"Not implmented.",err,error,*999)
14029 CASE(field_gauss_point_based_interpolation)
14031 from_domain_topology=>from_domain%TOPOLOGY
14032 IF(
ASSOCIATED(from_domain_topology))
THEN 14033 from_domain_elements=>from_domain_topology%ELEMENTS
14034 IF(
ASSOCIATED(from_domain_elements))
THEN 14035 SELECT CASE(from_field_variable%DATA_TYPE)
14036 CASE(field_intg_type)
14037 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
14038 & from_parameter_data_intg,err,error,*999)
14039 DO elem_idx=1,from_domain_elements%TOTAL_NUMBER_OF_ELEMENTS
14040 DO gausspoint_idx=1,
size(from_field_variable%COMPONENTS(from_component_number)% &
14041 & param_to_dof_map%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1)
14042 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
14043 & gauss_point_param2dof_map%GAUSS_POINTS(gausspoint_idx,elem_idx)
14044 value_intg=from_parameter_data_intg(local_ny)
14045 local_ny=to_field%VARIABLE_TYPE_MAP(to_variable_type)%PTR%&
14046 &components(to_component_number)%PARAM_TO_DOF_MAP% &
14047 & gauss_point_param2dof_map%GAUSS_POINTS(gausspoint_idx,elem_idx)
14048 CALL distributed_vector_values_set(to_field%VARIABLE_TYPE_MAP(to_variable_type)%PTR%&
14049 & parameter_sets%SET_TYPE(to_parameter_set_type)%PTR%PARAMETERS,local_ny,value_intg,&
14053 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
14054 & from_parameter_set_type,from_parameter_data_intg,err,error,*999)
14055 CASE(field_sp_type)
14056 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
14057 & from_parameter_data_sp,err,error,*999)
14058 DO elem_idx=1,from_domain_elements%TOTAL_NUMBER_OF_ELEMENTS
14059 DO gausspoint_idx=1,
size(from_field_variable%COMPONENTS(from_component_number)% &
14060 & param_to_dof_map%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1)
14061 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
14062 & gauss_point_param2dof_map%GAUSS_POINTS(gausspoint_idx,elem_idx)
14063 value_sp=from_parameter_data_sp(local_ny)
14064 local_ny=to_field%VARIABLE_TYPE_MAP(to_variable_type)%PTR%&
14065 &components(to_component_number)%PARAM_TO_DOF_MAP% &
14066 & gauss_point_param2dof_map%GAUSS_POINTS(gausspoint_idx,elem_idx)
14067 CALL distributed_vector_values_set(to_field%VARIABLE_TYPE_MAP(to_variable_type)%PTR%&
14068 & parameter_sets%SET_TYPE(to_parameter_set_type)%PTR%PARAMETERS,local_ny,value_sp,&
14072 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
14073 & from_parameter_set_type,from_parameter_data_sp,err,error,*999)
14074 CASE(field_dp_type)
14075 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
14076 & from_parameter_data_dp,err,error,*999)
14077 DO elem_idx=1,from_domain_elements%TOTAL_NUMBER_OF_ELEMENTS
14078 DO gausspoint_idx=1,
size(from_field_variable%COMPONENTS(from_component_number)% &
14079 & param_to_dof_map%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1)
14080 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
14081 & gauss_point_param2dof_map%GAUSS_POINTS(gausspoint_idx,elem_idx)
14082 value_dp=from_parameter_data_dp(local_ny)
14083 local_ny=to_field%VARIABLE_TYPE_MAP(to_variable_type)%PTR%&
14084 &components(to_component_number)%PARAM_TO_DOF_MAP% &
14085 & gauss_point_param2dof_map%GAUSS_POINTS(gausspoint_idx,elem_idx)
14086 CALL distributed_vector_values_set(to_field%VARIABLE_TYPE_MAP(to_variable_type)%PTR%&
14087 & parameter_sets%SET_TYPE(to_parameter_set_type)%PTR%PARAMETERS,local_ny,value_dp,&
14091 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
14092 & from_parameter_set_type,from_parameter_data_dp,err,error,*999)
14094 CALL field_parameter_set_data_get(from_field,from_variable_type,from_parameter_set_type, &
14095 & from_parameter_data_l,err,error,*999)
14096 DO elem_idx=1,from_domain_elements%TOTAL_NUMBER_OF_ELEMENTS
14097 DO gausspoint_idx=1,
size(from_field_variable%COMPONENTS(from_component_number)% &
14098 & param_to_dof_map%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1)
14099 local_ny=from_field_variable%COMPONENTS(from_component_number)%PARAM_TO_DOF_MAP% &
14100 & gauss_point_param2dof_map%GAUSS_POINTS(gausspoint_idx,elem_idx)
14101 value_l=from_parameter_data_l(local_ny)
14102 local_ny=to_field%VARIABLE_TYPE_MAP(to_variable_type)%PTR%&
14103 &components(to_component_number)%PARAM_TO_DOF_MAP% &
14104 & gauss_point_param2dof_map%GAUSS_POINTS(gausspoint_idx,elem_idx)
14105 CALL distributed_vector_values_set(to_field%VARIABLE_TYPE_MAP(to_variable_type)%PTR%&
14106 & parameter_sets%SET_TYPE(to_parameter_set_type)%PTR%PARAMETERS,local_ny,value_l,&
14110 CALL field_parameter_set_data_restore(from_field,from_variable_type, &
14111 & from_parameter_set_type,from_parameter_data_l,err,error,*999)
14113 CALL flagerror(
"Invalid data type or not implemented.",err,error,*999)
14116 CALL flagerror(
"From domain topology elements is not associated.",err,error,*999)
14119 CALL flagerror(
"From domain topology is not associated.",err,error,*999)
14122 CASE(field_data_point_based_interpolation)
14123 CALL flagerror(
"Not implemented.",err,error,*999)
14125 local_error=
"The from field variable component interpolation type of "// &
14126 & trim(number_to_vstring(from_field_variable%COMPONENTS(from_component_number)% &
14127 & interpolation_type,
"*",err,error))//
" is invalid." 14128 CALL flagerror(local_error,err,error,*999)
14131 local_error=
"The from field variable data type of "// &
14132 & trim(number_to_vstring(from_field_variable%DATA_TYPE,
"*",err,error))// &
14133 &
" does not match the to variable data type of "// &
14134 & trim(number_to_vstring(to_field_variable%DATA_TYPE,
"*",err,error))//
"." 14135 CALL flagerror(local_error,err,error,*999)
14138 local_error=
"The from field variable component interpolation type of "// &
14139 & trim(number_to_vstring(from_field_variable%COMPONENTS(from_component_number)% &
14140 & interpolation_type,
"*",err,error))// &
14141 &
" does not match the to variable component interpolation type of "// &
14142 & trim(number_to_vstring(to_field_variable%COMPONENTS(to_component_number)% &
14143 & interpolation_type,
"*",err,error))//
"." 14144 CALL flagerror(local_error,err,error,*999)
14147 CALL flagerror(
"The from field variable component domain is not associated with the "// &
14148 &
"to field variable component domain.",err,error,*999)
14151 CALL flagerror(
"The from variable component domain is not associated.",err,error,*999)
14154 local_error=
"To component number "//trim(number_to_vstring(to_component_number,
"*",err,error))// &
14155 &
" is invalid for to variable type "//trim(number_to_vstring(to_variable_type,
"*",err,error))// &
14156 &
" of field number "//trim(number_to_vstring(to_field%USER_NUMBER,
"*",err,error))//
" which has "// &
14157 & trim(number_to_vstring(to_field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
14159 CALL flagerror(local_error,err,error,*999)
14162 local_error=
"The to field variable type of "//trim(number_to_vstring(to_variable_type,
"*",err,error))// &
14163 &
" has not been created on field number "//trim(number_to_vstring(to_field%USER_NUMBER,
"*",err,error))//
"." 14164 CALL flagerror(local_error,err,error,*999)
14167 local_error=
"The to field variable type of "//trim(number_to_vstring(to_variable_type,
"*",err,error))// &
14168 &
" is invalid. The variable type must be between 1 and "// &
14169 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 14170 CALL flagerror(local_error,err,error,*999)
14173 local_error=
"To field number "//trim(number_to_vstring(to_field%USER_NUMBER,
"*",err,error))// &
14174 &
" has not been finished." 14175 CALL flagerror(local_error,err,error,*999)
14178 CALL flagerror(
"The to field is not associated.",err,error,*999)
14181 local_error=
"From component number "//trim(number_to_vstring(from_component_number,
"*",err,error))// &
14182 &
" is invalid for from variable type "//trim(number_to_vstring(from_variable_type,
"*",err,error))// &
14183 &
" of field number "//trim(number_to_vstring(from_field%USER_NUMBER,
"*",err,error))//
" which has "// &
14184 & trim(number_to_vstring(from_field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
14186 CALL flagerror(local_error,err,error,*999)
14189 local_error=
"The from field variable type of "//trim(number_to_vstring(from_variable_type,
"*",err,error))// &
14190 &
" has not been created on field number "//trim(number_to_vstring(from_field%USER_NUMBER,
"*",err,error))//
"." 14191 CALL flagerror(local_error,err,error,*999)
14194 local_error=
"The from field variable type of "//trim(number_to_vstring(from_variable_type,
"*",err,error))// &
14195 &
" is invalid. The variable type must be between 1 and "// &
14196 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 14197 CALL flagerror(local_error,err,error,*999)
14200 local_error=
"From field number "//trim(number_to_vstring(from_field%USER_NUMBER,
"*",err,error))// &
14201 &
" has not been finished." 14202 CALL flagerror(local_error,err,error,*999)
14205 CALL flagerror(
"The from field is not associated.",err,error,*999)
14208 exits(
"Field_ParametersToFieldParametersCopy")
14210 999 errorsexits(
"Field_ParametersToFieldParametersCopy",err,error)
14213 END SUBROUTINE field_parameterstofieldparameterscopy
14221 SUBROUTINE field_parameter_set_add_constant_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
14224 TYPE(field_type),
POINTER :: field
14225 INTEGER(INTG),
INTENT(IN) :: variable_type
14226 INTEGER(INTG),
INTENT(IN) :: field_set_type
14227 INTEGER(INTG),
INTENT(IN) :: component_number
14228 INTEGER(INTG),
INTENT(IN) ::
VALUE 14229 INTEGER(INTG),
INTENT(OUT) :: err
14230 TYPE(varying_string),
INTENT(OUT) :: error
14232 INTEGER(INTG) :: ny
14233 TYPE(field_parameter_set_type),
POINTER :: parameter_set
14234 TYPE(field_variable_type),
POINTER :: field_variable
14235 TYPE(varying_string) :: local_error
14237 enters(
"FIELD_PARAMETER_SET_ADD_CONSTANT_INTG",err,error,*999)
14239 IF(
ASSOCIATED(field))
THEN 14240 IF(field%FIELD_FINISHED)
THEN 14241 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 14242 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
14243 IF(
ASSOCIATED(field_variable))
THEN 14244 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 14245 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 14246 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
14247 IF(
ASSOCIATED(parameter_set))
THEN 14248 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 14249 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
14250 CASE(field_constant_interpolation)
14251 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 14252 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
14253 CALL distributed_vector_values_add(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
14255 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
14256 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14257 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14258 &
" does not have any constant parameters." 14259 CALL flagerror(local_error,err,error,*999)
14261 CASE(field_element_based_interpolation)
14262 local_error=
"Can not add constant for component number "// &
14263 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14264 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14265 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 14266 CALL flagerror(local_error,err,error,*999)
14267 CASE(field_node_based_interpolation)
14268 local_error=
"Can not add constant for component number "// &
14269 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14270 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14271 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 14272 CALL flagerror(local_error,err,error,*999)
14273 CASE(field_grid_point_based_interpolation)
14274 local_error=
"Can not add constant for component number "// &
14275 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14276 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14277 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 14278 CALL flagerror(local_error,err,error,*999)
14279 CASE(field_gauss_point_based_interpolation)
14280 local_error=
"Can not add constant for component number "// &
14281 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14282 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14283 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 14284 CALL flagerror(local_error,err,error,*999)
14285 CASE(field_data_point_based_interpolation)
14286 local_error=
"Can not add constant for component number "// &
14287 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14288 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14289 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 14290 CALL flagerror(local_error,err,error,*999)
14292 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
14293 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
14294 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14295 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14296 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14297 CALL flagerror(local_error,err,error,*999)
14300 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
14301 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14302 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
14303 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
14305 CALL flagerror(local_error,err,error,*999)
14308 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14309 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14310 CALL flagerror(local_error,err,error,*999)
14313 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14314 &
" is invalid. The field parameter set type must be between 1 and "// &
14315 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 14316 CALL flagerror(local_error,err,error,*999)
14319 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
14320 &
" does not correspond to the integer data type of the given value." 14321 CALL flagerror(local_error,err,error,*999)
14324 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14325 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14326 CALL flagerror(local_error,err,error,*999)
14329 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14330 &
" is invalid. The variable type must be between 1 and "// &
14331 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 14332 CALL flagerror(local_error,err,error,*999)
14335 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14336 &
" has not been finished." 14337 CALL flagerror(local_error,err,error,*999)
14340 CALL flagerror(
"Field is not associated.",err,error,*999)
14343 exits(
"FIELD_PARAMETER_SET_ADD_CONSTANT_INTG")
14345 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_CONSTANT_INTG",err,error)
14347 END SUBROUTINE field_parameter_set_add_constant_intg
14354 SUBROUTINE field_parameter_set_add_constant_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
14357 TYPE(field_type),
POINTER :: field
14358 INTEGER(INTG),
INTENT(IN) :: variable_type
14359 INTEGER(INTG),
INTENT(IN) :: field_set_type
14360 INTEGER(INTG),
INTENT(IN) :: component_number
14361 REAL(SP),
INTENT(IN) ::
VALUE 14362 INTEGER(INTG),
INTENT(OUT) :: err
14363 TYPE(varying_string),
INTENT(OUT) :: error
14365 INTEGER(INTG) :: ny
14366 TYPE(field_parameter_set_type),
POINTER :: parameter_set
14367 TYPE(field_variable_type),
POINTER :: field_variable
14368 TYPE(varying_string) :: local_error
14370 enters(
"FIELD_PARAMETER_SET_ADD_CONSTANT_SP",err,error,*999)
14372 IF(
ASSOCIATED(field))
THEN 14373 IF(field%FIELD_FINISHED)
THEN 14374 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 14375 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
14376 IF(
ASSOCIATED(field_variable))
THEN 14377 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 14378 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 14379 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
14380 IF(
ASSOCIATED(parameter_set))
THEN 14381 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 14382 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
14383 CASE(field_constant_interpolation)
14384 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 14385 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
14386 CALL distributed_vector_values_add(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
14388 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
14389 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14390 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14391 &
" does not have any constant parameters." 14392 CALL flagerror(local_error,err,error,*999)
14394 CASE(field_element_based_interpolation)
14395 local_error=
"Can not add constant for component number "// &
14396 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14397 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14398 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 14399 CALL flagerror(local_error,err,error,*999)
14400 CASE(field_node_based_interpolation)
14401 local_error=
"Can not add constant for component number "// &
14402 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14403 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14404 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 14405 CALL flagerror(local_error,err,error,*999)
14406 CASE(field_grid_point_based_interpolation)
14407 local_error=
"Can not add constant for component number "// &
14408 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14409 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14410 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 14411 CALL flagerror(local_error,err,error,*999)
14412 CASE(field_gauss_point_based_interpolation)
14413 local_error=
"Can not add constant for component number "// &
14414 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14415 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14416 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 14417 CALL flagerror(local_error,err,error,*999)
14418 CASE(field_data_point_based_interpolation)
14419 local_error=
"Can not add constant for component number "// &
14420 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14421 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14422 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 14423 CALL flagerror(local_error,err,error,*999)
14425 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
14426 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
14427 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14428 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14429 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14430 CALL flagerror(local_error,err,error,*999)
14433 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
14434 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14435 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
14436 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
14438 CALL flagerror(local_error,err,error,*999)
14441 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14442 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14443 CALL flagerror(local_error,err,error,*999)
14446 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14447 &
" is invalid. The field parameter set type must be between 1 and "// &
14448 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 14449 CALL flagerror(local_error,err,error,*999)
14452 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
14453 &
" does not correspond to the single precision data type of the given value." 14454 CALL flagerror(local_error,err,error,*999)
14457 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14458 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14459 CALL flagerror(local_error,err,error,*999)
14462 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14463 &
" is invalid. The variable type must be between 1 and "// &
14464 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 14465 CALL flagerror(local_error,err,error,*999)
14468 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14469 &
" has not been finished." 14470 CALL flagerror(local_error,err,error,*999)
14473 CALL flagerror(
"Field is not associated.",err,error,*999)
14476 exits(
"FIELD_PARAMETER_SET_ADD_CONSTANT_SP")
14478 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_CONSTANT_SP",err,error)
14480 END SUBROUTINE field_parameter_set_add_constant_sp
14487 SUBROUTINE field_parameter_set_add_constant_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
14490 TYPE(field_type),
POINTER :: field
14491 INTEGER(INTG),
INTENT(IN) :: variable_type
14492 INTEGER(INTG),
INTENT(IN) :: field_set_type
14493 INTEGER(INTG),
INTENT(IN) :: component_number
14494 REAL(DP),
INTENT(IN) ::
VALUE 14495 INTEGER(INTG),
INTENT(OUT) :: err
14496 TYPE(varying_string),
INTENT(OUT) :: error
14498 INTEGER(INTG) :: ny
14499 TYPE(field_parameter_set_type),
POINTER :: parameter_set
14500 TYPE(field_variable_type),
POINTER :: field_variable
14501 TYPE(varying_string) :: local_error
14503 enters(
"FIELD_PARAMETER_SET_ADD_CONSTANT_DP",err,error,*999)
14505 IF(
ASSOCIATED(field))
THEN 14506 IF(field%FIELD_FINISHED)
THEN 14507 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 14508 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
14509 IF(
ASSOCIATED(field_variable))
THEN 14510 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 14511 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 14512 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
14513 IF(
ASSOCIATED(parameter_set))
THEN 14514 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 14515 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
14516 CASE(field_constant_interpolation)
14517 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 14518 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
14519 CALL distributed_vector_values_add(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
14521 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
14522 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14523 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14524 &
" does not have any constant parameters." 14525 CALL flagerror(local_error,err,error,*999)
14527 CASE(field_element_based_interpolation)
14528 local_error=
"Can not add constant for component number "// &
14529 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14530 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14531 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 14532 CALL flagerror(local_error,err,error,*999)
14533 CASE(field_node_based_interpolation)
14534 local_error=
"Can not add constant for component number "// &
14535 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14536 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14537 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 14538 CALL flagerror(local_error,err,error,*999)
14539 CASE(field_grid_point_based_interpolation)
14540 local_error=
"Can not add constant for component number "// &
14541 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14542 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14543 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 14544 CALL flagerror(local_error,err,error,*999)
14545 CASE(field_gauss_point_based_interpolation)
14546 local_error=
"Can not add constant for component number "// &
14547 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14548 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14549 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 14550 CALL flagerror(local_error,err,error,*999)
14551 CASE(field_data_point_based_interpolation)
14552 local_error=
"Can not add constant for component number "// &
14553 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14554 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14555 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 14556 CALL flagerror(local_error,err,error,*999)
14558 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
14559 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
14560 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14561 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14562 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14563 CALL flagerror(local_error,err,error,*999)
14566 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
14567 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14568 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
14569 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
14571 CALL flagerror(local_error,err,error,*999)
14574 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14575 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14576 CALL flagerror(local_error,err,error,*999)
14579 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14580 &
" is invalid. The field parameter set type must be between 1 and "// &
14581 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 14582 CALL flagerror(local_error,err,error,*999)
14585 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
14586 &
" does not correspond to the double precision data type of the given value." 14587 CALL flagerror(local_error,err,error,*999)
14590 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14591 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14592 CALL flagerror(local_error,err,error,*999)
14595 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14596 &
" is invalid. The variable type must be between 1 and "// &
14597 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 14598 CALL flagerror(local_error,err,error,*999)
14601 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14602 &
" has not been finished." 14603 CALL flagerror(local_error,err,error,*999)
14606 CALL flagerror(
"Field is not associated.",err,error,*999)
14609 exits(
"FIELD_PARAMETER_SET_ADD_CONSTANT_DP")
14611 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_CONSTANT_DP",err,error)
14613 END SUBROUTINE field_parameter_set_add_constant_dp
14620 SUBROUTINE field_parameter_set_add_constant_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
14623 TYPE(field_type),
POINTER :: field
14624 INTEGER(INTG),
INTENT(IN) :: variable_type
14625 INTEGER(INTG),
INTENT(IN) :: field_set_type
14626 INTEGER(INTG),
INTENT(IN) :: component_number
14627 LOGICAL,
INTENT(IN) ::
VALUE 14628 INTEGER(INTG),
INTENT(OUT) :: err
14629 TYPE(varying_string),
INTENT(OUT) :: error
14631 INTEGER(INTG) :: ny
14632 TYPE(field_parameter_set_type),
POINTER :: parameter_set
14633 TYPE(field_variable_type),
POINTER :: field_variable
14634 TYPE(varying_string) :: local_error
14636 enters(
"FIELD_PARAMETER_SET_ADD_CONSTANT_L",err,error,*999)
14638 IF(
ASSOCIATED(field))
THEN 14639 IF(field%FIELD_FINISHED)
THEN 14640 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 14641 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
14642 IF(
ASSOCIATED(field_variable))
THEN 14643 IF(field_variable%DATA_TYPE==field_l_type)
THEN 14644 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 14645 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
14646 IF(
ASSOCIATED(parameter_set))
THEN 14647 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 14648 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
14649 CASE(field_constant_interpolation)
14650 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 14651 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
14652 CALL distributed_vector_values_add(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
14654 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
14655 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14656 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14657 &
" does not have any constant parameters." 14658 CALL flagerror(local_error,err,error,*999)
14660 CASE(field_element_based_interpolation)
14661 local_error=
"Can not add constant for component number "// &
14662 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14663 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14664 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 14665 CALL flagerror(local_error,err,error,*999)
14666 CASE(field_node_based_interpolation)
14667 local_error=
"Can not add constant for component number "// &
14668 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14669 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14670 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 14671 CALL flagerror(local_error,err,error,*999)
14672 CASE(field_grid_point_based_interpolation)
14673 local_error=
"Can not add constant for component number "// &
14674 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14675 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14676 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 14677 CALL flagerror(local_error,err,error,*999)
14678 CASE(field_gauss_point_based_interpolation)
14679 local_error=
"Can not add constant for component number "// &
14680 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14681 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14682 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 14683 CALL flagerror(local_error,err,error,*999)
14684 CASE(field_data_point_based_interpolation)
14685 local_error=
"Can not add constant for component number "// &
14686 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14687 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14688 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 14689 CALL flagerror(local_error,err,error,*999)
14691 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
14692 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
14693 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
14694 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
14695 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14696 CALL flagerror(local_error,err,error,*999)
14699 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
14700 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14701 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
14702 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
14704 CALL flagerror(local_error,err,error,*999)
14707 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14708 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14709 CALL flagerror(local_error,err,error,*999)
14712 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14713 &
" is invalid. The field parameter set type must be between 1 and "// &
14714 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 14715 CALL flagerror(local_error,err,error,*999)
14718 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
14719 &
" does not correspond to the logical data type of the given value." 14720 CALL flagerror(local_error,err,error,*999)
14723 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14724 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14725 CALL flagerror(local_error,err,error,*999)
14728 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14729 &
" is invalid. The variable type must be between 1 and "// &
14730 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 14731 CALL flagerror(local_error,err,error,*999)
14734 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14735 &
" has not been finished." 14736 CALL flagerror(local_error,err,error,*999)
14739 CALL flagerror(
"Field is not associated.",err,error,*999)
14742 exits(
"FIELD_PARAMETER_SET_ADD_CONSTANT_L")
14744 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_CONSTANT_L",err,error)
14746 END SUBROUTINE field_parameter_set_add_constant_l
14753 SUBROUTINE field_parameter_set_add_local_dof_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
14756 TYPE(field_type),
POINTER :: field
14757 INTEGER(INTG),
INTENT(IN) :: variable_type
14758 INTEGER(INTG),
INTENT(IN) :: field_set_type
14759 INTEGER(INTG),
INTENT(IN) :: dof_number
14760 INTEGER(INTG),
INTENT(IN) ::
VALUE 14761 INTEGER(INTG),
INTENT(OUT) :: err
14762 TYPE(varying_string),
INTENT(OUT) :: error
14764 INTEGER(INTG) :: global_dof_number
14765 TYPE(field_parameter_set_type),
POINTER :: parameter_set
14766 TYPE(field_variable_type),
POINTER :: field_variable
14767 TYPE(varying_string) :: local_error
14769 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_INTG",err,error,*999)
14772 IF(
ASSOCIATED(field))
THEN 14773 IF(field%FIELD_FINISHED)
THEN 14774 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 14775 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
14776 IF(
ASSOCIATED(field_variable))
THEN 14777 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 14778 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 14779 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
14780 IF(
ASSOCIATED(parameter_set))
THEN 14784 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL)
THEN 14785 global_dof_number=field_variable%DOMAIN_MAPPING%LOCAL_TO_GLOBAL_MAP(dof_number)
14786 IF(field_variable%DOMAIN_MAPPING%GLOBAL_TO_LOCAL_MAP(global_dof_number)%LOCAL_TYPE(1)/=domain_local_ghost)
THEN 14787 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
14789 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
14790 &
" is invalid as it is a ghost dof for this domain." 14791 CALL flagerror(local_error,err,error,*999)
14794 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
14795 &
" is invalid. It must be >0 and <="// &
14796 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL,
"*",err,error))// &
14797 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14798 CALL flagerror(local_error,err,error,*999)
14801 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14802 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14803 CALL flagerror(local_error,err,error,*999)
14806 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14807 &
" is invalid. The field parameter set type must be between 1 and "// &
14808 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 14809 CALL flagerror(local_error,err,error,*999)
14812 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
14813 &
" does not correspond to the integer data type of the given value." 14814 CALL flagerror(local_error,err,error,*999)
14817 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14818 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14819 CALL flagerror(local_error,err,error,*999)
14822 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14823 &
" is invalid. The variable type must be between 1 and "// &
14824 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 14825 CALL flagerror(local_error,err,error,*999)
14828 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14829 &
" has not been finished." 14830 CALL flagerror(local_error,err,error,*999)
14833 CALL flagerror(
"Field is not associated.",err,error,*999)
14836 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_INTG")
14838 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_INTG",err,error)
14840 END SUBROUTINE field_parameter_set_add_local_dof_intg
14847 SUBROUTINE field_parameter_set_add_local_dof_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
14850 TYPE(field_type),
POINTER :: field
14851 INTEGER(INTG),
INTENT(IN) :: variable_type
14852 INTEGER(INTG),
INTENT(IN) :: field_set_type
14853 INTEGER(INTG),
INTENT(IN) :: dof_number
14854 REAL(SP),
INTENT(IN) ::
VALUE 14855 INTEGER(INTG),
INTENT(OUT) :: err
14856 TYPE(varying_string),
INTENT(OUT) :: error
14858 INTEGER(INTG) :: global_dof_number
14859 TYPE(field_parameter_set_type),
POINTER :: parameter_set
14860 TYPE(field_variable_type),
POINTER :: field_variable
14861 TYPE(varying_string) :: local_error
14863 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_SP",err,error,*999)
14866 IF(
ASSOCIATED(field))
THEN 14867 IF(field%FIELD_FINISHED)
THEN 14868 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 14869 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
14870 IF(
ASSOCIATED(field_variable))
THEN 14871 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 14872 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 14873 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
14874 IF(
ASSOCIATED(parameter_set))
THEN 14878 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL)
THEN 14879 global_dof_number=field_variable%DOMAIN_MAPPING%LOCAL_TO_GLOBAL_MAP(dof_number)
14880 IF(field_variable%DOMAIN_MAPPING%GLOBAL_TO_LOCAL_MAP(global_dof_number)%LOCAL_TYPE(1)/=domain_local_ghost)
THEN 14881 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
14883 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
14884 &
" is invalid as it is a ghost dof for this domain." 14885 CALL flagerror(local_error,err,error,*999)
14888 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
14889 &
" is invalid. It must be >0 and <="// &
14890 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL,
"*",err,error))// &
14891 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14892 CALL flagerror(local_error,err,error,*999)
14895 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14896 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14897 CALL flagerror(local_error,err,error,*999)
14900 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14901 &
" is invalid. The field parameter set type must be between 1 and "// &
14902 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 14903 CALL flagerror(local_error,err,error,*999)
14906 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
14907 &
" does not correspond to the single precision data type of the given value." 14908 CALL flagerror(local_error,err,error,*999)
14911 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14912 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14913 CALL flagerror(local_error,err,error,*999)
14916 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
14917 &
" is invalid. The variable type must be between 1 and "// &
14918 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 14919 CALL flagerror(local_error,err,error,*999)
14922 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
14923 &
" has not been finished." 14924 CALL flagerror(local_error,err,error,*999)
14927 CALL flagerror(
"Field is not associated.",err,error,*999)
14930 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_SP")
14932 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_SP",err,error)
14934 END SUBROUTINE field_parameter_set_add_local_dof_sp
14941 SUBROUTINE field_parameter_set_add_local_dof_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
14944 TYPE(field_type),
POINTER :: field
14945 INTEGER(INTG),
INTENT(IN) :: variable_type
14946 INTEGER(INTG),
INTENT(IN) :: field_set_type
14947 INTEGER(INTG),
INTENT(IN) :: dof_number
14948 REAL(DP),
INTENT(IN) ::
VALUE 14949 INTEGER(INTG),
INTENT(OUT) :: err
14950 TYPE(varying_string),
INTENT(OUT) :: error
14952 INTEGER(INTG) :: global_dof_number
14953 TYPE(field_parameter_set_type),
POINTER :: parameter_set
14954 TYPE(field_variable_type),
POINTER :: field_variable
14955 TYPE(varying_string) :: local_error
14957 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_DP",err,error,*999)
14960 IF(
ASSOCIATED(field))
THEN 14961 IF(field%FIELD_FINISHED)
THEN 14962 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 14963 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
14964 IF(
ASSOCIATED(field_variable))
THEN 14965 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 14966 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 14967 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
14968 IF(
ASSOCIATED(parameter_set))
THEN 14972 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL)
THEN 14973 global_dof_number=field_variable%DOMAIN_MAPPING%LOCAL_TO_GLOBAL_MAP(dof_number)
14974 IF(field_variable%DOMAIN_MAPPING%GLOBAL_TO_LOCAL_MAP(global_dof_number)%LOCAL_TYPE(1)/=domain_local_ghost)
THEN 14975 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
14977 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
14978 &
" is invalid as it is a ghost dof for this domain." 14979 CALL flagerror(local_error,err,error,*999)
14982 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
14983 &
" is invalid. It must be >0 and <="// &
14984 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL,
"*",err,error))// &
14985 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14986 CALL flagerror(local_error,err,error,*999)
14989 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14990 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 14991 CALL flagerror(local_error,err,error,*999)
14994 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
14995 &
" is invalid. The field parameter set type must be between 1 and "// &
14996 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 14997 CALL flagerror(local_error,err,error,*999)
15000 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
15001 &
" does not correspond to the double precision data type of the given value." 15002 CALL flagerror(local_error,err,error,*999)
15005 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15006 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15007 CALL flagerror(local_error,err,error,*999)
15010 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15011 &
" is invalid. The variable type must be between 1 and "// &
15012 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 15013 CALL flagerror(local_error,err,error,*999)
15016 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
15017 &
" has not been finished." 15018 CALL flagerror(local_error,err,error,*999)
15021 CALL flagerror(
"Field is not associated.",err,error,*999)
15024 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_DP")
15026 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_DP",err,error)
15028 END SUBROUTINE field_parameter_set_add_local_dof_dp
15035 SUBROUTINE field_parameter_set_add_local_dof_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
15038 TYPE(field_type),
POINTER :: field
15039 INTEGER(INTG),
INTENT(IN) :: variable_type
15040 INTEGER(INTG),
INTENT(IN) :: field_set_type
15041 INTEGER(INTG),
INTENT(IN) :: dof_number
15042 LOGICAL,
INTENT(IN) ::
VALUE 15043 INTEGER(INTG),
INTENT(OUT) :: err
15044 TYPE(varying_string),
INTENT(OUT) :: error
15046 INTEGER(INTG) :: global_dof_number
15047 TYPE(field_parameter_set_type),
POINTER :: parameter_set
15048 TYPE(field_variable_type),
POINTER :: field_variable
15049 TYPE(varying_string) :: local_error
15051 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_L",err,error,*999)
15054 IF(
ASSOCIATED(field))
THEN 15055 IF(field%FIELD_FINISHED)
THEN 15056 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 15057 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
15058 IF(
ASSOCIATED(field_variable))
THEN 15059 IF(field_variable%DATA_TYPE==field_l_type)
THEN 15060 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 15061 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
15062 IF(
ASSOCIATED(parameter_set))
THEN 15066 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL)
THEN 15067 global_dof_number=field_variable%DOMAIN_MAPPING%LOCAL_TO_GLOBAL_MAP(dof_number)
15068 IF(field_variable%DOMAIN_MAPPING%GLOBAL_TO_LOCAL_MAP(global_dof_number)%LOCAL_TYPE(1)/=domain_local_ghost)
THEN 15069 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
15071 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
15072 &
" is invalid as it is a ghost dof for this domain." 15073 CALL flagerror(local_error,err,error,*999)
15076 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
15077 &
" is invalid. It must be >0 and <="// &
15078 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL,
"*",err,error))// &
15079 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15080 CALL flagerror(local_error,err,error,*999)
15083 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15084 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15085 CALL flagerror(local_error,err,error,*999)
15088 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15089 &
" is invalid. The field parameter set type must be between 1 and "// &
15090 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 15091 CALL flagerror(local_error,err,error,*999)
15094 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
15095 &
" does not correspond to the logical data type of the given value." 15096 CALL flagerror(local_error,err,error,*999)
15099 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15100 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15101 CALL flagerror(local_error,err,error,*999)
15104 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15105 &
" is invalid. The variable type must be between 1 and "// &
15106 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 15107 CALL flagerror(local_error,err,error,*999)
15110 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
15111 &
" has not been finished." 15112 CALL flagerror(local_error,err,error,*999)
15115 CALL flagerror(
"Field is not associated.",err,error,*999)
15118 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_L")
15120 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_DOF_L",err,error)
15122 END SUBROUTINE field_parameter_set_add_local_dof_l
15129 SUBROUTINE field_parameter_set_add_element_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
15130 &
VALUE,err,error,*)
15133 TYPE(field_type),
POINTER :: field
15134 INTEGER(INTG),
INTENT(IN) :: variable_type
15135 INTEGER(INTG),
INTENT(IN) :: field_set_type
15136 INTEGER(INTG),
INTENT(IN) :: user_element_number
15137 INTEGER(INTG),
INTENT(IN) :: component_number
15138 INTEGER(INTG),
INTENT(IN) ::
VALUE 15139 INTEGER(INTG),
INTENT(OUT) :: err
15140 TYPE(varying_string),
INTENT(OUT) :: error
15142 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
15143 LOGICAL :: ghost_element,user_element_exists
15144 TYPE(decomposition_type),
POINTER :: decomposition
15145 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
15146 TYPE(field_parameter_set_type),
POINTER :: parameter_set
15147 TYPE(field_variable_type),
POINTER :: field_variable
15148 TYPE(varying_string) :: local_error
15150 enters(
"FIELD_PARAMETER_SET_ADD_ELEMENT_INTG",err,error,*999)
15152 IF(
ASSOCIATED(field))
THEN 15153 IF(field%FIELD_FINISHED)
THEN 15154 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 15155 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
15156 IF(
ASSOCIATED(field_variable))
THEN 15157 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 15158 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 15159 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
15160 IF(
ASSOCIATED(parameter_set))
THEN 15161 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 15162 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
15163 CASE(field_constant_interpolation)
15164 local_error=
"Can not add element for component number "// &
15165 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15166 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15167 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 15168 CALL flagerror(local_error,err,error,*999)
15169 CASE(field_element_based_interpolation)
15170 decomposition=>field%DECOMPOSITION
15171 IF(
ASSOCIATED(decomposition))
THEN 15172 decomposition_topology=>decomposition%TOPOLOGY
15173 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
15174 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
15175 IF(user_element_exists)
THEN 15176 IF(ghost_element)
THEN 15177 local_error=
"Cannot add element for user element "// &
15178 & trim(number_to_vstring(user_element_number,
"*",err,error))//
" as it is a ghost element." 15179 CALL flagerror(local_error,err,error,*999)
15181 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
15182 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
15183 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
15186 local_error=
"The specified user element number of "// &
15187 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
15188 &
" does not exist in the decomposition for field component number "// &
15189 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
15190 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15191 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15192 CALL flagerror(local_error,err,error,*999)
15195 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
15197 CASE(field_node_based_interpolation)
15198 local_error=
"Can not add element for component number "// &
15199 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15200 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15201 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 15202 CALL flagerror(local_error,err,error,*999)
15203 CASE(field_grid_point_based_interpolation)
15204 local_error=
"Can not add element for component number "// &
15205 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15206 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15207 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 15208 CALL flagerror(local_error,err,error,*999)
15209 CASE(field_gauss_point_based_interpolation)
15210 local_error=
"Can not add element for component number "// &
15211 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15212 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15213 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 15214 CALL flagerror(local_error,err,error,*999)
15215 CASE(field_data_point_based_interpolation)
15216 local_error=
"Can not add element for component number "// &
15217 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15218 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15219 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 15220 CALL flagerror(local_error,err,error,*999)
15222 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
15223 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
15224 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15225 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15226 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15227 CALL flagerror(local_error,err,error,*999)
15230 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
15231 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15232 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
15233 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
15235 CALL flagerror(local_error,err,error,*999)
15238 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15239 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15240 CALL flagerror(local_error,err,error,*999)
15243 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15244 &
" is invalid. The field parameter set type must be between 1 and "// &
15245 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 15246 CALL flagerror(local_error,err,error,*999)
15249 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
15250 &
" does not correspond to the integer data type of the given value." 15251 CALL flagerror(local_error,err,error,*999)
15254 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15255 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15256 CALL flagerror(local_error,err,error,*999)
15259 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15260 &
" is invalid. The variable type must be between 1 and "// &
15261 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 15262 CALL flagerror(local_error,err,error,*999)
15265 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
15266 &
" has not been finished." 15267 CALL flagerror(local_error,err,error,*999)
15270 CALL flagerror(
"Field is not associated.",err,error,*999)
15273 exits(
"FIELD_PARAMETER_SET_ADD_ELEMENT_INTG")
15275 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_ELEMENT_INTG",err,error)
15277 END SUBROUTINE field_parameter_set_add_element_intg
15284 SUBROUTINE field_parameter_set_add_element_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
15285 &
VALUE,err,error,*)
15288 TYPE(field_type),
POINTER :: field
15289 INTEGER(INTG),
INTENT(IN) :: variable_type
15290 INTEGER(INTG),
INTENT(IN) :: field_set_type
15291 INTEGER(INTG),
INTENT(IN) :: user_element_number
15292 INTEGER(INTG),
INTENT(IN) :: component_number
15293 REAL(SP),
INTENT(IN) ::
VALUE 15294 INTEGER(INTG),
INTENT(OUT) :: err
15295 TYPE(varying_string),
INTENT(OUT) :: error
15297 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
15298 LOGICAL :: ghost_element,user_element_exists
15299 TYPE(decomposition_type),
POINTER :: decomposition
15300 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
15301 TYPE(field_parameter_set_type),
POINTER :: parameter_set
15302 TYPE(field_variable_type),
POINTER :: field_variable
15303 TYPE(varying_string) :: local_error
15305 enters(
"FIELD_PARAMETER_SET_ADD_ELEMENT_SP",err,error,*999)
15307 IF(
ASSOCIATED(field))
THEN 15308 IF(field%FIELD_FINISHED)
THEN 15309 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 15310 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
15311 IF(
ASSOCIATED(field_variable))
THEN 15312 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 15313 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 15314 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
15315 IF(
ASSOCIATED(parameter_set))
THEN 15316 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 15317 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
15318 CASE(field_constant_interpolation)
15319 local_error=
"Can not add element for component number "// &
15320 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15321 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15322 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 15323 CALL flagerror(local_error,err,error,*999)
15324 CASE(field_element_based_interpolation)
15325 decomposition=>field%DECOMPOSITION
15326 IF(
ASSOCIATED(decomposition))
THEN 15327 decomposition_topology=>decomposition%TOPOLOGY
15328 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
15329 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
15330 IF(user_element_exists)
THEN 15331 IF(ghost_element)
THEN 15332 local_error=
"Cannot add element for user element "// &
15333 & trim(number_to_vstring(user_element_number,
"*",err,error))//
" as it is a ghost element." 15334 CALL flagerror(local_error,err,error,*999)
15336 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
15337 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
15338 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
15341 local_error=
"The specified user element number of "// &
15342 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
15343 &
" does not exist in the decomposition for field component number "// &
15344 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
15345 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15346 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15347 CALL flagerror(local_error,err,error,*999)
15350 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
15352 CASE(field_node_based_interpolation)
15353 local_error=
"Can not add element for component number "// &
15354 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15355 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15356 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 15357 CALL flagerror(local_error,err,error,*999)
15358 CASE(field_grid_point_based_interpolation)
15359 local_error=
"Can not add element for component number "// &
15360 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15361 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15362 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 15363 CALL flagerror(local_error,err,error,*999)
15364 CASE(field_gauss_point_based_interpolation)
15365 local_error=
"Can not add element for component number "// &
15366 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15367 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15368 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 15369 CALL flagerror(local_error,err,error,*999)
15370 CASE(field_data_point_based_interpolation)
15371 local_error=
"Can not add element for component number "// &
15372 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15373 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15374 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 15375 CALL flagerror(local_error,err,error,*999)
15377 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
15378 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
15379 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15380 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15381 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15382 CALL flagerror(local_error,err,error,*999)
15385 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
15386 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15387 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
15388 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
15390 CALL flagerror(local_error,err,error,*999)
15393 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15394 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15395 CALL flagerror(local_error,err,error,*999)
15398 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15399 &
" is invalid. The field parameter set type must be between 1 and "// &
15401 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 15402 CALL flagerror(local_error,err,error,*999)
15405 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
15406 &
" does not correspond to the single precision data type of the given value." 15407 CALL flagerror(local_error,err,error,*999)
15410 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15411 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15412 CALL flagerror(local_error,err,error,*999)
15415 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15416 &
" is invalid. The variable type must be between 1 and "// &
15417 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 15418 CALL flagerror(local_error,err,error,*999)
15421 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
15422 &
" has not been finished." 15423 CALL flagerror(local_error,err,error,*999)
15426 CALL flagerror(
"Field is not associated.",err,error,*999)
15429 exits(
"FIELD_PARAMETER_SET_ADD_ELEMENT_SP")
15431 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_ELEMENT_SP",err,error)
15433 END SUBROUTINE field_parameter_set_add_element_sp
15440 SUBROUTINE field_parameter_set_add_element_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
15441 &
VALUE,err,error,*)
15444 TYPE(field_type),
POINTER :: field
15445 INTEGER(INTG),
INTENT(IN) :: variable_type
15446 INTEGER(INTG),
INTENT(IN) :: field_set_type
15447 INTEGER(INTG),
INTENT(IN) :: user_element_number
15448 INTEGER(INTG),
INTENT(IN) :: component_number
15449 REAL(DP),
INTENT(IN) ::
VALUE 15450 INTEGER(INTG),
INTENT(OUT) :: err
15451 TYPE(varying_string),
INTENT(OUT) :: error
15453 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
15454 LOGICAL :: ghost_element,user_element_exists
15455 TYPE(decomposition_type),
POINTER :: decomposition
15456 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
15457 TYPE(field_parameter_set_type),
POINTER :: parameter_set
15458 TYPE(field_variable_type),
POINTER :: field_variable
15459 TYPE(varying_string) :: local_error
15461 enters(
"FIELD_PARAMETER_SET_ADD_ELEMENT_DP",err,error,*999)
15463 IF(
ASSOCIATED(field))
THEN 15464 IF(field%FIELD_FINISHED)
THEN 15465 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 15466 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
15467 IF(
ASSOCIATED(field_variable))
THEN 15468 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 15469 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 15470 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
15471 IF(
ASSOCIATED(parameter_set))
THEN 15472 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 15473 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
15474 CASE(field_constant_interpolation)
15475 local_error=
"Can not add element for component number "// &
15476 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15477 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15478 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 15479 CALL flagerror(local_error,err,error,*999)
15480 CASE(field_element_based_interpolation)
15481 decomposition=>field%DECOMPOSITION
15482 IF(
ASSOCIATED(decomposition))
THEN 15483 decomposition_topology=>decomposition%TOPOLOGY
15484 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
15485 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
15486 IF(user_element_exists)
THEN 15487 IF(ghost_element)
THEN 15488 local_error=
"Cannot add element for user element "// &
15489 & trim(number_to_vstring(user_element_number,
"*",err,error))//
" as it is a ghost element." 15490 CALL flagerror(local_error,err,error,*999)
15492 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
15493 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
15494 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
15497 local_error=
"The specified user element number of "// &
15498 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
15499 &
" does not exist in the decomposition for field component number "// &
15500 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
15501 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15502 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15503 CALL flagerror(local_error,err,error,*999)
15506 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
15508 CASE(field_node_based_interpolation)
15509 local_error=
"Can not add element for component number "// &
15510 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15511 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15512 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 15513 CALL flagerror(local_error,err,error,*999)
15514 CASE(field_grid_point_based_interpolation)
15515 local_error=
"Can not add element for component number "// &
15516 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15517 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15518 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 15519 CALL flagerror(local_error,err,error,*999)
15520 CASE(field_gauss_point_based_interpolation)
15521 local_error=
"Can not add element for component number "// &
15522 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15523 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15524 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 15525 CALL flagerror(local_error,err,error,*999)
15526 CASE(field_data_point_based_interpolation)
15527 local_error=
"Can not add element for component number "// &
15528 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15529 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15530 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 15531 CALL flagerror(local_error,err,error,*999)
15533 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
15534 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
15535 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15536 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15537 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15538 CALL flagerror(local_error,err,error,*999)
15541 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
15542 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15543 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
15544 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
15546 CALL flagerror(local_error,err,error,*999)
15549 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15550 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15551 CALL flagerror(local_error,err,error,*999)
15554 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15555 &
" is invalid. The field parameter set type must be between 1 and "// &
15556 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 15557 CALL flagerror(local_error,err,error,*999)
15560 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
15561 &
" does not correspond to the double precision data type of the given value." 15562 CALL flagerror(local_error,err,error,*999)
15565 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15566 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15567 CALL flagerror(local_error,err,error,*999)
15570 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15571 &
" is invalid. The variable type must be between 1 and "// &
15572 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 15573 CALL flagerror(local_error,err,error,*999)
15576 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
15577 &
" has not been finished." 15578 CALL flagerror(local_error,err,error,*999)
15581 CALL flagerror(
"Field is not associated.",err,error,*999)
15584 exits(
"FIELD_PARAMETER_SET_ADD_ELEMENT_DP")
15586 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_ELEMENT_DP",err,error)
15588 END SUBROUTINE field_parameter_set_add_element_dp
15595 SUBROUTINE field_parameter_set_add_element_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
15596 &
VALUE,err,error,*)
15599 TYPE(field_type),
POINTER :: field
15600 INTEGER(INTG),
INTENT(IN) :: variable_type
15601 INTEGER(INTG),
INTENT(IN) :: field_set_type
15602 INTEGER(INTG),
INTENT(IN) :: user_element_number
15603 INTEGER(INTG),
INTENT(IN) :: component_number
15604 LOGICAL,
INTENT(IN) ::
VALUE 15605 INTEGER(INTG),
INTENT(OUT) :: err
15606 TYPE(varying_string),
INTENT(OUT) :: error
15608 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
15609 LOGICAL :: ghost_element,user_element_exists
15610 TYPE(decomposition_type),
POINTER :: decomposition
15611 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
15612 TYPE(field_parameter_set_type),
POINTER :: parameter_set
15613 TYPE(field_variable_type),
POINTER :: field_variable
15614 TYPE(varying_string) :: local_error
15616 enters(
"FIELD_PARAMETER_SET_ADD_ELEMENT_L",err,error,*999)
15618 IF(
ASSOCIATED(field))
THEN 15619 IF(field%FIELD_FINISHED)
THEN 15620 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 15621 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
15622 IF(
ASSOCIATED(field_variable))
THEN 15623 IF(field_variable%DATA_TYPE==field_l_type)
THEN 15624 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 15625 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
15626 IF(
ASSOCIATED(parameter_set))
THEN 15627 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 15628 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
15629 CASE(field_constant_interpolation)
15630 local_error=
"Can not add element for component number "// &
15631 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15632 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15633 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 15634 CALL flagerror(local_error,err,error,*999)
15635 CASE(field_element_based_interpolation)
15636 decomposition=>field%DECOMPOSITION
15637 IF(
ASSOCIATED(decomposition))
THEN 15638 decomposition_topology=>decomposition%TOPOLOGY
15639 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
15640 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
15641 IF(user_element_exists)
THEN 15642 IF(ghost_element)
THEN 15643 local_error=
"Cannot add element for user element "// &
15644 & trim(number_to_vstring(user_element_number,
"*",err,error))//
" as it is a ghost element." 15645 CALL flagerror(local_error,err,error,*999)
15647 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
15648 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
15649 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
15652 local_error=
"The specified user element number of "// &
15653 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
15654 &
" does not exist in the decomposition for field component number "// &
15655 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
15656 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15657 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15658 CALL flagerror(local_error,err,error,*999)
15661 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
15663 CASE(field_node_based_interpolation)
15664 local_error=
"Can not add element for component number "// &
15665 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15666 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15667 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 15668 CALL flagerror(local_error,err,error,*999)
15669 CASE(field_grid_point_based_interpolation)
15670 local_error=
"Can not add element for component number "// &
15671 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15672 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15673 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 15674 CALL flagerror(local_error,err,error,*999)
15675 CASE(field_gauss_point_based_interpolation)
15676 local_error=
"Can not add element for component number "// &
15677 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15678 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15679 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 15680 CALL flagerror(local_error,err,error,*999)
15681 CASE(field_data_point_based_interpolation)
15682 local_error=
"Can not add element for component number "// &
15683 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15684 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15685 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 15686 CALL flagerror(local_error,err,error,*999)
15688 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
15689 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
15690 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15691 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15692 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15693 CALL flagerror(local_error,err,error,*999)
15696 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
15697 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15698 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
15699 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
15701 CALL flagerror(local_error,err,error,*999)
15704 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15705 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15706 CALL flagerror(local_error,err,error,*999)
15709 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15710 &
" is invalid. The field parameter set type must be between 1 and "// &
15711 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 15712 CALL flagerror(local_error,err,error,*999)
15715 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
15716 &
" does not correspond to the double precision data type of the given value." 15717 CALL flagerror(local_error,err,error,*999)
15720 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15721 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15722 CALL flagerror(local_error,err,error,*999)
15725 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15726 &
" is invalid. The variable type must be between 1 and "// &
15727 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 15728 CALL flagerror(local_error,err,error,*999)
15731 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
15732 &
" has not been finished." 15733 CALL flagerror(local_error,err,error,*999)
15736 CALL flagerror(
"Field is not associated.",err,error,*999)
15739 exits(
"FIELD_PARAMETER_SET_ADD_ELEMENT_L")
15741 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_ELEMENT_L",err,error)
15743 END SUBROUTINE field_parameter_set_add_element_l
15750 SUBROUTINE field_parameter_set_add_local_element_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,LOCAL_ELEMENT_NUMBER,COMPONENT_NUMBER, &
15751 &
VALUE,err,error,*)
15754 TYPE(field_type),
POINTER :: field
15755 INTEGER(INTG),
INTENT(IN) :: variable_type
15756 INTEGER(INTG),
INTENT(IN) :: field_set_type
15757 INTEGER(INTG),
INTENT(IN) :: local_element_number
15758 INTEGER(INTG),
INTENT(IN) :: component_number
15759 INTEGER(INTG),
INTENT(IN) ::
VALUE 15760 INTEGER(INTG),
INTENT(OUT) :: err
15761 TYPE(varying_string),
INTENT(OUT) :: error
15763 INTEGER(INTG) :: ny
15764 TYPE(field_parameter_set_type),
POINTER :: parameter_set
15765 TYPE(field_variable_type),
POINTER :: field_variable
15766 TYPE(varying_string) :: local_error
15768 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_INTG",err,error,*999)
15770 IF(
ASSOCIATED(field))
THEN 15771 IF(field%FIELD_FINISHED)
THEN 15772 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 15773 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
15774 IF(
ASSOCIATED(field_variable))
THEN 15775 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 15776 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 15777 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
15778 IF(
ASSOCIATED(parameter_set))
THEN 15779 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 15780 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
15781 CASE(field_constant_interpolation)
15782 local_error=
"Can not add element for component number "// &
15783 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15784 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15785 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 15786 CALL flagerror(local_error,err,error,*999)
15787 CASE(field_element_based_interpolation)
15788 IF(local_element_number>0.AND.local_element_number<=field_variable%COMPONENTS(component_number)% &
15789 & param_to_dof_map%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS)
THEN 15790 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS( &
15791 & local_element_number)
15792 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
15794 local_error=
"Local element number "//trim(number_to_vstring(local_element_number,
"*",err,error))// &
15795 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
15796 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15797 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
15798 &
" which has "//trim(number_to_vstring(field_variable%COMPONENTS(component_number)% &
15799 & param_to_dof_map%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" elements." 15800 CALL flagerror(local_error,err,error,*999)
15802 CASE(field_node_based_interpolation)
15803 local_error=
"Can not add element for component number "// &
15804 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15805 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15806 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 15807 CALL flagerror(local_error,err,error,*999)
15808 CASE(field_grid_point_based_interpolation)
15809 local_error=
"Can not add element for component number "// &
15810 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15811 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15812 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 15813 CALL flagerror(local_error,err,error,*999)
15814 CASE(field_gauss_point_based_interpolation)
15815 local_error=
"Can not add element for component number "// &
15816 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15817 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15818 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 15819 CALL flagerror(local_error,err,error,*999)
15820 CASE(field_data_point_based_interpolation)
15821 local_error=
"Can not add element for component number "// &
15822 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15823 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15824 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 15825 CALL flagerror(local_error,err,error,*999)
15827 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
15828 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
15829 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15830 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15831 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15832 CALL flagerror(local_error,err,error,*999)
15835 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
15836 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15837 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
15838 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
15840 CALL flagerror(local_error,err,error,*999)
15843 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15844 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15845 CALL flagerror(local_error,err,error,*999)
15848 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15849 &
" is invalid. The field parameter set type must be between 1 and "// &
15850 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 15851 CALL flagerror(local_error,err,error,*999)
15854 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
15855 &
" does not correspond to the integer data type of the given value." 15856 CALL flagerror(local_error,err,error,*999)
15859 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15860 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15861 CALL flagerror(local_error,err,error,*999)
15864 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15865 &
" is invalid. The variable type must be between 1 and "// &
15866 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 15867 CALL flagerror(local_error,err,error,*999)
15870 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
15871 &
" has not been finished." 15872 CALL flagerror(local_error,err,error,*999)
15875 CALL flagerror(
"Field is not associated.",err,error,*999)
15878 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_INTG")
15880 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_INTG",err,error)
15882 END SUBROUTINE field_parameter_set_add_local_element_intg
15889 SUBROUTINE field_parameter_set_add_local_element_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,LOCAL_ELEMENT_NUMBER,COMPONENT_NUMBER, &
15890 &
VALUE,err,error,*)
15893 TYPE(field_type),
POINTER :: field
15894 INTEGER(INTG),
INTENT(IN) :: variable_type
15895 INTEGER(INTG),
INTENT(IN) :: field_set_type
15896 INTEGER(INTG),
INTENT(IN) :: local_element_number
15897 INTEGER(INTG),
INTENT(IN) :: component_number
15898 REAL(SP),
INTENT(IN) ::
VALUE 15899 INTEGER(INTG),
INTENT(OUT) :: err
15900 TYPE(varying_string),
INTENT(OUT) :: error
15902 INTEGER(INTG) :: ny
15903 TYPE(field_parameter_set_type),
POINTER :: parameter_set
15904 TYPE(field_variable_type),
POINTER :: field_variable
15905 TYPE(varying_string) :: local_error
15907 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_SP",err,error,*999)
15909 IF(
ASSOCIATED(field))
THEN 15910 IF(field%FIELD_FINISHED)
THEN 15911 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 15912 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
15913 IF(
ASSOCIATED(field_variable))
THEN 15914 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 15915 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 15916 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
15917 IF(
ASSOCIATED(parameter_set))
THEN 15918 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 15919 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
15920 CASE(field_constant_interpolation)
15921 local_error=
"Can not add element for component number "// &
15922 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15923 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15924 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 15925 CALL flagerror(local_error,err,error,*999)
15926 CASE(field_element_based_interpolation)
15927 IF(local_element_number>0.AND.local_element_number<=field_variable%COMPONENTS(component_number)% &
15928 & param_to_dof_map%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS)
THEN 15929 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS( &
15930 & local_element_number)
15931 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
15933 local_error=
"Local element number "//trim(number_to_vstring(local_element_number,
"*",err,error))// &
15934 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
15935 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15936 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
15937 &
" which has "//trim(number_to_vstring(field_variable%COMPONENTS(component_number)% &
15938 & param_to_dof_map%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" elements." 15939 CALL flagerror(local_error,err,error,*999)
15941 CASE(field_node_based_interpolation)
15942 local_error=
"Can not add element for component number "// &
15943 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15944 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15945 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 15946 CALL flagerror(local_error,err,error,*999)
15947 CASE(field_grid_point_based_interpolation)
15948 local_error=
"Can not add element for component number "// &
15949 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15950 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15951 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 15952 CALL flagerror(local_error,err,error,*999)
15953 CASE(field_gauss_point_based_interpolation)
15954 local_error=
"Can not add element for component number "// &
15955 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15956 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15957 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 15958 CALL flagerror(local_error,err,error,*999)
15959 CASE(field_data_point_based_interpolation)
15960 local_error=
"Can not add element for component number "// &
15961 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15962 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15963 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 15964 CALL flagerror(local_error,err,error,*999)
15966 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
15967 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
15968 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
15969 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
15970 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15971 CALL flagerror(local_error,err,error,*999)
15974 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
15975 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15976 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
15977 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
15979 CALL flagerror(local_error,err,error,*999)
15982 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15983 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 15984 CALL flagerror(local_error,err,error,*999)
15987 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
15988 &
" is invalid. The field parameter set type must be between 1 and "// &
15989 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 15990 CALL flagerror(local_error,err,error,*999)
15993 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
15994 &
" does not correspond to the single precision data type of the given value." 15995 CALL flagerror(local_error,err,error,*999)
15998 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
15999 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16000 CALL flagerror(local_error,err,error,*999)
16003 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16004 &
" is invalid. The variable type must be between 1 and "// &
16005 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 16006 CALL flagerror(local_error,err,error,*999)
16009 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
16010 &
" has not been finished." 16011 CALL flagerror(local_error,err,error,*999)
16014 CALL flagerror(
"Field is not associated.",err,error,*999)
16017 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_SP")
16019 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_SP",err,error)
16021 END SUBROUTINE field_parameter_set_add_local_element_sp
16028 SUBROUTINE field_parameter_set_add_local_element_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,LOCAL_ELEMENT_NUMBER,COMPONENT_NUMBER, &
16029 &
VALUE,err,error,*)
16032 TYPE(field_type),
POINTER :: field
16033 INTEGER(INTG),
INTENT(IN) :: variable_type
16034 INTEGER(INTG),
INTENT(IN) :: field_set_type
16035 INTEGER(INTG),
INTENT(IN) :: local_element_number
16036 INTEGER(INTG),
INTENT(IN) :: component_number
16037 REAL(DP),
INTENT(IN) ::
VALUE 16038 INTEGER(INTG),
INTENT(OUT) :: err
16039 TYPE(varying_string),
INTENT(OUT) :: error
16041 INTEGER(INTG) :: ny
16042 TYPE(field_parameter_set_type),
POINTER :: parameter_set
16043 TYPE(field_variable_type),
POINTER :: field_variable
16044 TYPE(varying_string) :: local_error
16046 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_DP",err,error,*999)
16048 IF(
ASSOCIATED(field))
THEN 16049 IF(field%FIELD_FINISHED)
THEN 16050 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 16051 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
16052 IF(
ASSOCIATED(field_variable))
THEN 16053 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 16054 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 16055 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
16056 IF(
ASSOCIATED(parameter_set))
THEN 16057 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 16058 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
16059 CASE(field_constant_interpolation)
16060 local_error=
"Can not add element for component number "// &
16061 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16062 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16063 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 16064 CALL flagerror(local_error,err,error,*999)
16065 CASE(field_element_based_interpolation)
16066 IF(local_element_number>0.AND.local_element_number<=field_variable%COMPONENTS(component_number)% &
16067 & param_to_dof_map%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS)
THEN 16068 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS( &
16069 & local_element_number)
16070 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
16072 local_error=
"Local element number "//trim(number_to_vstring(local_element_number,
"*",err,error))// &
16073 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
16074 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16075 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
16076 &
" which has "//trim(number_to_vstring(field_variable%COMPONENTS(component_number)% &
16077 & param_to_dof_map%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" elements." 16078 CALL flagerror(local_error,err,error,*999)
16080 CASE(field_node_based_interpolation)
16081 local_error=
"Can not add element for component number "// &
16082 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16083 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16084 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 16085 CALL flagerror(local_error,err,error,*999)
16086 CASE(field_grid_point_based_interpolation)
16087 local_error=
"Can not add element for component number "// &
16088 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16089 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16090 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 16091 CALL flagerror(local_error,err,error,*999)
16092 CASE(field_gauss_point_based_interpolation)
16093 local_error=
"Can not add element for component number "// &
16094 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16095 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16096 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 16097 CALL flagerror(local_error,err,error,*999)
16098 CASE(field_data_point_based_interpolation)
16099 local_error=
"Can not add element for component number "// &
16100 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16101 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16102 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 16103 CALL flagerror(local_error,err,error,*999)
16105 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
16106 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
16107 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16108 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16109 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16110 CALL flagerror(local_error,err,error,*999)
16113 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
16114 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16115 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
16116 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
16118 CALL flagerror(local_error,err,error,*999)
16121 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16122 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16123 CALL flagerror(local_error,err,error,*999)
16126 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16127 &
" is invalid. The field parameter set type must be between 1 and "// &
16128 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 16129 CALL flagerror(local_error,err,error,*999)
16132 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
16133 &
" does not correspond to the double precision data type of the given value." 16134 CALL flagerror(local_error,err,error,*999)
16137 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16138 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16139 CALL flagerror(local_error,err,error,*999)
16142 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16143 &
" is invalid. The variable type must be between 1 and "// &
16144 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 16145 CALL flagerror(local_error,err,error,*999)
16148 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
16149 &
" has not been finished." 16150 CALL flagerror(local_error,err,error,*999)
16153 CALL flagerror(
"Field is not associated.",err,error,*999)
16156 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_DP")
16158 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_DP",err,error)
16160 END SUBROUTINE field_parameter_set_add_local_element_dp
16167 SUBROUTINE field_parameter_set_add_local_element_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,LOCAL_ELEMENT_NUMBER,COMPONENT_NUMBER, &
16168 &
VALUE,err,error,*)
16171 TYPE(field_type),
POINTER :: field
16172 INTEGER(INTG),
INTENT(IN) :: variable_type
16173 INTEGER(INTG),
INTENT(IN) :: field_set_type
16174 INTEGER(INTG),
INTENT(IN) :: local_element_number
16175 INTEGER(INTG),
INTENT(IN) :: component_number
16176 LOGICAL,
INTENT(IN) ::
VALUE 16177 INTEGER(INTG),
INTENT(OUT) :: err
16178 TYPE(varying_string),
INTENT(OUT) :: error
16180 INTEGER(INTG) :: ny
16181 TYPE(field_parameter_set_type),
POINTER :: parameter_set
16182 TYPE(field_variable_type),
POINTER :: field_variable
16183 TYPE(varying_string) :: local_error
16185 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_L",err,error,*999)
16187 IF(
ASSOCIATED(field))
THEN 16188 IF(field%FIELD_FINISHED)
THEN 16189 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 16190 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
16191 IF(
ASSOCIATED(field_variable))
THEN 16192 IF(field_variable%DATA_TYPE==field_l_type)
THEN 16193 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 16194 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
16195 IF(
ASSOCIATED(parameter_set))
THEN 16196 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 16197 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
16198 CASE(field_constant_interpolation)
16199 local_error=
"Can not add element for component number "// &
16200 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16201 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16202 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 16203 CALL flagerror(local_error,err,error,*999)
16204 CASE(field_element_based_interpolation)
16205 IF(local_element_number>0.AND.local_element_number<=field_variable%COMPONENTS(component_number)% &
16206 & param_to_dof_map%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS)
THEN 16207 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS( &
16208 & local_element_number)
16209 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
16211 local_error=
"Local element number "//trim(number_to_vstring(local_element_number,
"*",err,error))// &
16212 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
16213 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16214 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
16215 &
" which has "//trim(number_to_vstring(field_variable%COMPONENTS(component_number)% &
16216 & param_to_dof_map%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" elements." 16217 CALL flagerror(local_error,err,error,*999)
16219 CASE(field_node_based_interpolation)
16220 local_error=
"Can not add element for component number "// &
16221 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16222 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16223 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 16224 CALL flagerror(local_error,err,error,*999)
16225 CASE(field_grid_point_based_interpolation)
16226 local_error=
"Can not add element for component number "// &
16227 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16228 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16229 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 16230 CALL flagerror(local_error,err,error,*999)
16231 CASE(field_gauss_point_based_interpolation)
16232 local_error=
"Can not add element for component number "// &
16233 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16234 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16235 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 16236 CALL flagerror(local_error,err,error,*999)
16237 CASE(field_data_point_based_interpolation)
16238 local_error=
"Can not add element for component number "// &
16239 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16240 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16241 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 16242 CALL flagerror(local_error,err,error,*999)
16244 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
16245 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
16246 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16247 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16248 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16249 CALL flagerror(local_error,err,error,*999)
16252 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
16253 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16254 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
16255 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
16257 CALL flagerror(local_error,err,error,*999)
16260 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16261 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16262 CALL flagerror(local_error,err,error,*999)
16265 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16266 &
" is invalid. The field parameter set type must be between 1 and "// &
16267 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 16268 CALL flagerror(local_error,err,error,*999)
16271 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
16272 &
" does not correspond to the logical data type of the given value." 16273 CALL flagerror(local_error,err,error,*999)
16276 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16277 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16278 CALL flagerror(local_error,err,error,*999)
16281 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16282 &
" is invalid. The variable type must be between 1 and "// &
16283 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 16284 CALL flagerror(local_error,err,error,*999)
16287 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
16288 &
" has not been finished." 16289 CALL flagerror(local_error,err,error,*999)
16292 CALL flagerror(
"Field is not associated.",err,error,*999)
16295 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_L")
16297 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_ELEMENT_L",err,error)
16299 END SUBROUTINE field_parameter_set_add_local_element_l
16306 SUBROUTINE field_parameter_set_add_node_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
16307 & user_node_number,component_number,
VALUE,err,error,*)
16310 TYPE(field_type),
POINTER :: field
16311 INTEGER(INTG),
INTENT(IN) :: variable_type
16312 INTEGER(INTG),
INTENT(IN) :: field_set_type
16313 INTEGER(INTG),
INTENT(IN) :: version_number
16314 INTEGER(INTG),
INTENT(IN) :: derivative_number
16315 INTEGER(INTG),
INTENT(IN) :: user_node_number
16316 INTEGER(INTG),
INTENT(IN) :: component_number
16317 INTEGER(INTG),
INTENT(IN) ::
VALUE 16318 INTEGER(INTG),
INTENT(OUT) :: err
16319 TYPE(varying_string),
INTENT(OUT) :: error
16321 INTEGER(INTG) :: domain_local_node_number,dof_idx
16322 LOGICAL :: ghost_node,user_node_exists
16323 TYPE(domain_type),
POINTER :: domain
16324 TYPE(domain_nodes_type),
POINTER :: domain_nodes
16325 TYPE(domain_topology_type),
POINTER :: domain_topology
16326 TYPE(field_parameter_set_type),
POINTER :: parameter_set
16327 TYPE(field_variable_type),
POINTER :: field_variable
16328 TYPE(varying_string) :: local_error
16330 enters(
"FIELD_PARAMETER_SET_ADD_NODE_INTG",err,error,*999)
16332 IF(
ASSOCIATED(field))
THEN 16333 IF(field%FIELD_FINISHED)
THEN 16334 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 16335 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
16336 IF(
ASSOCIATED(field_variable))
THEN 16337 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 16338 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 16339 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
16340 IF(
ASSOCIATED(parameter_set))
THEN 16341 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 16342 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
16343 CASE(field_constant_interpolation)
16344 local_error=
"Can not add node for component number "// &
16345 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16346 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16347 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 16348 CALL flagerror(local_error,err,error,*999)
16349 CASE(field_element_based_interpolation)
16350 local_error=
"Can not add node for component number "// &
16351 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16352 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16353 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 16354 CALL flagerror(local_error,err,error,*999)
16355 CASE(field_node_based_interpolation)
16356 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
16357 IF(
ASSOCIATED(domain))
THEN 16358 domain_topology=>domain%TOPOLOGY
16359 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
16360 & domain_local_node_number,ghost_node,err,error,*999)
16361 IF(user_node_exists)
THEN 16362 IF(ghost_node)
THEN 16363 local_error=
"Cannot add node for user node "// &
16364 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" as it is a ghost node." 16365 CALL flagerror(local_error,err,error,*999)
16367 domain_nodes=>domain_topology%NODES
16368 IF(
ASSOCIATED(domain_nodes))
THEN 16369 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
16370 & number_of_derivatives)
THEN 16371 IF(version_number>0.AND.version_number<= &
16372 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
16373 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
16374 & number_of_versions)
THEN 16375 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
16376 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
16377 & versions(version_number)
16378 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
16380 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
16381 &
" is invalid for derivative number "// &
16382 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
16383 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
16384 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16385 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16386 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
16387 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
16388 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
16389 &
"(note version numbers are indexed directly from the value the user specifies during "// &
16390 &
"element creation and no record is kept of the total number of versions the user sets."// &
16391 &
"The maximum version number the user sets defines the total number of versions allocated)." 16392 CALL flagerror(local_error,err,error,*999)
16395 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
16396 &
" is invalid for user node number "// &
16397 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
16398 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16399 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16400 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
16401 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
16402 & number_of_derivatives,
"*",err,error))//
" derivatives." 16403 CALL flagerror(local_error,err,error,*999)
16408 local_error=
"The specified user node number of "// &
16409 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
16410 &
" does not exist in the domain for field component number "// &
16411 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
16412 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16413 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16414 CALL flagerror(local_error,err,error,*999)
16417 CALL flagerror(
"Domain is not associated.",err,error,*999)
16419 CASE(field_grid_point_based_interpolation)
16420 local_error=
"Can not add element for component number "// &
16421 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16422 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16423 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 16424 CALL flagerror(local_error,err,error,*999)
16425 CASE(field_gauss_point_based_interpolation)
16426 local_error=
"Can not add element for component number "// &
16427 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16428 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16429 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 16430 CALL flagerror(local_error,err,error,*999)
16431 CASE(field_data_point_based_interpolation)
16432 local_error=
"Can not add element for component number "// &
16433 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16434 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16435 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 16436 CALL flagerror(local_error,err,error,*999)
16438 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
16439 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
16440 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16441 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16442 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16443 CALL flagerror(local_error,err,error,*999)
16446 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
16447 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16448 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
16449 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
16451 CALL flagerror(local_error,err,error,*999)
16454 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16455 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16456 CALL flagerror(local_error,err,error,*999)
16459 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16460 &
" is invalid. The field parameter set type must be between 1 and "// &
16461 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 16462 CALL flagerror(local_error,err,error,*999)
16465 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
16466 &
" does not correspond to the double precision data type of the given value." 16467 CALL flagerror(local_error,err,error,*999)
16470 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16471 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16472 CALL flagerror(local_error,err,error,*999)
16475 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16476 &
" is invalid. The variable type must be between 1 and "// &
16477 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 16478 CALL flagerror(local_error,err,error,*999)
16481 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
16482 &
" has not been finished." 16483 CALL flagerror(local_error,err,error,*999)
16486 CALL flagerror(
"Field is not associated.",err,error,*999)
16489 exits(
"FIELD_PARAMETER_SET_ADD_NODE_INTG")
16491 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_NODE_INTG",err,error)
16493 END SUBROUTINE field_parameter_set_add_node_intg
16500 SUBROUTINE field_parameter_set_add_node_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
16501 & user_node_number,component_number,
VALUE,err,error,*)
16504 TYPE(field_type),
POINTER :: field
16505 INTEGER(INTG),
INTENT(IN) :: variable_type
16506 INTEGER(INTG),
INTENT(IN) :: field_set_type
16507 INTEGER(INTG),
INTENT(IN) :: version_number
16508 INTEGER(INTG),
INTENT(IN) :: derivative_number
16509 INTEGER(INTG),
INTENT(IN) :: user_node_number
16510 INTEGER(INTG),
INTENT(IN) :: component_number
16511 REAL(SP),
INTENT(IN) ::
VALUE 16512 INTEGER(INTG),
INTENT(OUT) :: err
16513 TYPE(varying_string),
INTENT(OUT) :: error
16515 INTEGER(INTG) :: domain_local_node_number,dof_idx
16516 LOGICAL :: ghost_node,user_node_exists
16517 TYPE(domain_type),
POINTER :: domain
16518 TYPE(domain_nodes_type),
POINTER :: domain_nodes
16519 TYPE(domain_topology_type),
POINTER :: domain_topology
16520 TYPE(field_parameter_set_type),
POINTER :: parameter_set
16521 TYPE(field_variable_type),
POINTER :: field_variable
16522 TYPE(varying_string) :: local_error
16524 enters(
"FIELD_PARAMETER_SET_ADD_NODE_SP",err,error,*999)
16526 IF(
ASSOCIATED(field))
THEN 16527 IF(field%FIELD_FINISHED)
THEN 16528 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 16529 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
16530 IF(
ASSOCIATED(field_variable))
THEN 16531 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 16532 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 16533 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
16534 IF(
ASSOCIATED(parameter_set))
THEN 16535 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 16536 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
16537 CASE(field_constant_interpolation)
16538 local_error=
"Can not add node for component number "// &
16539 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16540 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16541 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 16542 CALL flagerror(local_error,err,error,*999)
16543 CASE(field_element_based_interpolation)
16544 local_error=
"Can not add node for component number "// &
16545 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16546 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16547 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 16548 CALL flagerror(local_error,err,error,*999)
16549 CASE(field_node_based_interpolation)
16550 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
16551 IF(
ASSOCIATED(domain))
THEN 16552 domain_topology=>domain%TOPOLOGY
16553 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
16554 & domain_local_node_number,ghost_node,err,error,*999)
16555 IF(user_node_exists)
THEN 16556 IF(ghost_node)
THEN 16557 local_error=
"Cannot add node for user node "// &
16558 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" as it is a ghost node." 16559 CALL flagerror(local_error,err,error,*999)
16561 domain_nodes=>domain_topology%NODES
16562 IF(
ASSOCIATED(domain_nodes))
THEN 16563 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
16564 & number_of_derivatives)
THEN 16565 IF(version_number>0.AND.version_number<= &
16566 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
16567 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
16568 & number_of_versions)
THEN 16569 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
16570 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
16571 & versions(version_number)
16572 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
16574 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
16575 &
" is invalid for derivative number "// &
16576 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
16577 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
16578 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16579 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16580 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
16581 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
16582 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
16583 &
"(note version numbers are indexed directly from the value the user specifies during "// &
16584 &
"element creation and no record is kept of the total number of versions the user sets."// &
16585 &
"The maximum version number the user sets defines the total number of versions allocated)." 16586 CALL flagerror(local_error,err,error,*999)
16589 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
16590 &
" is invalid for user node number "// &
16591 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
16592 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16593 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16594 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
16595 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
16596 & number_of_derivatives,
"*",err,error))//
" derivatives." 16597 CALL flagerror(local_error,err,error,*999)
16602 local_error=
"The specified user node number of "// &
16603 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
16604 &
" does not exist in the domain for field component number "// &
16605 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
16606 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16607 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16608 CALL flagerror(local_error,err,error,*999)
16611 CALL flagerror(
"Domain is not associated.",err,error,*999)
16613 CASE(field_grid_point_based_interpolation)
16614 local_error=
"Can not add element for component number "// &
16615 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16616 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16617 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 16618 CALL flagerror(local_error,err,error,*999)
16619 CASE(field_gauss_point_based_interpolation)
16620 local_error=
"Can not add element for component number "// &
16621 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16622 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16623 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 16624 CALL flagerror(local_error,err,error,*999)
16625 CASE(field_data_point_based_interpolation)
16626 local_error=
"Can not add element for component number "// &
16627 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16628 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16629 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 16630 CALL flagerror(local_error,err,error,*999)
16632 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
16633 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
16634 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16635 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16636 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16637 CALL flagerror(local_error,err,error,*999)
16640 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
16641 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16642 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
16643 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
16645 CALL flagerror(local_error,err,error,*999)
16648 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16649 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16650 CALL flagerror(local_error,err,error,*999)
16653 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16654 &
" is invalid. The field parameter set type must be between 1 and "// &
16655 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 16656 CALL flagerror(local_error,err,error,*999)
16659 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
16660 &
" does not correspond to the double precision data type of the given value." 16661 CALL flagerror(local_error,err,error,*999)
16664 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16665 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16666 CALL flagerror(local_error,err,error,*999)
16669 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16670 &
" is invalid. The variable type must be between 1 and "// &
16671 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 16672 CALL flagerror(local_error,err,error,*999)
16675 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
16676 &
" has not been finished." 16677 CALL flagerror(local_error,err,error,*999)
16680 CALL flagerror(
"Field is not associated.",err,error,*999)
16683 exits(
"FIELD_PARAMETER_SET_ADD_NODE_SP")
16685 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_NODE_SP",err,error)
16687 END SUBROUTINE field_parameter_set_add_node_sp
16694 SUBROUTINE field_parameter_set_add_node_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
16695 & user_node_number,component_number,
VALUE,err,error,*)
16698 TYPE(field_type),
POINTER :: field
16699 INTEGER(INTG),
INTENT(IN) :: variable_type
16700 INTEGER(INTG),
INTENT(IN) :: field_set_type
16701 INTEGER(INTG),
INTENT(IN) :: version_number
16702 INTEGER(INTG),
INTENT(IN) :: derivative_number
16703 INTEGER(INTG),
INTENT(IN) :: user_node_number
16704 INTEGER(INTG),
INTENT(IN) :: component_number
16705 REAL(DP),
INTENT(IN) ::
VALUE 16706 INTEGER(INTG),
INTENT(OUT) :: err
16707 TYPE(varying_string),
INTENT(OUT) :: error
16709 INTEGER(INTG) :: domain_local_node_number,dof_idx
16710 LOGICAL :: ghost_node,user_node_exists
16711 TYPE(domain_type),
POINTER :: domain
16712 TYPE(domain_nodes_type),
POINTER :: domain_nodes
16713 TYPE(domain_topology_type),
POINTER :: domain_topology
16714 TYPE(field_parameter_set_type),
POINTER :: parameter_set
16715 TYPE(field_variable_type),
POINTER :: field_variable
16716 TYPE(varying_string) :: local_error
16718 enters(
"FIELD_PARAMETER_SET_ADD_NODE_DP",err,error,*999)
16720 IF(
ASSOCIATED(field))
THEN 16721 IF(field%FIELD_FINISHED)
THEN 16722 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 16723 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
16724 IF(
ASSOCIATED(field_variable))
THEN 16725 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 16726 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 16727 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
16728 IF(
ASSOCIATED(parameter_set))
THEN 16729 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 16730 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
16731 CASE(field_constant_interpolation)
16732 local_error=
"Can not add node for component number "// &
16733 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16734 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16735 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 16736 CALL flagerror(local_error,err,error,*999)
16737 CASE(field_element_based_interpolation)
16738 local_error=
"Can not add node for component number "// &
16739 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16740 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16741 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 16742 CALL flagerror(local_error,err,error,*999)
16743 CASE(field_node_based_interpolation)
16744 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
16745 IF(
ASSOCIATED(domain))
THEN 16746 domain_topology=>domain%TOPOLOGY
16747 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
16748 & domain_local_node_number,ghost_node,err,error,*999)
16749 IF(user_node_exists)
THEN 16750 IF(ghost_node)
THEN 16751 local_error=
"Cannot add node for user node "// &
16752 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" as it is a ghost node." 16753 CALL flagerror(local_error,err,error,*999)
16755 domain_nodes=>domain_topology%NODES
16756 IF(
ASSOCIATED(domain_nodes))
THEN 16757 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
16758 & number_of_derivatives)
THEN 16759 IF(version_number>0.AND.version_number<= &
16760 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
16761 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
16762 & number_of_versions)
THEN 16763 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
16764 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
16765 & versions(version_number)
16766 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
16768 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
16769 &
" is invalid for derivative number "// &
16770 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
16771 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
16772 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16773 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16774 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
16775 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
16776 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
16777 &
"(note version numbers are indexed directly from the value the user specifies during "// &
16778 &
"element creation and no record is kept of the total number of versions the user sets."// &
16779 &
"The maximum version number the user sets defines the total number of versions allocated)." 16780 CALL flagerror(local_error,err,error,*999)
16783 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
16784 &
" is invalid for user node number "// &
16785 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
16786 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16787 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16788 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
16789 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
16790 & number_of_derivatives,
"*",err,error))//
" derivatives." 16791 CALL flagerror(local_error,err,error,*999)
16796 local_error=
"The specified user node number of "// &
16797 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
16798 &
" does not exist in the domain for field component number "// &
16799 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
16800 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16801 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16802 CALL flagerror(local_error,err,error,*999)
16805 CALL flagerror(
"Domain is not associated.",err,error,*999)
16807 CASE(field_grid_point_based_interpolation)
16808 local_error=
"Can not add element for component number "// &
16809 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16810 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16811 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 16812 CALL flagerror(local_error,err,error,*999)
16813 CASE(field_gauss_point_based_interpolation)
16814 local_error=
"Can not add element for component number "// &
16815 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16816 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16817 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 16818 CALL flagerror(local_error,err,error,*999)
16819 CASE(field_data_point_based_interpolation)
16820 local_error=
"Can not add element for component number "// &
16821 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16822 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16823 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 16824 CALL flagerror(local_error,err,error,*999)
16826 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
16827 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
16828 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16829 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16830 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16831 CALL flagerror(local_error,err,error,*999)
16834 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
16835 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16836 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
16837 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
16839 CALL flagerror(local_error,err,error,*999)
16842 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16843 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16844 CALL flagerror(local_error,err,error,*999)
16847 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
16848 &
" is invalid. The field parameter set type must be between 1 and "// &
16849 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 16850 CALL flagerror(local_error,err,error,*999)
16853 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
16854 &
" does not correspond to the double precision data type of the given value." 16855 CALL flagerror(local_error,err,error,*999)
16858 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16859 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16860 CALL flagerror(local_error,err,error,*999)
16863 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
16864 &
" is invalid. The variable type must be between 1 and "// &
16865 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 16866 CALL flagerror(local_error,err,error,*999)
16869 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
16870 &
" has not been finished." 16871 CALL flagerror(local_error,err,error,*999)
16874 CALL flagerror(
"Field is not associated.",err,error,*999)
16877 exits(
"FIELD_PARAMETER_SET_ADD_NODE_DP")
16879 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_NODE_DP",err,error)
16881 END SUBROUTINE field_parameter_set_add_node_dp
16888 SUBROUTINE field_parameter_set_add_node_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
16889 & user_node_number,component_number,
VALUE,err,error,*)
16892 TYPE(field_type),
POINTER :: field
16893 INTEGER(INTG),
INTENT(IN) :: variable_type
16894 INTEGER(INTG),
INTENT(IN) :: field_set_type
16895 INTEGER(INTG),
INTENT(IN) :: version_number
16896 INTEGER(INTG),
INTENT(IN) :: derivative_number
16897 INTEGER(INTG),
INTENT(IN) :: user_node_number
16898 INTEGER(INTG),
INTENT(IN) :: component_number
16899 LOGICAL,
INTENT(IN) ::
VALUE 16900 INTEGER(INTG),
INTENT(OUT) :: err
16901 TYPE(varying_string),
INTENT(OUT) :: error
16903 INTEGER(INTG) :: domain_local_node_number,dof_idx
16904 LOGICAL :: ghost_node,user_node_exists
16905 TYPE(domain_type),
POINTER :: domain
16906 TYPE(domain_nodes_type),
POINTER :: domain_nodes
16907 TYPE(domain_topology_type),
POINTER :: domain_topology
16908 TYPE(field_parameter_set_type),
POINTER :: parameter_set
16909 TYPE(field_variable_type),
POINTER :: field_variable
16910 TYPE(varying_string) :: local_error
16912 enters(
"FIELD_PARAMETER_SET_ADD_NODE_L",err,error,*999)
16914 IF(
ASSOCIATED(field))
THEN 16915 IF(field%FIELD_FINISHED)
THEN 16916 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 16917 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
16918 IF(
ASSOCIATED(field_variable))
THEN 16919 IF(field_variable%DATA_TYPE==field_l_type)
THEN 16920 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 16921 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
16922 IF(
ASSOCIATED(parameter_set))
THEN 16923 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 16924 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
16925 CASE(field_constant_interpolation)
16926 local_error=
"Can not add node for component number "// &
16927 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16928 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16929 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 16930 CALL flagerror(local_error,err,error,*999)
16931 CASE(field_element_based_interpolation)
16932 local_error=
"Can not add node for component number "// &
16933 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16934 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16935 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 16936 CALL flagerror(local_error,err,error,*999)
16937 CASE(field_node_based_interpolation)
16938 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
16939 IF(
ASSOCIATED(domain))
THEN 16940 domain_topology=>domain%TOPOLOGY
16941 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
16942 & domain_local_node_number,ghost_node,err,error,*999)
16943 IF(user_node_exists)
THEN 16944 IF(ghost_node)
THEN 16945 local_error=
"Cannot add node for user node "// &
16946 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" as it is a ghost node." 16947 CALL flagerror(local_error,err,error,*999)
16949 domain_nodes=>domain_topology%NODES
16950 IF(
ASSOCIATED(domain_nodes))
THEN 16951 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
16952 & number_of_derivatives)
THEN 16953 IF(version_number>0.AND.version_number<= &
16954 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
16955 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
16956 & number_of_versions)
THEN 16957 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
16958 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
16959 & versions(version_number)
16960 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
16962 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
16963 &
" is invalid for derivative number "// &
16964 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
16965 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
16966 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16967 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16968 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
16969 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
16970 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
16971 &
"(note version numbers are indexed directly from the value the user specifies during "// &
16972 &
"element creation and no record is kept of the total number of versions the user sets."// &
16973 &
"The maximum version number the user sets defines the total number of versions allocated)." 16974 CALL flagerror(local_error,err,error,*999)
16977 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*", &
16978 & err,error))//
" is invalid for user node number "// &
16979 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
16980 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
16981 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16982 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
16983 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
16984 & number_of_derivatives,
"*",err,error))//
" derivatives." 16985 CALL flagerror(local_error,err,error,*999)
16990 local_error=
"The specified user node number of "// &
16991 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
16992 &
" does not exist in the domain for field component number "// &
16993 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
16994 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
16995 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 16996 CALL flagerror(local_error,err,error,*999)
16999 CALL flagerror(
"Domain is not associated.",err,error,*999)
17001 CASE(field_grid_point_based_interpolation)
17002 local_error=
"Can not add element for component number "// &
17003 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17004 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17005 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 17006 CALL flagerror(local_error,err,error,*999)
17007 CASE(field_gauss_point_based_interpolation)
17008 local_error=
"Can not add element for component number "// &
17009 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17010 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17011 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 17012 CALL flagerror(local_error,err,error,*999)
17013 CASE(field_data_point_based_interpolation)
17014 local_error=
"Can not add element for component number "// &
17015 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17016 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17017 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 17018 CALL flagerror(local_error,err,error,*999)
17020 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
17021 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
17022 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17023 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17024 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17025 CALL flagerror(local_error,err,error,*999)
17028 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
17029 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17030 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
17031 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
17033 CALL flagerror(local_error,err,error,*999)
17036 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17037 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17038 CALL flagerror(local_error,err,error,*999)
17041 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17042 &
" is invalid. The field parameter set type must be between 1 and "// &
17043 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 17044 CALL flagerror(local_error,err,error,*999)
17047 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
17048 &
" does not correspond to the double precision data type of the given value." 17049 CALL flagerror(local_error,err,error,*999)
17052 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17053 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17054 CALL flagerror(local_error,err,error,*999)
17057 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17058 &
" is invalid. The variable type must be between 1 and "// &
17059 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 17060 CALL flagerror(local_error,err,error,*999)
17063 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
17064 &
" has not been finished." 17065 CALL flagerror(local_error,err,error,*999)
17068 CALL flagerror(
"Field is not associated.",err,error,*999)
17071 exits(
"FIELD_PARAMETER_SET_ADD_NODE_L")
17073 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_NODE_L",err,error)
17075 END SUBROUTINE field_parameter_set_add_node_l
17082 SUBROUTINE field_parameter_set_add_local_node_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
17083 & local_node_number,component_number,
VALUE,err,error,*)
17086 TYPE(field_type),
POINTER :: field
17087 INTEGER(INTG),
INTENT(IN) :: variable_type
17088 INTEGER(INTG),
INTENT(IN) :: field_set_type
17089 INTEGER(INTG),
INTENT(IN) :: version_number
17090 INTEGER(INTG),
INTENT(IN) :: derivative_number
17091 INTEGER(INTG),
INTENT(IN) :: local_node_number
17092 INTEGER(INTG),
INTENT(IN) :: component_number
17093 INTEGER(INTG),
INTENT(IN) ::
VALUE 17094 INTEGER(INTG),
INTENT(OUT) :: err
17095 TYPE(varying_string),
INTENT(OUT) :: error
17097 INTEGER(INTG) :: dof_idx
17098 TYPE(field_parameter_set_type),
POINTER :: parameter_set
17099 TYPE(field_variable_type),
POINTER :: field_variable
17100 TYPE(field_node_param_to_dof_map_type),
POINTER :: field_nodes
17101 TYPE(varying_string) :: local_error
17103 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_INTG",err,error,*999)
17105 IF(
ASSOCIATED(field))
THEN 17106 IF(field%FIELD_FINISHED)
THEN 17107 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 17108 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
17109 IF(
ASSOCIATED(field_variable))
THEN 17110 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 17111 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 17112 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
17113 IF(
ASSOCIATED(parameter_set))
THEN 17114 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 17115 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
17116 CASE(field_constant_interpolation)
17117 local_error=
"Can not add node for component number "// &
17118 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17119 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17120 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 17121 CALL flagerror(local_error,err,error,*999)
17122 CASE(field_element_based_interpolation)
17123 local_error=
"Can not add node for component number "// &
17124 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17125 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17126 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 17127 CALL flagerror(local_error,err,error,*999)
17128 CASE(field_node_based_interpolation)
17129 field_nodes=>field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP
17130 IF(local_node_number>0.AND.local_node_number<=field_nodes%NUMBER_OF_NODE_PARAMETERS)
THEN 17131 IF(derivative_number>0.AND.derivative_number<=field_nodes%NODES(local_node_number)% &
17132 & number_of_derivatives)
THEN 17133 IF(version_number>0.AND.version_number<= &
17134 & field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)%NUMBER_OF_VERSIONS)
THEN 17135 dof_idx=field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)% &
17136 & versions(version_number)
17137 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
17139 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
17140 &
" is invalid for derivative number "// &
17141 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
17142 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
17143 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17144 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17145 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
17146 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
17147 & derivatives(derivative_number)%NUMBER_OF_VERSIONS,
"*",err,error))//
" versions "// &
17148 &
"(note version numbers are indexed directly from the value the user specifies during "// &
17149 &
"element creation and no record is kept of the total number of versions the user sets."// &
17150 &
"The maximum version number the user sets defines the total number of versions allocated)." 17151 CALL flagerror(local_error,err,error,*999)
17154 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
17155 &
" is invalid for user node number "// &
17156 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
17157 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17158 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17159 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
17160 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
17161 & number_of_derivatives,
"*",err,error))//
" derivatives." 17162 CALL flagerror(local_error,err,error,*999)
17165 local_error=
"Local node number "//trim(number_to_vstring(local_node_number,
"*",err,error))// &
17166 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
17167 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17168 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
17169 &
" which has "//trim(number_to_vstring(field_nodes%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" nodes." 17170 CALL flagerror(local_error,err,error,*999)
17172 CASE(field_grid_point_based_interpolation)
17173 local_error=
"Can not add element for component number "// &
17174 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17175 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17176 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 17177 CALL flagerror(local_error,err,error,*999)
17178 CASE(field_gauss_point_based_interpolation)
17179 local_error=
"Can not add element for component number "// &
17180 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17181 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17182 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 17183 CALL flagerror(local_error,err,error,*999)
17184 CASE(field_data_point_based_interpolation)
17185 local_error=
"Can not add element for component number "// &
17186 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17187 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17188 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 17189 CALL flagerror(local_error,err,error,*999)
17191 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
17192 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
17193 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17194 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17195 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17196 CALL flagerror(local_error,err,error,*999)
17199 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
17200 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17201 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
17202 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
17204 CALL flagerror(local_error,err,error,*999)
17207 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17208 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17209 CALL flagerror(local_error,err,error,*999)
17212 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17213 &
" is invalid. The field parameter set type must be between 1 and "// &
17214 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 17215 CALL flagerror(local_error,err,error,*999)
17218 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
17219 &
" does not correspond to the double precision data type of the given value." 17220 CALL flagerror(local_error,err,error,*999)
17223 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17224 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17225 CALL flagerror(local_error,err,error,*999)
17228 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17229 &
" is invalid. The variable type must be between 1 and "// &
17230 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 17231 CALL flagerror(local_error,err,error,*999)
17234 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
17235 &
" has not been finished." 17236 CALL flagerror(local_error,err,error,*999)
17239 CALL flagerror(
"Field is not associated.",err,error,*999)
17242 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_INTG")
17244 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_INTG",err,error)
17246 END SUBROUTINE field_parameter_set_add_local_node_intg
17253 SUBROUTINE field_parameter_set_add_local_node_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
17254 & local_node_number,component_number,
VALUE,err,error,*)
17257 TYPE(field_type),
POINTER :: field
17258 INTEGER(INTG),
INTENT(IN) :: variable_type
17259 INTEGER(INTG),
INTENT(IN) :: field_set_type
17260 INTEGER(INTG),
INTENT(IN) :: version_number
17261 INTEGER(INTG),
INTENT(IN) :: derivative_number
17262 INTEGER(INTG),
INTENT(IN) :: local_node_number
17263 INTEGER(INTG),
INTENT(IN) :: component_number
17264 REAL(SP),
INTENT(IN) ::
VALUE 17265 INTEGER(INTG),
INTENT(OUT) :: err
17266 TYPE(varying_string),
INTENT(OUT) :: error
17268 INTEGER(INTG) :: dof_idx
17269 TYPE(field_parameter_set_type),
POINTER :: parameter_set
17270 TYPE(field_variable_type),
POINTER :: field_variable
17271 TYPE(field_node_param_to_dof_map_type),
POINTER :: field_nodes
17272 TYPE(varying_string) :: local_error
17274 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_SP",err,error,*999)
17276 IF(
ASSOCIATED(field))
THEN 17277 IF(field%FIELD_FINISHED)
THEN 17278 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 17279 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
17280 IF(
ASSOCIATED(field_variable))
THEN 17281 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 17282 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 17283 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
17284 IF(
ASSOCIATED(parameter_set))
THEN 17285 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 17286 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
17287 CASE(field_constant_interpolation)
17288 local_error=
"Can not add node for component number "// &
17289 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17290 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17291 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 17292 CALL flagerror(local_error,err,error,*999)
17293 CASE(field_element_based_interpolation)
17294 local_error=
"Can not add node for component number "// &
17295 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17296 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17297 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 17298 CALL flagerror(local_error,err,error,*999)
17299 CASE(field_node_based_interpolation)
17300 field_nodes=>field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP
17301 IF(local_node_number>0.AND.local_node_number<=field_nodes%NUMBER_OF_NODE_PARAMETERS)
THEN 17302 IF(derivative_number>0.AND.derivative_number<=field_nodes%NODES(local_node_number)% &
17303 & number_of_derivatives)
THEN 17304 IF(version_number>0.AND.version_number<= &
17305 & field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)%NUMBER_OF_VERSIONS)
THEN 17306 dof_idx=field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)% &
17307 & versions(version_number)
17308 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
17310 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
17311 &
" is invalid for derivative number "// &
17312 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
17313 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
17314 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17315 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17316 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
17317 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
17318 & derivatives(derivative_number)%NUMBER_OF_VERSIONS,
"*",err,error))//
" versions "// &
17319 &
"(note version numbers are indexed directly from the value the user specifies during "// &
17320 &
"element creation and no record is kept of the total number of versions the user sets."// &
17321 &
"The maximum version number the user sets defines the total number of versions allocated)." 17322 CALL flagerror(local_error,err,error,*999)
17325 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
17326 &
" is invalid for user node number "// &
17327 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
17328 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17329 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17330 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
17331 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
17332 & number_of_derivatives,
"*",err,error))//
" derivatives." 17333 CALL flagerror(local_error,err,error,*999)
17336 local_error=
"Local node number "//trim(number_to_vstring(local_node_number,
"*",err,error))// &
17337 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
17338 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17339 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
17340 &
" which has "//trim(number_to_vstring(field_nodes%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" nodes." 17341 CALL flagerror(local_error,err,error,*999)
17343 CASE(field_grid_point_based_interpolation)
17344 local_error=
"Can not add element for component number "// &
17345 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17346 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17347 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 17348 CALL flagerror(local_error,err,error,*999)
17349 CASE(field_gauss_point_based_interpolation)
17350 local_error=
"Can not add element for component number "// &
17351 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17352 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17353 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 17354 CALL flagerror(local_error,err,error,*999)
17355 CASE(field_data_point_based_interpolation)
17356 local_error=
"Can not add element for component number "// &
17357 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17358 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17359 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 17360 CALL flagerror(local_error,err,error,*999)
17362 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
17363 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
17364 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17365 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17366 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17367 CALL flagerror(local_error,err,error,*999)
17370 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
17371 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17372 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
17373 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
17375 CALL flagerror(local_error,err,error,*999)
17378 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17379 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17380 CALL flagerror(local_error,err,error,*999)
17383 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17384 &
" is invalid. The field parameter set type must be between 1 and "// &
17385 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 17386 CALL flagerror(local_error,err,error,*999)
17389 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
17390 &
" does not correspond to the double precision data type of the given value." 17391 CALL flagerror(local_error,err,error,*999)
17394 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17395 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17396 CALL flagerror(local_error,err,error,*999)
17399 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17400 &
" is invalid. The variable type must be between 1 and "// &
17401 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 17402 CALL flagerror(local_error,err,error,*999)
17405 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
17406 &
" has not been finished." 17407 CALL flagerror(local_error,err,error,*999)
17410 CALL flagerror(
"Field is not associated.",err,error,*999)
17413 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_SP")
17415 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_SP",err,error)
17417 END SUBROUTINE field_parameter_set_add_local_node_sp
17424 SUBROUTINE field_parameter_set_add_local_node_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
17425 & local_node_number,component_number,
VALUE,err,error,*)
17428 TYPE(field_type),
POINTER :: field
17429 INTEGER(INTG),
INTENT(IN) :: variable_type
17430 INTEGER(INTG),
INTENT(IN) :: field_set_type
17431 INTEGER(INTG),
INTENT(IN) :: version_number
17432 INTEGER(INTG),
INTENT(IN) :: derivative_number
17433 INTEGER(INTG),
INTENT(IN) :: local_node_number
17434 INTEGER(INTG),
INTENT(IN) :: component_number
17435 REAL(DP),
INTENT(IN) ::
VALUE 17436 INTEGER(INTG),
INTENT(OUT) :: err
17437 TYPE(varying_string),
INTENT(OUT) :: error
17439 INTEGER(INTG) :: dof_idx
17440 TYPE(field_parameter_set_type),
POINTER :: parameter_set
17441 TYPE(field_variable_type),
POINTER :: field_variable
17442 TYPE(field_node_param_to_dof_map_type),
POINTER :: field_nodes
17443 TYPE(varying_string) :: local_error
17445 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_DP",err,error,*999)
17447 IF(
ASSOCIATED(field))
THEN 17448 IF(field%FIELD_FINISHED)
THEN 17449 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 17450 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
17451 IF(
ASSOCIATED(field_variable))
THEN 17452 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 17453 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 17454 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
17455 IF(
ASSOCIATED(parameter_set))
THEN 17456 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 17457 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
17458 CASE(field_constant_interpolation)
17459 local_error=
"Can not add node for component number "// &
17460 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17461 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17462 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 17463 CALL flagerror(local_error,err,error,*999)
17464 CASE(field_element_based_interpolation)
17465 local_error=
"Can not add node for component number "// &
17466 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17467 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17468 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 17469 CALL flagerror(local_error,err,error,*999)
17470 CASE(field_node_based_interpolation)
17471 field_nodes=>field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP
17472 IF(local_node_number>0.AND.local_node_number<=field_nodes%NUMBER_OF_NODE_PARAMETERS)
THEN 17473 IF(derivative_number>0.AND.derivative_number<=field_nodes%NODES(local_node_number)% &
17474 & number_of_derivatives)
THEN 17475 IF(version_number>0.AND.version_number<= &
17476 & field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)%NUMBER_OF_VERSIONS)
THEN 17477 dof_idx=field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)% &
17478 & versions(version_number)
17479 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
17481 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
17482 &
" is invalid for derivative number "// &
17483 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
17484 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
17485 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17486 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17487 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
17488 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
17489 & derivatives(derivative_number)%NUMBER_OF_VERSIONS,
"*",err,error))//
" versions "// &
17490 &
"(note version numbers are indexed directly from the value the user specifies during "// &
17491 &
"element creation and no record is kept of the total number of versions the user sets."// &
17492 &
"The maximum version number the user sets defines the total number of versions allocated)." 17493 CALL flagerror(local_error,err,error,*999)
17496 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
17497 &
" is invalid for user node number "// &
17498 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
17499 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17500 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17501 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
17502 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
17503 & number_of_derivatives,
"*",err,error))//
" derivatives." 17504 CALL flagerror(local_error,err,error,*999)
17507 local_error=
"Local node number "//trim(number_to_vstring(local_node_number,
"*",err,error))// &
17508 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
17509 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17510 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
17511 &
" which has "//trim(number_to_vstring(field_nodes%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" nodes." 17512 CALL flagerror(local_error,err,error,*999)
17514 CASE(field_grid_point_based_interpolation)
17515 local_error=
"Can not add element for component number "// &
17516 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17517 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17518 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 17519 CALL flagerror(local_error,err,error,*999)
17520 CASE(field_gauss_point_based_interpolation)
17521 local_error=
"Can not add element for component number "// &
17522 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17523 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17524 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 17525 CALL flagerror(local_error,err,error,*999)
17526 CASE(field_data_point_based_interpolation)
17527 local_error=
"Can not add element for component number "// &
17528 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17529 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17530 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 17531 CALL flagerror(local_error,err,error,*999)
17533 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
17534 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
17535 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17536 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17537 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17538 CALL flagerror(local_error,err,error,*999)
17541 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
17542 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17543 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
17544 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
17546 CALL flagerror(local_error,err,error,*999)
17549 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17550 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17551 CALL flagerror(local_error,err,error,*999)
17554 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17555 &
" is invalid. The field parameter set type must be between 1 and "// &
17556 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 17557 CALL flagerror(local_error,err,error,*999)
17560 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
17561 &
" does not correspond to the double precision data type of the given value." 17562 CALL flagerror(local_error,err,error,*999)
17565 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17566 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17567 CALL flagerror(local_error,err,error,*999)
17570 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17571 &
" is invalid. The variable type must be between 1 and "// &
17572 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 17573 CALL flagerror(local_error,err,error,*999)
17576 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
17577 &
" has not been finished." 17578 CALL flagerror(local_error,err,error,*999)
17581 CALL flagerror(
"Field is not associated.",err,error,*999)
17584 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_DP")
17586 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_DP",err,error)
17588 END SUBROUTINE field_parameter_set_add_local_node_dp
17595 SUBROUTINE field_parameter_set_add_local_node_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
17596 & local_node_number,component_number,
VALUE,err,error,*)
17599 TYPE(field_type),
POINTER :: field
17600 INTEGER(INTG),
INTENT(IN) :: variable_type
17601 INTEGER(INTG),
INTENT(IN) :: field_set_type
17602 INTEGER(INTG),
INTENT(IN) :: version_number
17603 INTEGER(INTG),
INTENT(IN) :: derivative_number
17604 INTEGER(INTG),
INTENT(IN) :: local_node_number
17605 INTEGER(INTG),
INTENT(IN) :: component_number
17606 LOGICAL,
INTENT(IN) ::
VALUE 17607 INTEGER(INTG),
INTENT(OUT) :: err
17608 TYPE(varying_string),
INTENT(OUT) :: error
17610 INTEGER(INTG) :: dof_idx
17611 TYPE(field_parameter_set_type),
POINTER :: parameter_set
17612 TYPE(field_variable_type),
POINTER :: field_variable
17613 TYPE(field_node_param_to_dof_map_type),
POINTER :: field_nodes
17614 TYPE(varying_string) :: local_error
17616 enters(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_L",err,error,*999)
17618 IF(
ASSOCIATED(field))
THEN 17619 IF(field%FIELD_FINISHED)
THEN 17620 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 17621 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
17622 IF(
ASSOCIATED(field_variable))
THEN 17623 IF(field_variable%DATA_TYPE==field_l_type)
THEN 17624 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 17625 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
17626 IF(
ASSOCIATED(parameter_set))
THEN 17627 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 17628 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
17629 CASE(field_constant_interpolation)
17630 local_error=
"Can not add node for component number "// &
17631 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17632 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17633 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 17634 CALL flagerror(local_error,err,error,*999)
17635 CASE(field_element_based_interpolation)
17636 local_error=
"Can not add node for component number "// &
17637 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17638 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17639 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 17640 CALL flagerror(local_error,err,error,*999)
17641 CASE(field_node_based_interpolation)
17642 field_nodes=>field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP
17643 IF(local_node_number>0.AND.local_node_number<=field_nodes%NUMBER_OF_NODE_PARAMETERS)
THEN 17644 IF(derivative_number>0.AND.derivative_number<=field_nodes%NODES(local_node_number)% &
17645 & number_of_derivatives)
THEN 17646 IF(version_number>0.AND.version_number<= &
17647 & field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)%NUMBER_OF_VERSIONS)
THEN 17648 dof_idx=field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)% &
17649 & versions(version_number)
17650 CALL distributed_vector_values_add(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
17652 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
17653 &
" is invalid for derivative number "// &
17654 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
17655 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
17656 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17657 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17658 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
17659 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
17660 & derivatives(derivative_number)%NUMBER_OF_VERSIONS,
"*",err,error))//
" versions "// &
17661 &
"(note version numbers are indexed directly from the value the user specifies during "// &
17662 &
"element creation and no record is kept of the total number of versions the user sets."// &
17663 &
"The maximum version number the user sets defines the total number of versions allocated)." 17664 CALL flagerror(local_error,err,error,*999)
17667 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
17668 &
" is invalid for user node number "// &
17669 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
17670 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17671 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17672 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
17673 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
17674 & number_of_derivatives,
"*",err,error))//
" derivatives." 17675 CALL flagerror(local_error,err,error,*999)
17678 local_error=
"Local node number "//trim(number_to_vstring(local_node_number,
"*",err,error))// &
17679 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
17680 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17681 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
17682 &
" which has "//trim(number_to_vstring(field_nodes%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" nodes." 17683 CALL flagerror(local_error,err,error,*999)
17685 CASE(field_grid_point_based_interpolation)
17686 local_error=
"Can not add element for component number "// &
17687 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17688 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17689 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 17690 CALL flagerror(local_error,err,error,*999)
17691 CASE(field_gauss_point_based_interpolation)
17692 local_error=
"Can not add element for component number "// &
17693 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17694 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17695 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 17696 CALL flagerror(local_error,err,error,*999)
17697 CASE(field_data_point_based_interpolation)
17698 local_error=
"Can not add element for component number "// &
17699 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17700 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17701 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 17702 CALL flagerror(local_error,err,error,*999)
17704 local_error=
"The interpolation type of "//trim(number_to_vstring(field_variable%COMPONENTS( &
17705 & component_number)%INTERPOLATION_TYPE,
"*",err,error))//
" is invalid for component number "// &
17706 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
17707 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17708 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17709 CALL flagerror(local_error,err,error,*999)
17712 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
17713 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17714 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
17715 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
17717 CALL flagerror(local_error,err,error,*999)
17720 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17721 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17722 CALL flagerror(local_error,err,error,*999)
17725 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17726 &
" is invalid. The field parameter set type must be between 1 and "// &
17727 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 17728 CALL flagerror(local_error,err,error,*999)
17731 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
17732 &
" does not correspond to the double precision data type of the given value." 17733 CALL flagerror(local_error,err,error,*999)
17736 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17737 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17738 CALL flagerror(local_error,err,error,*999)
17741 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17742 &
" is invalid. The variable type must be between 1 and "// &
17743 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 17744 CALL flagerror(local_error,err,error,*999)
17747 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
17748 &
" has not been finished." 17749 CALL flagerror(local_error,err,error,*999)
17752 CALL flagerror(
"Field is not associated.",err,error,*999)
17755 exits(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_L")
17757 999 errorsexits(
"FIELD_PARAMETER_SET_ADD_LOCAL_NODE_L",err,error)
17759 END SUBROUTINE field_parameter_set_add_local_node_l
17767 SUBROUTINE field_parameter_set_create(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,ERR,ERROR,*)
17770 TYPE(field_type),
POINTER :: field
17771 INTEGER(INTG),
INTENT(IN) :: variable_type
17772 INTEGER(INTG),
INTENT(IN) :: field_set_type
17773 INTEGER(INTG),
INTENT(OUT) :: err
17774 TYPE(varying_string),
INTENT(OUT) :: error
17776 INTEGER(INTG) :: dummy_err,parameter_set_idx
17777 TYPE(field_parameter_set_type),
POINTER :: new_parameter_set
17778 TYPE(field_parameter_set_ptr_type),
POINTER :: new_parameter_sets(:)
17779 TYPE(field_variable_type),
POINTER :: field_variable
17780 TYPE(varying_string) :: local_error,dummy_error
17782 NULLIFY(new_parameter_set)
17783 NULLIFY(new_parameter_sets)
17785 enters(
"FIELD_PARAMETER_SET_CREATE",err,error,*999)
17787 IF(
ASSOCIATED(field))
THEN 17788 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 17789 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
17790 IF(
ASSOCIATED(field_variable))
THEN 17792 IF(field_set_type>0.AND.field_set_type<field_number_of_set_types)
THEN 17794 IF(
ASSOCIATED(field_variable%PARAMETER_SETS%SET_TYPE))
THEN 17795 IF(
ASSOCIATED(field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR))
THEN 17796 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17797 &
" has already been created for variable type of "// &
17798 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
17799 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17800 CALL flagerror(local_error,err,error,*999)
17803 ALLOCATE(new_parameter_set,stat=err)
17804 IF(err/=0)
CALL flagerror(
"Could not allocate new parameter set.",err,error,*999)
17805 CALL field_parameter_set_initialise(new_parameter_set,err,error,*999)
17806 new_parameter_set%SET_INDEX=field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS+1
17807 new_parameter_set%SET_TYPE=field_set_type
17808 NULLIFY(new_parameter_set%PARAMETERS)
17809 CALL distributed_vector_create_start(field_variable%DOMAIN_MAPPING,new_parameter_set%PARAMETERS,err,error,*999)
17810 SELECT CASE(field_variable%DATA_TYPE)
17811 CASE(field_intg_type)
17812 CALL distributed_vector_data_type_set(new_parameter_set%PARAMETERS,distributed_matrix_vector_intg_type, &
17814 CASE(field_sp_type)
17815 CALL distributed_vector_data_type_set(new_parameter_set%PARAMETERS,distributed_matrix_vector_sp_type, &
17817 CASE(field_dp_type)
17818 CALL distributed_vector_data_type_set(new_parameter_set%PARAMETERS,distributed_matrix_vector_dp_type, &
17821 CALL distributed_vector_data_type_set(new_parameter_set%PARAMETERS,distributed_matrix_vector_l_type, &
17824 local_error=
"The field data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
17825 &
" is invalid for variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17826 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17827 CALL flagerror(local_error,err,error,*999)
17829 CALL distributed_vector_create_finish(new_parameter_set%PARAMETERS,err,error,*999)
17830 SELECT CASE(field_variable%DATA_TYPE)
17831 CASE(field_intg_type)
17832 CALL distributed_vector_all_values_set(new_parameter_set%PARAMETERS,0_intg,err,error,*999)
17833 CASE(field_sp_type)
17834 CALL distributed_vector_all_values_set(new_parameter_set%PARAMETERS,0.0_sp,err,error,*999)
17835 CASE(field_dp_type)
17836 CALL distributed_vector_all_values_set(new_parameter_set%PARAMETERS,0.0_dp,err,error,*999)
17838 CALL distributed_vector_all_values_set(new_parameter_set%PARAMETERS,.false.,err,error,*999)
17841 ALLOCATE(new_parameter_sets(field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS+1),stat=err)
17842 IF(err/=0)
CALL flagerror(
"Could not allocate new parameter sets.",err,error,*999)
17843 IF(
ASSOCIATED(field_variable%PARAMETER_SETS%PARAMETER_SETS))
THEN 17844 DO parameter_set_idx=1,field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS
17845 new_parameter_sets(parameter_set_idx)%PTR=>field_variable%PARAMETER_SETS%PARAMETER_SETS(parameter_set_idx)%PTR
17847 DEALLOCATE(field_variable%PARAMETER_SETS%PARAMETER_SETS)
17849 new_parameter_sets(field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS+1)%PTR=>new_parameter_set
17850 ALLOCATE(field_variable%PARAMETER_SETS%PARAMETER_SETS(field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS+1), &
17852 IF(err/=0)
CALL flagerror(
"Could not allocate field parameter sets parameter sets.",err,error,*999)
17853 DO parameter_set_idx=1,field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS+1
17854 field_variable%PARAMETER_SETS%PARAMETER_SETS(parameter_set_idx)%PTR=>new_parameter_sets(parameter_set_idx)%PTR
17856 DEALLOCATE(new_parameter_sets)
17857 field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS=field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS+1
17858 field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR=>new_parameter_set
17860 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17861 &
" is invalid. The field parameter set type must be between 1 and "// &
17862 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 17863 CALL flagerror(local_error,err,error,*999)
17866 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17867 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17868 CALL flagerror(local_error,err,error,*999)
17871 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17872 &
" is invalid. The variable type must be between 1 and "// &
17873 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 17874 CALL flagerror(local_error,err,error,*999)
17877 CALL flagerror(
"Field is not associated.",err,error,*999)
17880 exits(
"FIELD_PARAMETER_SET_CREATE")
17882 999
CALL field_parameter_set_finalise(new_parameter_set,dummy_err,dummy_error,*998)
17883 998
IF(
ASSOCIATED(new_parameter_sets))
DEALLOCATE(new_parameter_sets)
17884 errorsexits(
"FIELD_PARAMETER_SET_CREATE",err,error)
17886 END SUBROUTINE field_parameter_set_create
17893 SUBROUTINE field_parameter_set_created(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETER_SET_CREATED,ERR,ERROR,*)
17896 TYPE(field_type),
POINTER :: field
17897 INTEGER(INTG),
INTENT(IN) :: variable_type
17898 INTEGER(INTG),
INTENT(IN) :: field_set_type
17899 LOGICAL,
INTENT(OUT) :: parameter_set_created
17900 INTEGER(INTG),
INTENT(OUT) :: err
17901 TYPE(varying_string),
INTENT(OUT) :: error
17903 TYPE(field_variable_type),
POINTER :: field_variable
17904 TYPE(varying_string) :: local_error
17906 enters(
"FIELD_PARAMETER_SET_CREATED",err,error,*999)
17908 IF(
ASSOCIATED(field))
THEN 17909 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 17910 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
17911 IF(
ASSOCIATED(field_variable))
THEN 17913 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 17915 IF(
ASSOCIATED(field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR))
THEN 17916 parameter_set_created=.true.
17918 parameter_set_created=.false.
17921 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
17922 &
" is invalid. The field parameter set type must be between 1 and "// &
17923 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 17924 CALL flagerror(local_error,err,error,*999)
17927 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17928 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 17929 CALL flagerror(local_error,err,error,*999)
17932 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
17933 &
" is invalid. The variable type must be between 1 and "// &
17934 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 17935 CALL flagerror(local_error,err,error,*999)
17938 CALL flagerror(
"Field is not associated.",err,error,*999)
17941 exits(
"FIELD_PARAMETER_SET_CREATED")
17943 999 errorsexits(
"FIELD_PARAMETER_SET_CREATED",err,error)
17945 END SUBROUTINE field_parameter_set_created
17953 SUBROUTINE field_parametersetensurecreated(field,variableType,fieldSetType,err,error,*)
17956 TYPE(field_type),
POINTER :: field
17957 INTEGER(INTG),
INTENT(IN) :: variabletype
17958 INTEGER(INTG),
INTENT(IN) :: fieldsettype
17959 INTEGER(INTG),
INTENT(OUT) :: err
17960 TYPE(varying_string),
INTENT(OUT) :: error
17962 LOGICAL :: parametersetcreated
17964 enters(
"Field_ParameterSetEnsureCreated",err,error,*999)
17966 CALL field_parameter_set_created(field,variabletype,fieldsettype,parametersetcreated,err,error,*999)
17967 IF(.NOT.parametersetcreated)
THEN 17968 CALL field_parameter_set_create(field,variabletype,fieldsettype,err,error,*999)
17971 exits(
"Field_ParameterSetEnsureCreated")
17973 999 errorsexits(
"Field_ParameterSetEnsureCreated",err,error)
17975 END SUBROUTINE field_parametersetensurecreated
17982 SUBROUTINE field_parameter_set_destroy(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,ERR,ERROR,*)
17985 TYPE(field_type),
POINTER :: field
17986 INTEGER(INTG),
INTENT(IN) :: variable_type
17987 INTEGER(INTG),
INTENT(IN) :: field_set_type
17988 INTEGER(INTG),
INTENT(OUT) :: err
17989 TYPE(varying_string),
INTENT(OUT) :: error
17991 INTEGER(INTG) :: parameter_set_idx,set_index
17992 TYPE(field_parameter_set_type),
POINTER :: parameter_set
17993 TYPE(field_parameter_set_ptr_type),
POINTER :: new_parameter_sets(:)
17994 TYPE(field_variable_type),
POINTER :: field_variable
17995 TYPE(varying_string) :: local_error
17997 NULLIFY(new_parameter_sets)
17999 enters(
"FIELD_PARAMETER_SET_DESTROY",err,error,*999)
18001 IF(
ASSOCIATED(field))
THEN 18002 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18003 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18004 IF(
ASSOCIATED(field_variable))
THEN 18006 IF(field_set_type>0.AND.field_set_type<field_number_of_set_types)
THEN 18008 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18009 IF(
ASSOCIATED(parameter_set))
THEN 18010 set_index=parameter_set%SET_INDEX
18011 ALLOCATE(new_parameter_sets(field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS-1),stat=err)
18012 IF(err/=0)
CALL flagerror(
"Could not allocate new parameter sets",err,error,*999)
18013 DO parameter_set_idx=1,field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS
18014 IF(parameter_set_idx<set_index)
THEN 18015 new_parameter_sets(parameter_set_idx)%PTR=>field_variable%PARAMETER_SETS%PARAMETER_SETS(parameter_set_idx)%PTR
18016 ELSE IF(parameter_set_idx>set_index)
THEN 18017 new_parameter_sets(parameter_set_idx-1)%PTR=>field_variable%PARAMETER_SETS%PARAMETER_SETS(parameter_set_idx)%PTR
18018 new_parameter_sets(parameter_set_idx-1)%PTR%SET_INDEX=new_parameter_sets(parameter_set_idx-1)%PTR%SET_INDEX-1
18021 DEALLOCATE(field_variable%PARAMETER_SETS%PARAMETER_SETS)
18022 field_variable%PARAMETER_SETS%PARAMETER_SETS=>new_parameter_sets
18023 field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS=field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS-1
18024 NULLIFY(field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR)
18025 CALL field_parameter_set_finalise(parameter_set,err,error,*999)
18027 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18028 &
" has not been created for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18029 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18030 CALL flagerror(local_error,err,error,*999)
18033 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18034 &
" is invalid. The field parameter set type must be between 1 and "// &
18035 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
18036 CALL flagerror(local_error,err,error,*999)
18039 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18040 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18041 CALL flagerror(local_error,err,error,*999)
18044 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18045 &
" is invalid. The variable type must be between 1 and "// &
18046 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18047 CALL flagerror(local_error,err,error,*999)
18050 CALL flagerror(
"Field is not associated.",err,error,*999)
18053 exits(
"FIELD_PARAMETER_SET_DESTROY")
18055 999
IF(
ASSOCIATED(new_parameter_sets))
DEALLOCATE(new_parameter_sets)
18056 errorsexits(
"FIELD_PARAMETER_SET_DESTROY",err,error)
18058 END SUBROUTINE field_parameter_set_destroy
18065 SUBROUTINE field_parameter_set_finalise(FIELD_PARAMETER_SET,ERR,ERROR,*)
18068 TYPE(field_parameter_set_type),
POINTER :: field_parameter_set
18069 INTEGER(INTG),
INTENT(OUT) :: err
18070 TYPE(varying_string),
INTENT(OUT) :: error
18073 enters(
"FIELD_PARAMETER_SET_FINALISE",err,error,*999)
18075 IF(
ASSOCIATED(field_parameter_set))
THEN 18076 IF(
ASSOCIATED(field_parameter_set%PARAMETERS))
CALL distributed_vector_destroy(field_parameter_set%PARAMETERS,err,error,*999)
18077 DEALLOCATE(field_parameter_set)
18080 exits(
"FIELD_PARAMETER_SET_FINALISE")
18082 999 errorsexits(
"FIELD_PARAMETER_SET_FINALISE",err,error)
18084 END SUBROUTINE field_parameter_set_finalise
18091 SUBROUTINE field_parameter_set_data_get_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETERS,ERR,ERROR,*)
18094 TYPE(field_type),
POINTER :: field
18095 INTEGER(INTG),
INTENT(IN) :: variable_type
18096 INTEGER(INTG),
INTENT(IN) :: field_set_type
18097 INTEGER(INTG),
POINTER :: parameters(:)
18098 INTEGER(INTG),
INTENT(OUT) :: err
18099 TYPE(varying_string),
INTENT(OUT) :: error
18101 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18102 TYPE(field_variable_type),
POINTER :: field_variable
18103 TYPE(varying_string) :: local_error
18105 enters(
"FIELD_PARAMETER_SET_DATA_GET_INTG",err,error,*999)
18107 IF(
ASSOCIATED(field))
THEN 18108 IF(
ASSOCIATED(parameters))
THEN 18109 CALL flagerror(
"Parameters is already associated.",err,error,*999)
18111 NULLIFY(parameters)
18112 IF(field%FIELD_FINISHED)
THEN 18113 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18114 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18115 IF(
ASSOCIATED(field_variable))
THEN 18116 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 18117 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18118 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18119 IF(
ASSOCIATED(parameter_set))
THEN 18120 CALL distributed_vector_data_get(parameter_set%PARAMETERS,parameters,err,error,*999)
18122 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18123 &
" has not been created for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18124 &
" on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18125 CALL flagerror(local_error,err,error,*999)
18128 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18129 &
" is invalid. The field parameter set type must be between 1 and "// &
18130 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18131 CALL flagerror(local_error,err,error,*999)
18134 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
18135 &
" does not correspond to the integer data type of the given parameters array." 18136 CALL flagerror(local_error,err,error,*999)
18139 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18140 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18141 CALL flagerror(local_error,err,error,*999)
18144 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18145 &
" is invalid. The variable type must be between 1 and "// &
18146 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18147 CALL flagerror(local_error,err,error,*999)
18150 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18151 &
" has not been finished." 18152 CALL flagerror(local_error,err,error,*999)
18156 CALL flagerror(
"Field is not associated.",err,error,*999)
18159 exits(
"FIELD_PARAMETER_SET_DATA_GET_INTG")
18161 999 errorsexits(
"FIELD_PARAMETER_SET_DATA_GET_INTG",err,error)
18163 END SUBROUTINE field_parameter_set_data_get_intg
18170 SUBROUTINE field_parameter_set_data_get_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETERS,ERR,ERROR,*)
18173 TYPE(field_type),
POINTER :: field
18174 INTEGER(INTG),
INTENT(IN) :: variable_type
18175 INTEGER(INTG),
INTENT(IN) :: field_set_type
18176 REAL(SP),
POINTER :: parameters(:)
18177 INTEGER(INTG),
INTENT(OUT) :: err
18178 TYPE(varying_string),
INTENT(OUT) :: error
18180 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18181 TYPE(field_variable_type),
POINTER :: field_variable
18182 TYPE(varying_string) :: local_error
18184 enters(
"FIELD_PARAMETER_SET_DATA_GET_SP",err,error,*999)
18186 IF(
ASSOCIATED(field))
THEN 18187 IF(
ASSOCIATED(parameters))
THEN 18188 CALL flagerror(
"Parameters is already associated.",err,error,*999)
18190 NULLIFY(parameters)
18191 IF(field%FIELD_FINISHED)
THEN 18192 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18193 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18194 IF(
ASSOCIATED(field_variable))
THEN 18195 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 18196 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18197 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18198 IF(
ASSOCIATED(parameter_set))
THEN 18199 CALL distributed_vector_data_get(parameter_set%PARAMETERS,parameters,err,error,*999)
18201 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18202 &
" has not been created for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18203 &
" on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18204 CALL flagerror(local_error,err,error,*999)
18207 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18208 &
" is invalid. The field parameter set type must be between 1 and "// &
18209 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18210 CALL flagerror(local_error,err,error,*999)
18213 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
18214 &
" does not correspond to the single precision data type of the given parameters array." 18215 CALL flagerror(local_error,err,error,*999)
18218 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18219 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18220 CALL flagerror(local_error,err,error,*999)
18223 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18224 &
" is invalid. The variable type must be between 1 and "// &
18225 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18226 CALL flagerror(local_error,err,error,*999)
18229 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18230 &
" has not been finished." 18231 CALL flagerror(local_error,err,error,*999)
18235 CALL flagerror(
"Field is not associated.",err,error,*999)
18238 exits(
"FIELD_PARAMETER_SET_DATA_GET_SP")
18240 999 errorsexits(
"FIELD_PARAMETER_SET_DATA_GET_SP",err,error)
18242 END SUBROUTINE field_parameter_set_data_get_sp
18249 SUBROUTINE field_parameter_set_data_get_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETERS,ERR,ERROR,*)
18252 TYPE(field_type),
POINTER :: field
18253 INTEGER(INTG),
INTENT(IN) :: variable_type
18254 INTEGER(INTG),
INTENT(IN) :: field_set_type
18255 REAL(DP),
POINTER :: parameters(:)
18256 INTEGER(INTG),
INTENT(OUT) :: err
18257 TYPE(varying_string),
INTENT(OUT) :: error
18259 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18260 TYPE(field_variable_type),
POINTER :: field_variable
18261 TYPE(varying_string) :: local_error
18263 enters(
"FIELD_PARAMETER_SET_DATA_GET_DP",err,error,*999)
18265 IF(
ASSOCIATED(field))
THEN 18266 IF(
ASSOCIATED(parameters))
THEN 18267 CALL flagerror(
"Parameters is already associated.",err,error,*999)
18269 NULLIFY(parameters)
18270 IF(field%FIELD_FINISHED)
THEN 18271 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18272 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18273 IF(
ASSOCIATED(field_variable))
THEN 18274 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 18275 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18276 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18277 IF(
ASSOCIATED(parameter_set))
THEN 18278 CALL distributed_vector_data_get(parameter_set%PARAMETERS,parameters,err,error,*999)
18280 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18281 &
" has not been created for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18282 &
" on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18283 CALL flagerror(local_error,err,error,*999)
18286 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18287 &
" is invalid. The field parameter set type must be between 1 and "// &
18288 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18289 CALL flagerror(local_error,err,error,*999)
18292 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
18293 &
" does not correspond to the double precision data type of the given parameters array." 18294 CALL flagerror(local_error,err,error,*999)
18297 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18298 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18299 CALL flagerror(local_error,err,error,*999)
18302 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18303 &
" is invalid. The variable type must be between 1 and "// &
18304 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18305 CALL flagerror(local_error,err,error,*999)
18308 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18309 &
" has not been finished." 18310 CALL flagerror(local_error,err,error,*999)
18314 CALL flagerror(
"Field is not associated.",err,error,*999)
18317 exits(
"FIELD_PARAMETER_SET_DATA_GET_DP")
18319 999 errorsexits(
"FIELD_PARAMETER_SET_DATA_GET_DP",err,error)
18321 END SUBROUTINE field_parameter_set_data_get_dp
18328 SUBROUTINE field_parameter_set_data_get_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETERS,ERR,ERROR,*)
18331 TYPE(field_type),
POINTER :: field
18332 INTEGER(INTG),
INTENT(IN) :: variable_type
18333 INTEGER(INTG),
INTENT(IN) :: field_set_type
18334 LOGICAL,
POINTER :: parameters(:)
18335 INTEGER(INTG),
INTENT(OUT) :: err
18336 TYPE(varying_string),
INTENT(OUT) :: error
18338 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18339 TYPE(field_variable_type),
POINTER :: field_variable
18340 TYPE(varying_string) :: local_error
18342 enters(
"FIELD_PARAMETER_SET_DATA_GET_L",err,error,*999)
18344 IF(
ASSOCIATED(field))
THEN 18345 IF(
ASSOCIATED(parameters))
THEN 18346 CALL flagerror(
"Parameters is already associated.",err,error,*999)
18348 NULLIFY(parameters)
18349 IF(field%FIELD_FINISHED)
THEN 18350 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18351 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18352 IF(
ASSOCIATED(field_variable))
THEN 18353 IF(field_variable%DATA_TYPE==field_l_type)
THEN 18354 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18355 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18356 IF(
ASSOCIATED(parameter_set))
THEN 18357 CALL distributed_vector_data_get(parameter_set%PARAMETERS,parameters,err,error,*999)
18359 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18360 &
" has not been created for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18361 &
" on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18362 CALL flagerror(local_error,err,error,*999)
18365 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18366 &
" is invalid. The field parameter set type must be between 1 and "// &
18367 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18368 CALL flagerror(local_error,err,error,*999)
18371 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
18372 &
" does not correspond to the logical data type of the given parameters array." 18373 CALL flagerror(local_error,err,error,*999)
18376 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18377 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18378 CALL flagerror(local_error,err,error,*999)
18381 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18382 &
" is invalid. The variable type must be between 1 and "// &
18383 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18384 CALL flagerror(local_error,err,error,*999)
18387 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18388 &
" has not been finished." 18389 CALL flagerror(local_error,err,error,*999)
18393 CALL flagerror(
"Field is not associated.",err,error,*999)
18396 exits(
"FIELD_PARAMETER_SET_DATA_GET_L")
18398 999 errorsexits(
"FIELD_PARAMETER_SET_DATA_GET_L",err,error)
18400 END SUBROUTINE field_parameter_set_data_get_l
18407 SUBROUTINE field_parameter_set_data_restore_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETERS,ERR,ERROR,*)
18410 TYPE(field_type),
POINTER :: field
18411 INTEGER(INTG),
INTENT(IN) :: variable_type
18412 INTEGER(INTG),
INTENT(IN) :: field_set_type
18413 INTEGER(INTG),
POINTER :: parameters(:)
18414 INTEGER(INTG),
INTENT(OUT) :: err
18415 TYPE(varying_string),
INTENT(OUT) :: error
18417 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18418 TYPE(field_variable_type),
POINTER :: field_variable
18419 TYPE(varying_string) :: local_error
18421 enters(
"FIELD_PARAMETER_SET_DATA_RESTORE_INTG",err,error,*999)
18423 IF(
ASSOCIATED(field))
THEN 18424 IF(field%FIELD_FINISHED)
THEN 18425 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18426 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18427 IF(
ASSOCIATED(field_variable))
THEN 18428 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 18429 IF(
ASSOCIATED(parameters))
THEN 18430 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18431 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18432 IF(
ASSOCIATED(parameter_set))
THEN 18433 CALL distributed_vector_data_restore(parameter_set%PARAMETERS,parameters,err,error,*999)
18435 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18436 &
" has not been created on variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18437 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18438 CALL flagerror(local_error,err,error,*999)
18441 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18442 &
" is invalid. The field parameter set type must be between 1 and "// &
18443 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18444 CALL flagerror(local_error,err,error,*999)
18447 CALL flagerror(
"Parameters is not associated.",err,error,*999)
18450 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
18451 &
" does not correspond to the integer data type of the given parameters array." 18452 CALL flagerror(local_error,err,error,*999)
18455 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18456 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18457 CALL flagerror(local_error,err,error,*999)
18460 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18461 &
" is invalid. The variable type must be between 1 and "// &
18462 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18463 CALL flagerror(local_error,err,error,*999)
18466 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18467 &
" has not been finished." 18468 CALL flagerror(local_error,err,error,*999)
18471 CALL flagerror(
"Field is not associated.",err,error,*999)
18474 exits(
"FIELD_PARAMETER_SET_DATA_RESTORE_INTG")
18476 999 errorsexits(
"FIELD_PARAMETER_SET_DATA_RESTORE_INTG",err,error)
18478 END SUBROUTINE field_parameter_set_data_restore_intg
18485 SUBROUTINE field_parameter_set_data_restore_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETERS,ERR,ERROR,*)
18488 TYPE(field_type),
POINTER :: field
18489 INTEGER(INTG),
INTENT(IN) :: variable_type
18490 INTEGER(INTG),
INTENT(IN) :: field_set_type
18491 REAL(SP),
POINTER :: parameters(:)
18492 INTEGER(INTG),
INTENT(OUT) :: err
18493 TYPE(varying_string),
INTENT(OUT) :: error
18495 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18496 TYPE(field_variable_type),
POINTER :: field_variable
18497 TYPE(varying_string) :: local_error
18499 enters(
"FIELD_PARAMETER_SET_DATA_RESTORE_SP",err,error,*999)
18501 IF(
ASSOCIATED(field))
THEN 18502 IF(field%FIELD_FINISHED)
THEN 18503 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18504 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18505 IF(
ASSOCIATED(field_variable))
THEN 18506 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 18507 IF(
ASSOCIATED(parameters))
THEN 18508 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18509 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18510 IF(
ASSOCIATED(parameter_set))
THEN 18511 CALL distributed_vector_data_restore(parameter_set%PARAMETERS,parameters,err,error,*999)
18513 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18514 &
" has not been created on variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18515 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18516 CALL flagerror(local_error,err,error,*999)
18519 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18520 &
" is invalid. The field parameter set type must be between 1 and "// &
18521 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18522 CALL flagerror(local_error,err,error,*999)
18525 CALL flagerror(
"Parameters is not associated.",err,error,*999)
18528 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
18529 &
" does not correspond to the single precision data type of the given parameters array." 18530 CALL flagerror(local_error,err,error,*999)
18533 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18534 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18535 CALL flagerror(local_error,err,error,*999)
18538 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18539 &
" is invalid. The variable type must be between 1 and "// &
18540 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18541 CALL flagerror(local_error,err,error,*999)
18544 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18545 &
" has not been finished." 18546 CALL flagerror(local_error,err,error,*999)
18549 CALL flagerror(
"Field is not associated.",err,error,*999)
18552 exits(
"FIELD_PARAMETER_SET_DATA_RESTORE_SP")
18554 999 errorsexits(
"FIELD_PARAMETER_SET_DATA_RESTORE_SP",err,error)
18556 END SUBROUTINE field_parameter_set_data_restore_sp
18563 SUBROUTINE field_parameter_set_data_restore_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETERS,ERR,ERROR,*)
18566 TYPE(field_type),
POINTER :: field
18567 INTEGER(INTG),
INTENT(IN) :: variable_type
18568 INTEGER(INTG),
INTENT(IN) :: field_set_type
18569 REAL(DP),
POINTER :: parameters(:)
18570 INTEGER(INTG),
INTENT(OUT) :: err
18571 TYPE(varying_string),
INTENT(OUT) :: error
18573 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18574 TYPE(field_variable_type),
POINTER :: field_variable
18575 TYPE(varying_string) :: local_error
18577 enters(
"FIELD_PARAMETER_SET_DATA_RESTORE_DP",err,error,*999)
18579 IF(
ASSOCIATED(field))
THEN 18580 IF(field%FIELD_FINISHED)
THEN 18581 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18582 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18583 IF(
ASSOCIATED(field_variable))
THEN 18584 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 18585 IF(
ASSOCIATED(parameters))
THEN 18586 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18587 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18588 IF(
ASSOCIATED(parameter_set))
THEN 18589 CALL distributed_vector_data_restore(parameter_set%PARAMETERS,parameters,err,error,*999)
18591 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18592 &
" has not been created on variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18593 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18594 CALL flagerror(local_error,err,error,*999)
18597 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18598 &
" is invalid. The field parameter set type must be between 1 and "// &
18599 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18600 CALL flagerror(local_error,err,error,*999)
18603 CALL flagerror(
"Parameters is not associated.",err,error,*999)
18606 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
18607 &
" does not correspond to the double precision data type of the given parameters array." 18608 CALL flagerror(local_error,err,error,*999)
18611 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18612 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18613 CALL flagerror(local_error,err,error,*999)
18616 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18617 &
" is invalid. The variable type must be between 1 and "// &
18618 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18619 CALL flagerror(local_error,err,error,*999)
18622 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18623 &
" has not been finished." 18624 CALL flagerror(local_error,err,error,*999)
18627 CALL flagerror(
"Field is not associated.",err,error,*999)
18630 exits(
"FIELD_PARAMETER_SET_DATA_RESTORE_DP")
18632 999 errorsexits(
"FIELD_PARAMETER_SET_DATA_RESTORE_DP",err,error)
18634 END SUBROUTINE field_parameter_set_data_restore_dp
18641 SUBROUTINE field_parameter_set_data_restore_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETERS,ERR,ERROR,*)
18644 TYPE(field_type),
POINTER :: field
18645 INTEGER(INTG),
INTENT(IN) :: variable_type
18646 INTEGER(INTG),
INTENT(IN) :: field_set_type
18647 LOGICAL,
POINTER :: parameters(:)
18648 INTEGER(INTG),
INTENT(OUT) :: err
18649 TYPE(varying_string),
INTENT(OUT) :: error
18651 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18652 TYPE(field_variable_type),
POINTER :: field_variable
18653 TYPE(varying_string) :: local_error
18655 enters(
"FIELD_PARAMETER_SET_DATA_RESTORE_L",err,error,*999)
18657 IF(
ASSOCIATED(field))
THEN 18658 IF(field%FIELD_FINISHED)
THEN 18659 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18660 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18661 IF(
ASSOCIATED(field_variable))
THEN 18662 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 18663 IF(
ASSOCIATED(parameters))
THEN 18664 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18665 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18666 IF(
ASSOCIATED(parameter_set))
THEN 18667 CALL distributed_vector_data_restore(parameter_set%PARAMETERS,parameters,err,error,*999)
18669 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18670 &
" has not been created on variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18671 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18672 CALL flagerror(local_error,err,error,*999)
18675 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18676 &
" is invalid. The field parameter set type must be between 1 and "// &
18677 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18678 CALL flagerror(local_error,err,error,*999)
18681 CALL flagerror(
"Parameters is not associated.",err,error,*999)
18684 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
18685 &
" does not correspond to the logical data type of the given parameters array." 18686 CALL flagerror(local_error,err,error,*999)
18689 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18690 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18691 CALL flagerror(local_error,err,error,*999)
18694 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18695 &
" is invalid. The variable type must be between 1 and "// &
18696 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18697 CALL flagerror(local_error,err,error,*999)
18700 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18701 &
" has not been finished." 18702 CALL flagerror(local_error,err,error,*999)
18705 CALL flagerror(
"Field is not associated.",err,error,*999)
18708 exits(
"FIELD_PARAMETER_SET_DATA_RESTORE_L")
18710 999 errorsexits(
"FIELD_PARAMETER_SET_DATA_RESTORE_L",err,error)
18712 END SUBROUTINE field_parameter_set_data_restore_l
18719 SUBROUTINE field_parameter_set_get(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,PARAMETER_SET,ERR,ERROR,*)
18722 TYPE(field_type),
POINTER :: field
18723 INTEGER(INTG),
INTENT(IN) :: variable_type
18724 INTEGER(INTG),
INTENT(IN) :: field_set_type
18725 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18726 INTEGER(INTG),
INTENT(OUT) :: err
18727 TYPE(varying_string),
INTENT(OUT) :: error
18730 TYPE(field_variable_type),
POINTER :: field_variable
18731 TYPE(varying_string) :: local_error
18733 enters(
"FIELD_PARAMETER_SET_GET",err,error,*999)
18735 IF(
ASSOCIATED(field))
THEN 18736 IF(field%FIELD_FINISHED)
THEN 18737 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 18738 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18739 IF(
ASSOCIATED(field_variable))
THEN 18740 IF(
ASSOCIATED(parameter_set))
THEN 18741 CALL flagerror(
"Parameter set is already associated.",err,error,*999)
18743 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18744 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18745 IF(.NOT.
ASSOCIATED(parameter_set))
THEN 18746 local_error=
"The field parameter set type of "// &
18747 & trim(number_to_vstring(field_set_type,
"*",err,error))// &
18748 &
" has not been created on variable type "// &
18749 & trim(number_to_vstring(variable_type,
"*",err,error))// &
18750 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18751 CALL flagerror(local_error,err,error,*999)
18754 local_error=
"The field parameter set type of "// &
18755 & trim(number_to_vstring(field_set_type,
"*",err,error))// &
18756 &
" is invalid. The field parameter set type must be between 1 and "// &
18757 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18758 CALL flagerror(local_error,err,error,*999)
18762 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18763 &
" has not been created on field number "// &
18764 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18765 CALL flagerror(local_error,err,error,*999)
18768 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18769 &
" is invalid. The variable type must be between 1 and "// &
18770 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18771 CALL flagerror(local_error,err,error,*999)
18774 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18775 &
" has not been finished." 18776 CALL flagerror(local_error,err,error,*999)
18779 CALL flagerror(
"Field is not associated.",err,error,*999)
18782 exits(
"FIELD_PARAMETER_SET_GET")
18784 999 errorsexits(
"FIELD_PARAMETER_SET_GET",err,error)
18786 END SUBROUTINE field_parameter_set_get
18793 SUBROUTINE field_parameter_set_get_constant_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
18796 TYPE(field_type),
POINTER :: field
18797 INTEGER(INTG),
INTENT(IN) :: variable_type
18798 INTEGER(INTG),
INTENT(IN) :: field_set_type
18799 INTEGER(INTG),
INTENT(IN) :: component_number
18800 INTEGER(INTG),
INTENT(OUT) ::
VALUE 18801 INTEGER(INTG),
INTENT(OUT) :: err
18802 TYPE(varying_string),
INTENT(OUT) :: error
18804 INTEGER(INTG) :: ny
18805 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18806 TYPE(field_variable_type),
POINTER :: field_variable
18807 TYPE(varying_string) :: local_error
18809 enters(
"FIELD_PARAMETER_SET_GET_CONSTANT_INTG",err,error,*999)
18811 IF(
ASSOCIATED(field))
THEN 18812 IF(field%FIELD_FINISHED)
THEN 18813 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 18814 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18815 IF(
ASSOCIATED(field_variable))
THEN 18816 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 18817 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18818 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18819 IF(
ASSOCIATED(parameter_set))
THEN 18820 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 18821 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
18822 CASE(field_constant_interpolation)
18823 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 18824 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
18825 CALL distributed_vector_values_get(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
18827 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
18828 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18829 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18830 &
" does not have any constant parameters." 18831 CALL flagerror(local_error,err,error,*999)
18834 CASE(field_element_based_interpolation)
18835 local_error=
"Can not get by constant for component number "// &
18836 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18837 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18838 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 18839 CALL flagerror(local_error,err,error,*999)
18840 CASE(field_node_based_interpolation)
18841 local_error=
"Can not get by constant for component number "// &
18842 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18843 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18844 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 18845 CALL flagerror(local_error,err,error,*999)
18846 CASE(field_grid_point_based_interpolation)
18847 local_error=
"Can not get by constant for component number "// &
18848 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18849 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18850 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 18851 CALL flagerror(local_error,err,error,*999)
18852 CASE(field_gauss_point_based_interpolation)
18853 local_error=
"Can not get by constant for component number "// &
18854 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18855 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18856 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 18857 CALL flagerror(local_error,err,error,*999)
18858 CASE(field_data_point_based_interpolation)
18859 local_error=
"Can not add element for component number "// &
18860 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18861 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18862 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 18863 CALL flagerror(local_error,err,error,*999)
18865 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
18866 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
18867 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
18868 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18869 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18870 CALL flagerror(local_error,err,error,*999)
18873 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
18874 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18875 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
18876 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
18878 CALL flagerror(local_error,err,error,*999)
18881 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18882 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18883 CALL flagerror(local_error,err,error,*999)
18886 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
18887 &
" is invalid. The field parameter set type must be between 1 and "// &
18888 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 18889 CALL flagerror(local_error,err,error,*999)
18892 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
18893 &
" does not correspond to the integer data type of the given value." 18894 CALL flagerror(local_error,err,error,*999)
18897 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18898 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 18899 CALL flagerror(local_error,err,error,*999)
18902 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18903 &
" is invalid. The variable type must be between 1 and "// &
18904 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 18905 CALL flagerror(local_error,err,error,*999)
18908 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18909 &
" has not been finished." 18910 CALL flagerror(local_error,err,error,*999)
18913 CALL flagerror(
"Field is not associated.",err,error,*999)
18916 exits(
"FIELD_PARAMETER_SET_GET_CONSTANT_INTG")
18918 999 errorsexits(
"FIELD_PARAMETER_SET_GET_CONSTANT_INTG",err,error)
18920 END SUBROUTINE field_parameter_set_get_constant_intg
18927 SUBROUTINE field_parameter_set_get_constant_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
18930 TYPE(field_type),
POINTER :: field
18931 INTEGER(INTG),
INTENT(IN) :: variable_type
18932 INTEGER(INTG),
INTENT(IN) :: field_set_type
18933 INTEGER(INTG),
INTENT(IN) :: component_number
18934 REAL(SP),
INTENT(OUT) ::
VALUE 18935 INTEGER(INTG),
INTENT(OUT) :: err
18936 TYPE(varying_string),
INTENT(OUT) :: error
18938 INTEGER(INTG) :: ny
18939 TYPE(field_parameter_set_type),
POINTER :: parameter_set
18940 TYPE(field_variable_type),
POINTER :: field_variable
18941 TYPE(varying_string) :: local_error
18943 enters(
"FIELD_PARAMETER_SET_GET_CONSTANT_SP",err,error,*999)
18945 IF(
ASSOCIATED(field))
THEN 18946 IF(field%FIELD_FINISHED)
THEN 18947 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 18948 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
18949 IF(
ASSOCIATED(field_variable))
THEN 18950 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 18951 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 18952 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
18953 IF(
ASSOCIATED(parameter_set))
THEN 18954 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 18955 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
18956 CASE(field_constant_interpolation)
18957 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 18958 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
18959 CALL distributed_vector_values_get(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
18961 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
18962 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
18963 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
18964 &
" does not have any constant parameters." 18965 CALL flagerror(local_error,err,error,*999)
18967 CASE(field_element_based_interpolation)
18968 local_error=
"Can not get by constant for component number "// &
18969 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18970 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18971 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 18972 CALL flagerror(local_error,err,error,*999)
18973 CASE(field_node_based_interpolation)
18974 local_error=
"Can not get by constant for component number "// &
18975 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18976 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18977 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 18978 CALL flagerror(local_error,err,error,*999)
18979 CASE(field_grid_point_based_interpolation)
18980 local_error=
"Can not get by constant for component number "// &
18981 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18982 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18983 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 18984 CALL flagerror(local_error,err,error,*999)
18985 CASE(field_gauss_point_based_interpolation)
18986 local_error=
"Can not get by constant for component number "// &
18987 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18988 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18989 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 18990 CALL flagerror(local_error,err,error,*999)
18991 CASE(field_data_point_based_interpolation)
18992 local_error=
"Can not add element for component number "// &
18993 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
18994 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
18995 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 18996 CALL flagerror(local_error,err,error,*999)
18998 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
18999 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
19000 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
19001 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19002 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19003 CALL flagerror(local_error,err,error,*999)
19006 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
19007 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19008 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
19009 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
19011 CALL flagerror(local_error,err,error,*999)
19014 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
19015 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19016 CALL flagerror(local_error,err,error,*999)
19019 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
19020 &
" is invalid. The field parameter set type must be between 1 and "// &
19021 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 19022 CALL flagerror(local_error,err,error,*999)
19025 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
19026 &
" does not correspond to the single precision data type of the given value." 19027 CALL flagerror(local_error,err,error,*999)
19030 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19031 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19032 CALL flagerror(local_error,err,error,*999)
19035 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19036 &
" is invalid. The variable type must be between 1 and "// &
19037 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 19038 CALL flagerror(local_error,err,error,*999)
19041 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
19042 &
" has not been finished." 19043 CALL flagerror(local_error,err,error,*999)
19046 CALL flagerror(
"Field is not associated.",err,error,*999)
19049 exits(
"FIELD_PARAMETER_SET_GET_CONSTANT_SP")
19051 999 errorsexits(
"FIELD_PARAMETER_SET_GET_CONSTANT_SP",err,error)
19053 END SUBROUTINE field_parameter_set_get_constant_sp
19060 SUBROUTINE field_parameter_set_get_constant_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
19063 TYPE(field_type),
POINTER :: field
19064 INTEGER(INTG),
INTENT(IN) :: variable_type
19065 INTEGER(INTG),
INTENT(IN) :: field_set_type
19066 INTEGER(INTG),
INTENT(IN) :: component_number
19067 REAL(DP),
INTENT(OUT) ::
VALUE 19068 INTEGER(INTG),
INTENT(OUT) :: err
19069 TYPE(varying_string),
INTENT(OUT) :: error
19071 INTEGER(INTG) :: ny
19072 TYPE(field_parameter_set_type),
POINTER :: parameter_set
19073 TYPE(field_variable_type),
POINTER :: field_variable
19074 TYPE(varying_string) :: local_error
19076 enters(
"FIELD_PARAMETER_SET_GET_CONSTANT_DP",err,error,*999)
19079 IF(
ASSOCIATED(field))
THEN 19080 IF(field%FIELD_FINISHED)
THEN 19081 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 19082 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
19083 IF(
ASSOCIATED(field_variable))
THEN 19084 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 19085 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 19086 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
19087 IF(
ASSOCIATED(parameter_set))
THEN 19088 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 19089 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
19090 CASE(field_constant_interpolation)
19091 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 19092 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
19093 CALL distributed_vector_values_get(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
19095 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
19096 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19097 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
19098 &
" does not have any constant parameters." 19099 CALL flagerror(local_error,err,error,*999)
19101 CASE(field_element_based_interpolation)
19102 local_error=
"Can not get by constant for component number "// &
19103 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19104 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19105 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 19106 CALL flagerror(local_error,err,error,*999)
19107 CASE(field_node_based_interpolation)
19108 local_error=
"Can not get by constant for component number "// &
19109 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19110 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19111 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 19112 CALL flagerror(local_error,err,error,*999)
19113 CASE(field_grid_point_based_interpolation)
19114 local_error=
"Can not get by constant for component number "// &
19115 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19116 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19117 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 19118 CALL flagerror(local_error,err,error,*999)
19119 CASE(field_gauss_point_based_interpolation)
19120 local_error=
"Can not get by constant for component number "// &
19121 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19122 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19123 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 19124 CALL flagerror(local_error,err,error,*999)
19125 CASE(field_data_point_based_interpolation)
19126 local_error=
"Can not add element for component number "// &
19127 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19128 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19129 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 19130 CALL flagerror(local_error,err,error,*999)
19132 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
19133 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
19134 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
19135 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19136 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19137 CALL flagerror(local_error,err,error,*999)
19140 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
19141 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19142 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
19143 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
19145 CALL flagerror(local_error,err,error,*999)
19148 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
19149 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19150 CALL flagerror(local_error,err,error,*999)
19153 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
19154 &
" is invalid. The field parameter set type must be between 1 and "// &
19155 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 19156 CALL flagerror(local_error,err,error,*999)
19159 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
19160 &
" does not correspond to the double precision data type of the given value." 19161 CALL flagerror(local_error,err,error,*999)
19164 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19165 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19166 CALL flagerror(local_error,err,error,*999)
19169 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19170 &
" is invalid. The variable type must be between 1 and "// &
19171 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 19172 CALL flagerror(local_error,err,error,*999)
19175 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
19176 &
" has not been finished." 19177 CALL flagerror(local_error,err,error,*999)
19180 CALL flagerror(
"Field is not associated.",err,error,*999)
19183 exits(
"FIELD_PARAMETER_SET_GET_CONSTANT_DP")
19185 999 errorsexits(
"FIELD_PARAMETER_SET_GET_CONSTANT_DP",err,error)
19187 END SUBROUTINE field_parameter_set_get_constant_dp
19194 SUBROUTINE field_parameter_set_get_constant_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
19197 TYPE(field_type),
POINTER :: field
19198 INTEGER(INTG),
INTENT(IN) :: variable_type
19199 INTEGER(INTG),
INTENT(IN) :: field_set_type
19200 INTEGER(INTG),
INTENT(IN) :: component_number
19201 LOGICAL,
INTENT(OUT) ::
VALUE 19202 INTEGER(INTG),
INTENT(OUT) :: err
19203 TYPE(varying_string),
INTENT(OUT) :: error
19205 INTEGER(INTG) :: ny
19206 TYPE(field_parameter_set_type),
POINTER :: parameter_set
19207 TYPE(field_variable_type),
POINTER :: field_variable
19208 TYPE(varying_string) :: local_error
19210 enters(
"FIELD_PARAMETER_SET_GET_CONSTANT_L",err,error,*999)
19212 IF(
ASSOCIATED(field))
THEN 19213 IF(field%FIELD_FINISHED)
THEN 19214 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 19215 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
19216 IF(
ASSOCIATED(field_variable))
THEN 19217 IF(field_variable%DATA_TYPE==field_l_type)
THEN 19218 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 19219 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
19220 IF(
ASSOCIATED(parameter_set))
THEN 19221 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 19222 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
19223 CASE(field_constant_interpolation)
19224 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 19225 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
19226 CALL distributed_vector_values_get(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
19228 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
19229 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19230 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
19231 &
" does not have any constant parameters." 19232 CALL flagerror(local_error,err,error,*999)
19234 CASE(field_element_based_interpolation)
19235 local_error=
"Can not get by constant for component number "// &
19236 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19237 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19238 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 19239 CALL flagerror(local_error,err,error,*999)
19240 CASE(field_node_based_interpolation)
19241 local_error=
"Can not get by constant for component number "// &
19242 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19243 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19244 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 19245 CALL flagerror(local_error,err,error,*999)
19246 CASE(field_grid_point_based_interpolation)
19247 local_error=
"Can not get by constant for component number "// &
19248 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19249 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19250 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 19251 CALL flagerror(local_error,err,error,*999)
19252 CASE(field_gauss_point_based_interpolation)
19253 local_error=
"Can not get by constant for component number "// &
19254 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19255 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19256 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 19257 CALL flagerror(local_error,err,error,*999)
19258 CASE(field_data_point_based_interpolation)
19259 local_error=
"Can not add element for component number "// &
19260 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19261 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19262 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 19263 CALL flagerror(local_error,err,error,*999)
19265 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
19266 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
19267 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
19268 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19269 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19270 CALL flagerror(local_error,err,error,*999)
19273 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
19274 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19275 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
19276 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
19278 CALL flagerror(local_error,err,error,*999)
19281 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
19282 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19283 CALL flagerror(local_error,err,error,*999)
19286 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
19287 &
" is invalid. The field parameter set type must be between 1 and "// &
19288 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 19289 CALL flagerror(local_error,err,error,*999)
19292 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
19293 &
" does not correspond to the logical data type of the given value." 19294 CALL flagerror(local_error,err,error,*999)
19297 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19298 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19299 CALL flagerror(local_error,err,error,*999)
19302 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
19303 &
" is invalid. The variable type must be between 1 and "// &
19304 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 19305 CALL flagerror(local_error,err,error,*999)
19308 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
19309 &
" has not been finished." 19310 CALL flagerror(local_error,err,error,*999)
19313 CALL flagerror(
"Field is not associated.",err,error,*999)
19316 exits(
"FIELD_PARAMETER_SET_GET_CONSTANT_L")
19318 999 errorsexits(
"FIELD_PARAMETER_SET_GET_CONSTANT_L",err,error)
19321 END SUBROUTINE field_parameter_set_get_constant_l
19328 SUBROUTINE field_parametersetgetdatapointintg(field,variableType,fieldSetType,userDataPointNumber,componentNumber,value, &
19332 TYPE(field_type),
POINTER :: field
19333 INTEGER(INTG),
INTENT(IN) :: variabletype
19334 INTEGER(INTG),
INTENT(IN) :: fieldsettype
19335 INTEGER(INTG),
INTENT(IN) :: userdatapointnumber
19336 INTEGER(INTG),
INTENT(IN) :: componentnumber
19337 INTEGER(INTG),
INTENT(OUT) ::
value 19338 INTEGER(INTG),
INTENT(OUT) :: err
19339 TYPE(varying_string),
INTENT(OUT) :: error
19341 INTEGER(INTG) :: decompositionlocaldatapointnumber,dofidx
19342 LOGICAL :: userdatapointexists,ghostdatapoint
19343 TYPE(decomposition_type),
POINTER :: decomposition
19344 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
19345 TYPE(field_parameter_set_type),
POINTER :: parameterset
19346 TYPE(field_variable_type),
POINTER :: fieldvariable
19347 TYPE(varying_string) :: localerror
19349 enters(
"Field_ParameterSetGetDataPointIntg",err,error,*999)
19351 IF(
ASSOCIATED(field))
THEN 19352 IF(field%FIELD_FINISHED)
THEN 19353 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 19354 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
19355 IF(
ASSOCIATED(fieldvariable))
THEN 19356 IF(fieldvariable%DATA_TYPE==field_intg_type)
THEN 19357 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 19358 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
19359 IF(
ASSOCIATED(parameterset))
THEN 19360 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 19361 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
19362 CASE(field_constant_interpolation)
19363 localerror=
"Can not get by data point for component number "// &
19364 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19365 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19366 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 19367 CALL flagerror(localerror,err,error,*999)
19368 CASE(field_element_based_interpolation)
19369 localerror=
"Can not get by data point for component number "// &
19370 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19371 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19372 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 19373 CALL flagerror(localerror,err,error,*999)
19374 CASE(field_node_based_interpolation)
19375 localerror=
"Can not get by data point for component number "// &
19376 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19377 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19378 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 19379 CALL flagerror(localerror,err,error,*999)
19380 CASE(field_grid_point_based_interpolation)
19381 localerror=
"Can not get by data point for component number "// &
19382 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19383 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19384 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 19385 CALL flagerror(localerror,err,error,*999)
19386 CASE(field_gauss_point_based_interpolation)
19387 localerror=
"Can not get by data point for component number "// &
19388 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19389 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19390 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 19391 CALL flagerror(localerror,err,error,*999)
19392 CASE(field_data_point_based_interpolation)
19393 decomposition=>field%DECOMPOSITION
19394 IF(
ASSOCIATED(decomposition))
THEN 19395 decompositiontopology=>decomposition%TOPOLOGY
19396 IF(
ASSOCIATED(decompositiontopology))
THEN 19397 CALL decompositiontopology_datapointcheckexists(decompositiontopology,userdatapointnumber, &
19398 & userdatapointexists,decompositionlocaldatapointnumber,ghostdatapoint,err,error,*999)
19399 IF(userdatapointexists)
THEN 19400 dofidx=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
19401 & data_point_param2dof_map%DATA_POINTS(decompositionlocaldatapointnumber)
19402 CALL distributed_vector_values_get(parameterset%PARAMETERS,dofidx,
value,err,error,*999)
19404 localerror=
"The specified user data point number of "// &
19405 & trim(number_to_vstring(userdatapointnumber,
"*",err,error))// &
19406 &
" does not exist in the decomposition for field component number "// &
19407 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
19408 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19409 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19410 CALL flagerror(localerror,err,error,*999)
19413 CALL flagerror(
"Field decomposition topology is not associated.",err,error,*999)
19416 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
19419 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
19420 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
19421 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
19422 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19423 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19424 CALL flagerror(localerror,err,error,*999)
19427 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
19428 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19429 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
19430 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 19431 CALL flagerror(localerror,err,error,*999)
19434 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
19435 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
19436 CALL flagerror(localerror,err,error,*999)
19439 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
19440 &
" is invalid. The field parameter set type must be between 1 and "// &
19441 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
19442 CALL flagerror(localerror,err,error,*999)
19445 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
19446 &
" does not correspond to the integer data type of the given value." 19447 CALL flagerror(localerror,err,error,*999)
19450 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19451 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19452 CALL flagerror(localerror,err,error,*999)
19455 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19456 &
" is invalid. The variable type must be between 1 and "// &
19457 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 19458 CALL flagerror(localerror,err,error,*999)
19461 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
19462 &
" has not been finished." 19463 CALL flagerror(localerror,err,error,*999)
19466 CALL flagerror(
"Field is not associated.",err,error,*999)
19469 exits(
"Field_ParameterSetGetDataPointIntg")
19471 999 errorsexits(
"Field_ParameterSetGetDataPointIntg",err,error)
19473 END SUBROUTINE field_parametersetgetdatapointintg
19480 SUBROUTINE field_parametersetgetdatapointsp(field,variableType,fieldSetType,userDataPointNumber,componentNumber,value,err,error,*)
19483 TYPE(field_type),
POINTER :: field
19484 INTEGER(INTG),
INTENT(IN) :: variabletype
19485 INTEGER(INTG),
INTENT(IN) :: fieldsettype
19486 INTEGER(INTG),
INTENT(IN) :: userdatapointnumber
19487 INTEGER(INTG),
INTENT(IN) :: componentnumber
19488 REAL(SP),
INTENT(OUT) ::
value 19489 INTEGER(INTG),
INTENT(OUT) :: err
19490 TYPE(varying_string),
INTENT(OUT) :: error
19492 INTEGER(INTG) :: decompositionlocaldatapointnumber,dofidx
19493 LOGICAL :: userdatapointexists,ghostdatapoint
19494 TYPE(decomposition_type),
POINTER :: decomposition
19495 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
19496 TYPE(field_parameter_set_type),
POINTER :: parameterset
19497 TYPE(field_variable_type),
POINTER :: fieldvariable
19498 TYPE(varying_string) :: localerror
19500 enters(
"Field_ParameterSetGetDataPointSP",err,error,*999)
19502 IF(
ASSOCIATED(field))
THEN 19503 IF(field%FIELD_FINISHED)
THEN 19504 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 19505 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
19506 IF(
ASSOCIATED(fieldvariable))
THEN 19507 IF(fieldvariable%DATA_TYPE==field_sp_type)
THEN 19508 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 19509 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
19510 IF(
ASSOCIATED(parameterset))
THEN 19511 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 19512 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
19513 CASE(field_constant_interpolation)
19514 localerror=
"Can not get by data point for component number "// &
19515 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19516 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19517 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 19518 CALL flagerror(localerror,err,error,*999)
19519 CASE(field_element_based_interpolation)
19520 localerror=
"Can not get by data point for component number "// &
19521 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19522 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19523 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 19524 CALL flagerror(localerror,err,error,*999)
19525 CASE(field_node_based_interpolation)
19526 localerror=
"Can not get by data point for component number "// &
19527 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19528 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19529 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 19530 CALL flagerror(localerror,err,error,*999)
19531 CASE(field_grid_point_based_interpolation)
19532 localerror=
"Can not get by data point for component number "// &
19533 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19534 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19535 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 19536 CALL flagerror(localerror,err,error,*999)
19537 CASE(field_gauss_point_based_interpolation)
19538 localerror=
"Can not get by data point for component number "// &
19539 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19540 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19541 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 19542 CALL flagerror(localerror,err,error,*999)
19543 CASE(field_data_point_based_interpolation)
19544 decomposition=>field%DECOMPOSITION
19545 IF(
ASSOCIATED(decomposition))
THEN 19546 decompositiontopology=>decomposition%TOPOLOGY
19547 IF(
ASSOCIATED(decompositiontopology))
THEN 19548 CALL decompositiontopology_datapointcheckexists(decompositiontopology,userdatapointnumber, &
19549 & userdatapointexists,decompositionlocaldatapointnumber,ghostdatapoint,err,error,*999)
19550 IF(userdatapointexists)
THEN 19551 dofidx=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
19552 & data_point_param2dof_map%DATA_POINTS(decompositionlocaldatapointnumber)
19553 CALL distributed_vector_values_get(parameterset%PARAMETERS,dofidx,
value,err,error,*999)
19555 localerror=
"The specified user data point number of "// &
19556 & trim(number_to_vstring(userdatapointnumber,
"*",err,error))// &
19557 &
" does not exist in the decomposition for field component number "// &
19558 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
19559 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19560 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19561 CALL flagerror(localerror,err,error,*999)
19564 CALL flagerror(
"Field decomposition topology is not associated.",err,error,*999)
19567 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
19570 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
19571 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
19572 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
19573 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19574 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19575 CALL flagerror(localerror,err,error,*999)
19578 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
19579 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19580 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
19581 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 19582 CALL flagerror(localerror,err,error,*999)
19585 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
19586 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
19587 CALL flagerror(localerror,err,error,*999)
19590 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
19591 &
" is invalid. The field parameter set type must be between 1 and "// &
19592 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
19593 CALL flagerror(localerror,err,error,*999)
19596 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
19597 &
" does not correspond to the single precision data type of the given value." 19598 CALL flagerror(localerror,err,error,*999)
19601 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19602 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19603 CALL flagerror(localerror,err,error,*999)
19606 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19607 &
" is invalid. The variable type must be between 1 and "// &
19608 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 19609 CALL flagerror(localerror,err,error,*999)
19612 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
19613 &
" has not been finished." 19614 CALL flagerror(localerror,err,error,*999)
19617 CALL flagerror(
"Field is not associated.",err,error,*999)
19620 exits(
"Field_ParameterSetGetDataPointSP")
19622 999 errorsexits(
"Field_ParameterSetGetDataPointSP",err,error)
19624 END SUBROUTINE field_parametersetgetdatapointsp
19631 SUBROUTINE field_parametersetgetdatapointdp(field,variableType,fieldSetType,userDataPointNumber,componentNumber,value,err,error,*)
19634 TYPE(field_type),
POINTER :: field
19635 INTEGER(INTG),
INTENT(IN) :: variabletype
19636 INTEGER(INTG),
INTENT(IN) :: fieldsettype
19637 INTEGER(INTG),
INTENT(IN) :: userdatapointnumber
19638 INTEGER(INTG),
INTENT(IN) :: componentnumber
19639 REAL(DP),
INTENT(OUT) ::
value 19640 INTEGER(INTG),
INTENT(OUT) :: err
19641 TYPE(varying_string),
INTENT(OUT) :: error
19643 INTEGER(INTG) :: decompositionlocaldatapointnumber,dofidx
19644 LOGICAL :: userdatapointexists,ghostdatapoint
19645 TYPE(decomposition_type),
POINTER :: decomposition
19646 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
19647 TYPE(field_parameter_set_type),
POINTER :: parameterset
19648 TYPE(field_variable_type),
POINTER :: fieldvariable
19649 TYPE(varying_string) :: localerror
19651 enters(
"Field_ParameterSetGetDataPointDP",err,error,*999)
19653 IF(
ASSOCIATED(field))
THEN 19654 IF(field%FIELD_FINISHED)
THEN 19655 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 19656 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
19657 IF(
ASSOCIATED(fieldvariable))
THEN 19658 IF(fieldvariable%DATA_TYPE==field_dp_type)
THEN 19659 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 19660 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
19661 IF(
ASSOCIATED(parameterset))
THEN 19662 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 19663 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
19664 CASE(field_constant_interpolation)
19665 localerror=
"Can not get by data point for component number "// &
19666 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19667 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19668 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 19669 CALL flagerror(localerror,err,error,*999)
19670 CASE(field_element_based_interpolation)
19671 localerror=
"Can not get by data point for component number "// &
19672 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19673 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19674 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 19675 CALL flagerror(localerror,err,error,*999)
19676 CASE(field_node_based_interpolation)
19677 localerror=
"Can not get by data point for component number "// &
19678 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19679 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19680 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 19681 CALL flagerror(localerror,err,error,*999)
19682 CASE(field_grid_point_based_interpolation)
19683 localerror=
"Can not get by data point for component number "// &
19684 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19685 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19686 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 19687 CALL flagerror(localerror,err,error,*999)
19688 CASE(field_gauss_point_based_interpolation)
19689 localerror=
"Can not get by data point for component number "// &
19690 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19691 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19692 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 19693 CALL flagerror(localerror,err,error,*999)
19694 CASE(field_data_point_based_interpolation)
19695 decomposition=>field%DECOMPOSITION
19696 IF(
ASSOCIATED(decomposition))
THEN 19697 decompositiontopology=>decomposition%TOPOLOGY
19698 IF(
ASSOCIATED(decompositiontopology))
THEN 19699 CALL decompositiontopology_datapointcheckexists(decompositiontopology,userdatapointnumber, &
19700 & userdatapointexists,decompositionlocaldatapointnumber,ghostdatapoint,err,error,*999)
19701 IF(userdatapointexists)
THEN 19702 dofidx=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
19703 & data_point_param2dof_map%DATA_POINTS(decompositionlocaldatapointnumber)
19704 CALL distributed_vector_values_get(parameterset%PARAMETERS,dofidx,
value,err,error,*999)
19706 localerror=
"The specified user data point number of "// &
19707 & trim(number_to_vstring(userdatapointnumber,
"*",err,error))// &
19708 &
" does not exist in the decomposition for field component number "// &
19709 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
19710 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19711 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19712 CALL flagerror(localerror,err,error,*999)
19715 CALL flagerror(
"Field decomposition topology is not associated.",err,error,*999)
19718 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
19721 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
19722 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
19723 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
19724 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19725 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19726 CALL flagerror(localerror,err,error,*999)
19729 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
19730 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19731 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
19732 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 19733 CALL flagerror(localerror,err,error,*999)
19736 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
19737 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
19738 CALL flagerror(localerror,err,error,*999)
19741 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
19742 &
" is invalid. The field parameter set type must be between 1 and "// &
19743 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
19744 CALL flagerror(localerror,err,error,*999)
19747 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
19748 &
" does not correspond to the double precision data type of the given value." 19749 CALL flagerror(localerror,err,error,*999)
19752 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19753 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19754 CALL flagerror(localerror,err,error,*999)
19757 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19758 &
" is invalid. The variable type must be between 1 and "// &
19759 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 19760 CALL flagerror(localerror,err,error,*999)
19763 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
19764 &
" has not been finished." 19765 CALL flagerror(localerror,err,error,*999)
19768 CALL flagerror(
"Field is not associated.",err,error,*999)
19771 exits(
"Field_ParameterSetGetDataPointDP")
19773 999 errorsexits(
"Field_ParameterSetGetDataPointDP",err,error)
19775 END SUBROUTINE field_parametersetgetdatapointdp
19782 SUBROUTINE field_parametersetgetdatapointl(field,variableType,fieldSetType,userDataPointNumber,componentNumber,value,err,error,*)
19785 TYPE(field_type),
POINTER :: field
19786 INTEGER(INTG),
INTENT(IN) :: variabletype
19787 INTEGER(INTG),
INTENT(IN) :: fieldsettype
19788 INTEGER(INTG),
INTENT(IN) :: userdatapointnumber
19789 INTEGER(INTG),
INTENT(IN) :: componentnumber
19790 LOGICAL,
INTENT(OUT) ::
value 19791 INTEGER(INTG),
INTENT(OUT) :: err
19792 TYPE(varying_string),
INTENT(OUT) :: error
19794 INTEGER(INTG) :: decompositionlocaldatapointnumber,dofidx
19795 LOGICAL :: userdatapointexists,ghostdatapoint
19796 TYPE(decomposition_type),
POINTER :: decomposition
19797 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
19798 TYPE(field_parameter_set_type),
POINTER :: parameterset
19799 TYPE(field_variable_type),
POINTER :: fieldvariable
19800 TYPE(varying_string) :: localerror
19802 enters(
"Field_ParameterSetGetDataPointL",err,error,*999)
19804 IF(
ASSOCIATED(field))
THEN 19805 IF(field%FIELD_FINISHED)
THEN 19806 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 19807 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
19808 IF(
ASSOCIATED(fieldvariable))
THEN 19809 IF(fieldvariable%DATA_TYPE==field_l_type)
THEN 19810 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 19811 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
19812 IF(
ASSOCIATED(parameterset))
THEN 19813 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 19814 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
19815 CASE(field_constant_interpolation)
19816 localerror=
"Can not get by data point for component number "// &
19817 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19818 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19819 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 19820 CALL flagerror(localerror,err,error,*999)
19821 CASE(field_element_based_interpolation)
19822 localerror=
"Can not get by data point for component number "// &
19823 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19824 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19825 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 19826 CALL flagerror(localerror,err,error,*999)
19827 CASE(field_node_based_interpolation)
19828 localerror=
"Can not get by data point for component number "// &
19829 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19830 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19831 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 19832 CALL flagerror(localerror,err,error,*999)
19833 CASE(field_grid_point_based_interpolation)
19834 localerror=
"Can not get by data point for component number "// &
19835 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19836 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19837 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 19838 CALL flagerror(localerror,err,error,*999)
19839 CASE(field_gauss_point_based_interpolation)
19840 localerror=
"Can not get by data point for component number "// &
19841 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
19842 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19843 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 19844 CALL flagerror(localerror,err,error,*999)
19845 CASE(field_data_point_based_interpolation)
19846 decomposition=>field%DECOMPOSITION
19847 IF(
ASSOCIATED(decomposition))
THEN 19848 decompositiontopology=>decomposition%TOPOLOGY
19849 IF(
ASSOCIATED(decompositiontopology))
THEN 19850 CALL decompositiontopology_datapointcheckexists(decompositiontopology,userdatapointnumber, &
19851 & userdatapointexists,decompositionlocaldatapointnumber,ghostdatapoint,err,error,*999)
19852 IF(userdatapointexists)
THEN 19853 dofidx=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
19854 & data_point_param2dof_map%DATA_POINTS(decompositionlocaldatapointnumber)
19855 CALL distributed_vector_values_get(parameterset%PARAMETERS,dofidx,
value,err,error,*999)
19857 localerror=
"The specified user data point number of "// &
19858 & trim(number_to_vstring(userdatapointnumber,
"*",err,error))// &
19859 &
" does not exist in the decomposition for field component number "// &
19860 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
19861 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
19862 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19863 CALL flagerror(localerror,err,error,*999)
19866 CALL flagerror(
"Field decomposition topology is not associated.",err,error,*999)
19869 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
19872 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
19873 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
19874 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
19875 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19876 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19877 CALL flagerror(localerror,err,error,*999)
19880 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
19881 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19882 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
19883 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 19884 CALL flagerror(localerror,err,error,*999)
19887 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
19888 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
19889 CALL flagerror(localerror,err,error,*999)
19892 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
19893 &
" is invalid. The field parameter set type must be between 1 and "// &
19894 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
19895 CALL flagerror(localerror,err,error,*999)
19898 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
19899 &
" does not correspond to the logical data type of the given value." 19900 CALL flagerror(localerror,err,error,*999)
19903 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19904 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19905 CALL flagerror(localerror,err,error,*999)
19908 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
19909 &
" is invalid. The variable type must be between 1 and "// &
19910 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 19911 CALL flagerror(localerror,err,error,*999)
19914 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
19915 &
" has not been finished." 19916 CALL flagerror(localerror,err,error,*999)
19919 CALL flagerror(
"Field is not associated.",err,error,*999)
19922 exits(
"Field_ParameterSetGetDataPointL")
19924 999 errorsexits(
"Field_ParameterSetGetDataPointL",err,error)
19926 END SUBROUTINE field_parametersetgetdatapointl
19933 SUBROUTINE field_parameter_set_get_element_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
19934 &
VALUE,err,error,*)
19937 TYPE(field_type),
POINTER :: field
19938 INTEGER(INTG),
INTENT(IN) :: variable_type
19939 INTEGER(INTG),
INTENT(IN) :: field_set_type
19940 INTEGER(INTG),
INTENT(IN) :: user_element_number
19941 INTEGER(INTG),
INTENT(IN) :: component_number
19942 INTEGER(INTG),
INTENT(OUT) ::
VALUE 19943 INTEGER(INTG),
INTENT(OUT) :: err
19944 TYPE(varying_string),
INTENT(OUT) :: error
19946 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
19947 LOGICAL :: ghost_element,user_element_exists
19948 TYPE(decomposition_type),
POINTER :: decomposition
19949 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
19950 TYPE(field_parameter_set_type),
POINTER :: parameter_set
19951 TYPE(field_variable_type),
POINTER :: field_variable
19952 TYPE(varying_string) :: local_error
19954 enters(
"FIELD_PARAMETER_SET_GET_ELEMENT_INTG",err,error,*999)
19956 IF(
ASSOCIATED(field))
THEN 19957 IF(field%FIELD_FINISHED)
THEN 19958 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 19959 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
19960 IF(
ASSOCIATED(field_variable))
THEN 19961 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 19962 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 19963 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
19964 IF(
ASSOCIATED(parameter_set))
THEN 19965 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 19966 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
19967 CASE(field_constant_interpolation)
19968 local_error=
"Can not get by element for component number "// &
19969 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19970 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19971 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 19972 CALL flagerror(local_error,err,error,*999)
19973 CASE(field_element_based_interpolation)
19974 decomposition=>field%DECOMPOSITION
19975 IF(
ASSOCIATED(decomposition))
THEN 19976 decomposition_topology=>decomposition%TOPOLOGY
19977 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
19978 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
19979 IF(user_element_exists)
THEN 19980 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
19981 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
19982 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
19984 local_error=
"The specified user element number of "// &
19985 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
19986 &
" does not exist in the decomposition for field component number "// &
19987 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
19988 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19989 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 19990 CALL flagerror(local_error,err,error,*999)
19993 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
19995 CASE(field_node_based_interpolation)
19996 local_error=
"Can not get by element for component number "// &
19997 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
19998 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
19999 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 20000 CALL flagerror(local_error,err,error,*999)
20001 CASE(field_grid_point_based_interpolation)
20002 local_error=
"Can not get by element for component number "// &
20003 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20004 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20005 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 20006 CALL flagerror(local_error,err,error,*999)
20007 CASE(field_gauss_point_based_interpolation)
20008 local_error=
"Can not get by element for component number "// &
20009 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20010 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20011 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 20012 CALL flagerror(local_error,err,error,*999)
20013 CASE(field_data_point_based_interpolation)
20014 local_error=
"Can not add element for component number "// &
20015 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20016 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20017 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 20018 CALL flagerror(local_error,err,error,*999)
20020 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
20021 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
20022 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20023 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20024 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20025 CALL flagerror(local_error,err,error,*999)
20028 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20029 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20030 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
20031 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 20032 CALL flagerror(local_error,err,error,*999)
20035 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20036 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
20037 CALL flagerror(local_error,err,error,*999)
20040 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20041 &
" is invalid. The field parameter set type must be between 1 and "// &
20042 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
20043 CALL flagerror(local_error,err,error,*999)
20046 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
20047 &
" does not correspond to the integer data type of the given value." 20048 CALL flagerror(local_error,err,error,*999)
20051 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20052 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20053 CALL flagerror(local_error,err,error,*999)
20056 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20057 &
" is invalid. The variable type must be between 1 and "// &
20058 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 20059 CALL flagerror(local_error,err,error,*999)
20062 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
20063 &
" has not been finished." 20064 CALL flagerror(local_error,err,error,*999)
20067 CALL flagerror(
"Field is not associated.",err,error,*999)
20070 exits(
"FIELD_PARAMETER_SET_GET_ELEMENT_INTG")
20072 999 errorsexits(
"FIELD_PARAMETER_SET_GET_ELEMENT_INTG",err,error)
20074 END SUBROUTINE field_parameter_set_get_element_intg
20082 SUBROUTINE field_parameter_set_get_element_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
20083 &
VALUE,err,error,*)
20087 TYPE(field_type),
POINTER :: field
20088 INTEGER(INTG),
INTENT(IN) :: variable_type
20089 INTEGER(INTG),
INTENT(IN) :: field_set_type
20090 INTEGER(INTG),
INTENT(IN) :: user_element_number
20091 INTEGER(INTG),
INTENT(IN) :: component_number
20092 REAL(SP),
INTENT(OUT) ::
VALUE 20093 INTEGER(INTG),
INTENT(OUT) :: err
20094 TYPE(varying_string),
INTENT(OUT) :: error
20096 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
20097 LOGICAL :: ghost_element,user_element_exists
20098 TYPE(decomposition_type),
POINTER :: decomposition
20099 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
20100 TYPE(field_parameter_set_type),
POINTER :: parameter_set
20101 TYPE(field_variable_type),
POINTER :: field_variable
20102 TYPE(varying_string) :: local_error
20104 enters(
"FIELD_PARAMETER_SET_GET_ELEMENT_SP",err,error,*999)
20106 IF(
ASSOCIATED(field))
THEN 20107 IF(field%FIELD_FINISHED)
THEN 20108 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 20109 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
20110 IF(
ASSOCIATED(field_variable))
THEN 20111 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 20112 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 20113 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
20114 IF(
ASSOCIATED(parameter_set))
THEN 20115 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 20116 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
20117 CASE(field_constant_interpolation)
20118 local_error=
"Can not get by element for component number "// &
20119 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20120 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20121 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 20122 CALL flagerror(local_error,err,error,*999)
20123 CASE(field_element_based_interpolation)
20124 decomposition=>field%DECOMPOSITION
20125 IF(
ASSOCIATED(decomposition))
THEN 20126 decomposition_topology=>decomposition%TOPOLOGY
20127 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
20128 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
20129 IF(user_element_exists)
THEN 20130 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
20131 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
20132 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
20134 local_error=
"The specified user element number of "// &
20135 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
20136 &
" does not exist in the decomposition for field component number "// &
20137 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
20138 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20139 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20140 CALL flagerror(local_error,err,error,*999)
20143 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
20145 CASE(field_node_based_interpolation)
20146 local_error=
"Can not get by element for component number "// &
20147 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20148 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20149 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 20150 CALL flagerror(local_error,err,error,*999)
20151 CASE(field_grid_point_based_interpolation)
20152 local_error=
"Can not get by element for component number "// &
20153 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20154 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20155 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 20156 CALL flagerror(local_error,err,error,*999)
20157 CASE(field_gauss_point_based_interpolation)
20158 local_error=
"Can not get by element for component number "// &
20159 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20160 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20161 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 20162 CALL flagerror(local_error,err,error,*999)
20163 CASE(field_data_point_based_interpolation)
20164 local_error=
"Can not add element for component number "// &
20165 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20166 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20167 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 20168 CALL flagerror(local_error,err,error,*999)
20170 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
20171 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
20172 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20173 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20174 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20175 CALL flagerror(local_error,err,error,*999)
20178 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20179 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20180 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
20181 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 20182 CALL flagerror(local_error,err,error,*999)
20185 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20186 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
20187 CALL flagerror(local_error,err,error,*999)
20190 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20191 &
" is invalid. The field parameter set type must be between 1 and "// &
20192 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
20193 CALL flagerror(local_error,err,error,*999)
20196 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
20197 &
" does not correspond to the single precision data type of the given value." 20198 CALL flagerror(local_error,err,error,*999)
20201 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20202 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20203 CALL flagerror(local_error,err,error,*999)
20206 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20207 &
" is invalid. The variable type must be between 1 and "// &
20208 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 20209 CALL flagerror(local_error,err,error,*999)
20212 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
20213 &
" has not been finished." 20214 CALL flagerror(local_error,err,error,*999)
20217 CALL flagerror(
"Field is not associated.",err,error,*999)
20220 exits(
"FIELD_PARAMETER_SET_GET_ELEMENT_SP")
20222 999 errorsexits(
"FIELD_PARAMETER_SET_GET_ELEMENT_SP",err,error)
20224 END SUBROUTINE field_parameter_set_get_element_sp
20231 SUBROUTINE field_parameter_set_get_element_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
20232 &
VALUE,err,error,*)
20235 TYPE(field_type),
POINTER :: field
20236 INTEGER(INTG),
INTENT(IN) :: variable_type
20237 INTEGER(INTG),
INTENT(IN) :: field_set_type
20238 INTEGER(INTG),
INTENT(IN) :: user_element_number
20239 INTEGER(INTG),
INTENT(IN) :: component_number
20240 REAL(DP),
INTENT(OUT) ::
VALUE 20241 INTEGER(INTG),
INTENT(OUT) :: err
20242 TYPE(varying_string),
INTENT(OUT) :: error
20244 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
20245 LOGICAL :: ghost_element,user_element_exists
20246 TYPE(decomposition_type),
POINTER :: decomposition
20247 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
20248 TYPE(field_parameter_set_type),
POINTER :: parameter_set
20249 TYPE(field_variable_type),
POINTER :: field_variable
20250 TYPE(varying_string) :: local_error
20252 enters(
"FIELD_PARAMETER_SET_GET_ELEMENT_DP",err,error,*999)
20254 IF(
ASSOCIATED(field))
THEN 20255 IF(field%FIELD_FINISHED)
THEN 20256 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 20257 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
20258 IF(
ASSOCIATED(field_variable))
THEN 20259 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 20260 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 20261 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
20262 IF(
ASSOCIATED(parameter_set))
THEN 20263 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 20264 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
20265 CASE(field_constant_interpolation)
20266 local_error=
"Can not get by element for component number "// &
20267 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20268 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20269 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 20270 CALL flagerror(local_error,err,error,*999)
20271 CASE(field_element_based_interpolation)
20272 decomposition=>field%DECOMPOSITION
20273 IF(
ASSOCIATED(decomposition))
THEN 20274 decomposition_topology=>decomposition%TOPOLOGY
20275 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
20276 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
20277 IF(user_element_exists)
THEN 20278 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
20279 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
20280 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
20282 local_error=
"The specified user element number of "// &
20283 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
20284 &
" does not exist in the decomposition for field component number "// &
20285 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
20286 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20287 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20288 CALL flagerror(local_error,err,error,*999)
20291 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
20293 CASE(field_node_based_interpolation)
20294 local_error=
"Can not get by element for component number "// &
20295 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20296 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20297 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 20298 CALL flagerror(local_error,err,error,*999)
20299 CASE(field_grid_point_based_interpolation)
20300 local_error=
"Can not get by element for component number "// &
20301 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20302 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20303 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 20304 CALL flagerror(local_error,err,error,*999)
20305 CASE(field_gauss_point_based_interpolation)
20306 local_error=
"Can not get by element for component number "// &
20307 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20308 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20309 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 20310 CALL flagerror(local_error,err,error,*999)
20311 CASE(field_data_point_based_interpolation)
20312 local_error=
"Can not add element for component number "// &
20313 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20314 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20315 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 20316 CALL flagerror(local_error,err,error,*999)
20318 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
20319 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
20320 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20321 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20322 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20323 CALL flagerror(local_error,err,error,*999)
20326 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20327 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20328 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
20329 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 20330 CALL flagerror(local_error,err,error,*999)
20333 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20334 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
20335 CALL flagerror(local_error,err,error,*999)
20338 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20339 &
" is invalid. The field parameter set type must be between 1 and "// &
20340 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
20341 CALL flagerror(local_error,err,error,*999)
20344 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
20345 &
" does not correspond to the double precision data type of the given value." 20346 CALL flagerror(local_error,err,error,*999)
20349 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20350 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20351 CALL flagerror(local_error,err,error,*999)
20354 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20355 &
" is invalid. The variable type must be between 1 and "// &
20356 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 20357 CALL flagerror(local_error,err,error,*999)
20360 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
20361 &
" has not been finished." 20362 CALL flagerror(local_error,err,error,*999)
20365 CALL flagerror(
"Field is not associated.",err,error,*999)
20368 exits(
"FIELD_PARAMETER_SET_GET_ELEMENT_DP")
20370 999 errorsexits(
"FIELD_PARAMETER_SET_GET_ELEMENT_DP",err,error)
20372 END SUBROUTINE field_parameter_set_get_element_dp
20379 SUBROUTINE field_parameter_set_get_element_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
20380 &
VALUE,err,error,*)
20383 TYPE(field_type),
POINTER :: field
20384 INTEGER(INTG),
INTENT(IN) :: variable_type
20385 INTEGER(INTG),
INTENT(IN) :: field_set_type
20386 INTEGER(INTG),
INTENT(IN) :: user_element_number
20387 INTEGER(INTG),
INTENT(IN) :: component_number
20388 LOGICAL,
INTENT(OUT) ::
VALUE 20389 INTEGER(INTG),
INTENT(OUT) :: err
20390 TYPE(varying_string),
INTENT(OUT) :: error
20392 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
20393 LOGICAL :: ghost_element,user_element_exists
20394 TYPE(decomposition_type),
POINTER :: decomposition
20395 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
20396 TYPE(field_parameter_set_type),
POINTER :: parameter_set
20397 TYPE(field_variable_type),
POINTER :: field_variable
20398 TYPE(varying_string) :: local_error
20400 enters(
"FIELD_PARAMETER_SET_GET_ELEMENT_L",err,error,*999)
20402 IF(
ASSOCIATED(field))
THEN 20403 IF(field%FIELD_FINISHED)
THEN 20404 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 20405 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
20406 IF(
ASSOCIATED(field_variable))
THEN 20407 IF(field_variable%DATA_TYPE==field_l_type)
THEN 20408 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 20409 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
20410 IF(
ASSOCIATED(parameter_set))
THEN 20411 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 20412 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
20413 CASE(field_constant_interpolation)
20414 local_error=
"Can not get by element for component number "// &
20415 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20416 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20417 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 20418 CALL flagerror(local_error,err,error,*999)
20419 CASE(field_element_based_interpolation)
20420 decomposition=>field%DECOMPOSITION
20421 IF(
ASSOCIATED(decomposition))
THEN 20422 decomposition_topology=>decomposition%TOPOLOGY
20423 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
20424 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
20425 IF(user_element_exists)
THEN 20426 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
20427 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
20428 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
20430 local_error=
"The specified user element number of "// &
20431 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
20432 &
" does not exist in the decomposition for field component number "// &
20433 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
20434 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20435 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20436 CALL flagerror(local_error,err,error,*999)
20439 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
20441 CASE(field_node_based_interpolation)
20442 local_error=
"Can not get by element for component number "// &
20443 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20444 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20445 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 20446 CALL flagerror(local_error,err,error,*999)
20447 CASE(field_grid_point_based_interpolation)
20448 local_error=
"Can not get by element for component number "// &
20449 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20450 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20451 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 20452 CALL flagerror(local_error,err,error,*999)
20453 CASE(field_gauss_point_based_interpolation)
20454 local_error=
"Can not get by element for component number "// &
20455 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20456 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20457 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 20458 CALL flagerror(local_error,err,error,*999)
20459 CASE(field_data_point_based_interpolation)
20460 local_error=
"Can not add element for component number "// &
20461 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20462 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20463 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 20464 CALL flagerror(local_error,err,error,*999)
20466 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
20467 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
20468 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20469 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20470 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20471 CALL flagerror(local_error,err,error,*999)
20474 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20475 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20476 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
20477 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 20478 CALL flagerror(local_error,err,error,*999)
20481 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20482 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
20483 CALL flagerror(local_error,err,error,*999)
20486 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20487 &
" is invalid. The field parameter set type must be between 1 and "// &
20488 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
20489 CALL flagerror(local_error,err,error,*999)
20492 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
20493 &
" does not correspond to the logical data type of the given value." 20494 CALL flagerror(local_error,err,error,*999)
20497 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20498 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20499 CALL flagerror(local_error,err,error,*999)
20502 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20503 &
" is invalid. The variable type must be between 1 and "// &
20504 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 20505 CALL flagerror(local_error,err,error,*999)
20508 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
20509 &
" has not been finished." 20510 CALL flagerror(local_error,err,error,*999)
20513 CALL flagerror(
"Field is not associated.",err,error,*999)
20516 exits(
"FIELD_PARAMETER_SET_GET_ELEMENT_L")
20518 999 errorsexits(
"FIELD_PARAMETER_SET_GET_ELEMENT_L",err,error)
20520 END SUBROUTINE field_parameter_set_get_element_l
20527 SUBROUTINE field_parameter_set_get_local_dof_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
20530 TYPE(field_type),
POINTER :: field
20531 INTEGER(INTG),
INTENT(IN) :: variable_type
20532 INTEGER(INTG),
INTENT(IN) :: field_set_type
20533 INTEGER(INTG),
INTENT(IN) :: dof_number
20534 INTEGER(INTG),
INTENT(OUT) ::
VALUE 20535 INTEGER(INTG),
INTENT(OUT) :: err
20536 TYPE(varying_string),
INTENT(OUT) :: error
20538 TYPE(field_parameter_set_type),
POINTER :: parameter_set
20539 TYPE(field_variable_type),
POINTER :: field_variable
20540 TYPE(varying_string) :: local_error
20542 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_INTG",err,error,*999)
20545 IF(
ASSOCIATED(field))
THEN 20546 IF(field%FIELD_FINISHED)
THEN 20547 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 20548 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
20549 IF(
ASSOCIATED(field_variable))
THEN 20550 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 20551 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 20552 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
20553 IF(
ASSOCIATED(parameter_set))
THEN 20554 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL)
THEN 20555 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
20557 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
20558 &
" is invalid. It must be >0 and <="// &
20559 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL,
"*",err,error))// &
20560 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20561 CALL flagerror(local_error,err,error,*999)
20564 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20565 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20566 CALL flagerror(local_error,err,error,*999)
20569 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20570 &
" is invalid. The field parameter set type must be between 1 and "// &
20571 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 20572 CALL flagerror(local_error,err,error,*999)
20575 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
20576 &
" does not correspond to the integer data type of the given value." 20577 CALL flagerror(local_error,err,error,*999)
20580 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20581 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20582 CALL flagerror(local_error,err,error,*999)
20585 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20586 &
" is invalid. The variable type must be between 1 and "// &
20587 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 20588 CALL flagerror(local_error,err,error,*999)
20591 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
20592 &
" has not been finished." 20593 CALL flagerror(local_error,err,error,*999)
20596 CALL flagerror(
"Field is not associated.",err,error,*999)
20599 exits(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_INTG")
20601 999 errorsexits(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_INTG",err,error)
20603 END SUBROUTINE field_parameter_set_get_local_dof_intg
20610 SUBROUTINE field_parameter_set_get_local_dof_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
20613 TYPE(field_type),
POINTER :: field
20614 INTEGER(INTG),
INTENT(IN) :: variable_type
20615 INTEGER(INTG),
INTENT(IN) :: field_set_type
20616 INTEGER(INTG),
INTENT(IN) :: dof_number
20617 REAL(SP),
INTENT(OUT) ::
VALUE 20618 INTEGER(INTG),
INTENT(OUT) :: err
20619 TYPE(varying_string),
INTENT(OUT) :: error
20621 TYPE(field_parameter_set_type),
POINTER :: parameter_set
20622 TYPE(field_variable_type),
POINTER :: field_variable
20623 TYPE(varying_string) :: local_error
20625 enters(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_SP",err,error,*999)
20628 IF(
ASSOCIATED(field))
THEN 20629 IF(field%FIELD_FINISHED)
THEN 20630 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 20631 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
20632 IF(
ASSOCIATED(field_variable))
THEN 20633 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 20634 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 20635 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
20636 IF(
ASSOCIATED(parameter_set))
THEN 20637 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL)
THEN 20638 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
20640 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
20641 &
" is invalid. It must be >0 and <="// &
20642 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL,
"*",err,error))// &
20643 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20644 CALL flagerror(local_error,err,error,*999)
20647 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20648 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20649 CALL flagerror(local_error,err,error,*999)
20652 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20653 &
" is invalid. The field parameter set type must be between 1 and "// &
20654 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 20655 CALL flagerror(local_error,err,error,*999)
20658 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
20659 &
" does not correspond to the single precision data type of the given value." 20660 CALL flagerror(local_error,err,error,*999)
20663 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20664 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20665 CALL flagerror(local_error,err,error,*999)
20668 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20669 &
" is invalid. The variable type must be between 1 and "// &
20670 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 20671 CALL flagerror(local_error,err,error,*999)
20674 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
20675 &
" has not been finished." 20676 CALL flagerror(local_error,err,error,*999)
20679 CALL flagerror(
"Field is not associated.",err,error,*999)
20682 exits(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_SP")
20684 999 errorsexits(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_SP",err,error)
20686 END SUBROUTINE field_parameter_set_get_local_dof_sp
20693 SUBROUTINE field_parameter_set_get_local_dof_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
20696 TYPE(field_type),
POINTER :: field
20697 INTEGER(INTG),
INTENT(IN) :: variable_type
20698 INTEGER(INTG),
INTENT(IN) :: field_set_type
20699 INTEGER(INTG),
INTENT(IN) :: dof_number
20700 REAL(DP),
INTENT(OUT) ::
VALUE 20701 INTEGER(INTG),
INTENT(OUT) :: err
20702 TYPE(varying_string),
INTENT(OUT) :: error
20704 TYPE(field_parameter_set_type),
POINTER :: parameter_set
20705 TYPE(field_variable_type),
POINTER :: field_variable
20706 TYPE(varying_string) :: local_error
20708 enters(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_DP",err,error,*999)
20711 IF(
ASSOCIATED(field))
THEN 20712 IF(field%FIELD_FINISHED)
THEN 20713 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 20714 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
20715 IF(
ASSOCIATED(field_variable))
THEN 20716 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 20717 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 20718 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
20719 IF(
ASSOCIATED(parameter_set))
THEN 20720 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL)
THEN 20721 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
20723 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
20724 &
" is invalid. It must be >0 and <="// &
20725 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL,
"*",err,error))// &
20726 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20727 CALL flagerror(local_error,err,error,*999)
20730 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20731 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20732 CALL flagerror(local_error,err,error,*999)
20735 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20736 &
" is invalid. The field parameter set type must be between 1 and "// &
20737 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 20738 CALL flagerror(local_error,err,error,*999)
20741 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
20742 &
" does not correspond to the double precision data type of the given value." 20743 CALL flagerror(local_error,err,error,*999)
20746 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20747 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20748 CALL flagerror(local_error,err,error,*999)
20751 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20752 &
" is invalid. The variable type must be between 1 and "// &
20753 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 20754 CALL flagerror(local_error,err,error,*999)
20757 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
20758 &
" has not been finished." 20759 CALL flagerror(local_error,err,error,*999)
20762 CALL flagerror(
"Field is not associated.",err,error,*999)
20765 exits(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_DP")
20767 999 errorsexits(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_DP",err,error)
20769 END SUBROUTINE field_parameter_set_get_local_dof_dp
20776 SUBROUTINE field_parameter_set_get_local_dof_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
20779 TYPE(field_type),
POINTER :: field
20780 INTEGER(INTG),
INTENT(IN) :: variable_type
20781 INTEGER(INTG),
INTENT(IN) :: field_set_type
20782 INTEGER(INTG),
INTENT(IN) :: dof_number
20783 LOGICAL,
INTENT(OUT) ::
VALUE 20784 INTEGER(INTG),
INTENT(OUT) :: err
20785 TYPE(varying_string),
INTENT(OUT) :: error
20787 TYPE(field_parameter_set_type),
POINTER :: parameter_set
20788 TYPE(field_variable_type),
POINTER :: field_variable
20789 TYPE(varying_string) :: local_error
20791 enters(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_L",err,error,*999)
20794 IF(
ASSOCIATED(field))
THEN 20795 IF(field%FIELD_FINISHED)
THEN 20796 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 20797 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
20798 IF(
ASSOCIATED(field_variable))
THEN 20799 IF(field_variable%DATA_TYPE==field_l_type)
THEN 20800 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 20801 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
20802 IF(
ASSOCIATED(parameter_set))
THEN 20803 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL)
THEN 20804 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
20806 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
20807 &
" is invalid. It must be >0 and <="// &
20808 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%TOTAL_NUMBER_OF_LOCAL,
"*",err,error))// &
20809 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20810 CALL flagerror(local_error,err,error,*999)
20813 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20814 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20815 CALL flagerror(local_error,err,error,*999)
20818 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
20819 &
" is invalid. The field parameter set type must be between 1 and "// &
20820 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 20821 CALL flagerror(local_error,err,error,*999)
20824 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
20825 &
" does not correspond to the logical data type of the given value." 20826 CALL flagerror(local_error,err,error,*999)
20829 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20830 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20831 CALL flagerror(local_error,err,error,*999)
20834 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20835 &
" is invalid. The variable type must be between 1 and "// &
20836 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 20837 CALL flagerror(local_error,err,error,*999)
20840 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
20841 &
" has not been finished." 20842 CALL flagerror(local_error,err,error,*999)
20845 CALL flagerror(
"Field is not associated.",err,error,*999)
20848 exits(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_L")
20850 999 errorsexits(
"FIELD_PARAMETER_SET_GET_LOCAL_DOF_L",err,error)
20852 END SUBROUTINE field_parameter_set_get_local_dof_l
20859 SUBROUTINE field_parameter_set_get_node_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
20860 & user_node_number,component_number,
VALUE,err,error,*)
20863 TYPE(field_type),
POINTER :: field
20864 INTEGER(INTG),
INTENT(IN) :: variable_type
20865 INTEGER(INTG),
INTENT(IN) :: field_set_type
20866 INTEGER(INTG),
INTENT(IN) :: version_number
20867 INTEGER(INTG),
INTENT(IN) :: derivative_number
20868 INTEGER(INTG),
INTENT(IN) :: user_node_number
20869 INTEGER(INTG),
INTENT(IN) :: component_number
20870 INTEGER(INTG),
INTENT(OUT) ::
VALUE 20871 INTEGER(INTG),
INTENT(OUT) :: err
20872 TYPE(varying_string),
INTENT(OUT) :: error
20874 INTEGER(INTG) :: domain_local_node_number,dof_idx
20875 LOGICAL :: ghost_node,user_node_exists
20876 TYPE(domain_type),
POINTER :: domain
20877 TYPE(domain_nodes_type),
POINTER :: domain_nodes
20878 TYPE(domain_topology_type),
POINTER :: domain_topology
20879 TYPE(field_parameter_set_type),
POINTER :: parameter_set
20880 TYPE(field_variable_type),
POINTER :: field_variable
20881 TYPE(varying_string) :: local_error
20883 enters(
"FIELD_PARAMETER_SET_GET_NODE_INTG",err,error,*999)
20885 IF(
ASSOCIATED(field))
THEN 20886 IF(field%FIELD_FINISHED)
THEN 20887 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 20888 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
20889 IF(
ASSOCIATED(field_variable))
THEN 20890 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 20891 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 20892 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
20893 IF(
ASSOCIATED(parameter_set))
THEN 20894 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 20895 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
20896 CASE(field_constant_interpolation)
20897 local_error=
"Can not get by node for component number "// &
20898 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20899 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20900 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 20901 CALL flagerror(local_error,err,error,*999)
20902 CASE(field_element_based_interpolation)
20903 local_error=
"Can not get by node for component number "// &
20904 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20905 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20906 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 20907 CALL flagerror(local_error,err,error,*999)
20908 CASE(field_node_based_interpolation)
20909 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
20910 IF(
ASSOCIATED(domain))
THEN 20911 domain_topology=>domain%TOPOLOGY
20912 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
20913 & domain_local_node_number,ghost_node,err,error,*999)
20914 IF(user_node_exists)
THEN 20915 domain_nodes=>domain_topology%NODES
20916 IF(
ASSOCIATED(domain_nodes))
THEN 20917 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
20918 & number_of_derivatives)
THEN 20919 IF(version_number>0.AND.version_number<= &
20920 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
20921 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
20922 & number_of_versions)
THEN 20923 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
20924 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
20925 & versions(version_number)
20926 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
20928 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
20929 &
" is invalid for derivative number "// &
20930 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
20931 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
20932 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20933 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20934 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
20935 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
20936 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
20937 &
"(note version numbers are indexed directly from the value the user specifies during "// &
20938 &
"element creation and no record is kept of the total number of versions the user sets."// &
20939 &
"The maximum version number the user sets defines the total number of versions allocated)." 20940 CALL flagerror(local_error,err,error,*999)
20943 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
20944 &
" is invalid for user node number "// &
20945 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
20946 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20947 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20948 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
20949 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
20950 & number_of_derivatives,
"*",err,error))//
" derivatives." 20951 CALL flagerror(local_error,err,error,*999)
20955 local_error=
"The specified user node number of "// &
20956 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
20957 &
" does not exist in the domain for field component number "// &
20958 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
20959 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20960 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20961 CALL flagerror(local_error,err,error,*999)
20964 CALL flagerror(
"Domain is not associated.",err,error,*999)
20966 CASE(field_grid_point_based_interpolation)
20967 local_error=
"Can not get by node for component number "// &
20968 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20969 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20970 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 20971 CALL flagerror(local_error,err,error,*999)
20972 CASE(field_gauss_point_based_interpolation)
20973 local_error=
"Can not get by node for component number "// &
20974 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20975 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20976 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 20977 CALL flagerror(local_error,err,error,*999)
20978 CASE(field_data_point_based_interpolation)
20979 local_error=
"Can not add element for component number "// &
20980 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
20981 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
20982 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 20983 CALL flagerror(local_error,err,error,*999)
20985 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
20986 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
20987 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20988 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20989 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 20990 CALL flagerror(local_error,err,error,*999)
20993 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
20994 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
20995 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
20996 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
20998 CALL flagerror(local_error,err,error,*999)
21001 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
21002 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21003 CALL flagerror(local_error,err,error,*999)
21006 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
21007 &
" is invalid. The field parameter set type must be between 1 and "// &
21008 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 21009 CALL flagerror(local_error,err,error,*999)
21012 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
21013 &
" does not correspond to the integer data type of the given value." 21014 CALL flagerror(local_error,err,error,*999)
21017 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21018 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21019 CALL flagerror(local_error,err,error,*999)
21022 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21023 &
" is invalid. The variable type must be between 1 and "// &
21024 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 21025 CALL flagerror(local_error,err,error,*999)
21028 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
21029 &
" has not been finished." 21030 CALL flagerror(local_error,err,error,*999)
21033 CALL flagerror(
"Field is not associated.",err,error,*999)
21036 exits(
"FIELD_PARAMETER_SET_GET_NODE_INTG")
21038 999 errorsexits(
"FIELD_PARAMETER_SET_GET_NODE_INTG",err,error)
21040 END SUBROUTINE field_parameter_set_get_node_intg
21047 SUBROUTINE field_parameter_set_get_node_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
21048 & user_node_number,component_number,
VALUE,err,error,*)
21051 TYPE(field_type),
POINTER :: field
21052 INTEGER(INTG),
INTENT(IN) :: variable_type
21053 INTEGER(INTG),
INTENT(IN) :: field_set_type
21054 INTEGER(INTG),
INTENT(IN) :: version_number
21055 INTEGER(INTG),
INTENT(IN) :: derivative_number
21056 INTEGER(INTG),
INTENT(IN) :: user_node_number
21057 INTEGER(INTG),
INTENT(IN) :: component_number
21058 REAL(SP),
INTENT(OUT) ::
VALUE 21059 INTEGER(INTG),
INTENT(OUT) :: err
21060 TYPE(varying_string),
INTENT(OUT) :: error
21062 INTEGER(INTG) :: domain_local_node_number,dof_idx
21063 LOGICAL :: ghost_node,user_node_exists
21064 TYPE(domain_type),
POINTER :: domain
21065 TYPE(domain_nodes_type),
POINTER :: domain_nodes
21066 TYPE(domain_topology_type),
POINTER :: domain_topology
21067 TYPE(field_parameter_set_type),
POINTER :: parameter_set
21068 TYPE(field_variable_type),
POINTER :: field_variable
21069 TYPE(varying_string) :: local_error
21071 enters(
"FIELD_PARAMETER_SET_GET_NODE_SP",err,error,*999)
21073 IF(
ASSOCIATED(field))
THEN 21074 IF(field%FIELD_FINISHED)
THEN 21075 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 21076 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
21077 IF(
ASSOCIATED(field_variable))
THEN 21078 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 21079 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 21080 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
21081 IF(
ASSOCIATED(parameter_set))
THEN 21082 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 21083 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
21084 CASE(field_constant_interpolation)
21085 local_error=
"Can not get by node for component number "// &
21086 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21087 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21088 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 21089 CALL flagerror(local_error,err,error,*999)
21090 CASE(field_element_based_interpolation)
21091 local_error=
"Can not get by node for component number "// &
21092 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21093 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21094 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 21095 CALL flagerror(local_error,err,error,*999)
21096 CASE(field_node_based_interpolation)
21097 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
21098 IF(
ASSOCIATED(domain))
THEN 21099 domain_topology=>domain%TOPOLOGY
21100 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
21101 & domain_local_node_number,ghost_node,err,error,*999)
21102 IF(user_node_exists)
THEN 21103 domain_nodes=>domain_topology%NODES
21104 IF(
ASSOCIATED(domain_nodes))
THEN 21105 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
21106 & number_of_derivatives)
THEN 21107 IF(version_number>0.AND.version_number<= &
21108 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
21109 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
21110 & number_of_versions)
THEN 21111 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
21112 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
21113 & versions(version_number)
21114 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
21116 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
21117 &
" is invalid for derivative number "// &
21118 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
21119 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
21120 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21121 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21122 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
21123 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
21124 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
21125 &
"(note version numbers are indexed directly from the value the user specifies during "// &
21126 &
"element creation and no record is kept of the total number of versions the user sets."// &
21127 &
"The maximum version number the user sets defines the total number of versions allocated)." 21128 CALL flagerror(local_error,err,error,*999)
21131 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
21132 &
" is invalid for user node number "// &
21133 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
21134 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21135 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21136 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21137 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
21138 & number_of_derivatives,
"*",err,error))//
" derivatives." 21139 CALL flagerror(local_error,err,error,*999)
21143 local_error=
"The specified user node number of "// &
21144 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
21145 &
" does not exist in the domain for field component number "// &
21146 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
21147 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21148 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21149 CALL flagerror(local_error,err,error,*999)
21152 CALL flagerror(
"Domain is not associated.",err,error,*999)
21154 CASE(field_grid_point_based_interpolation)
21155 local_error=
"Can not get by node for component number "// &
21156 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21157 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21158 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 21159 CALL flagerror(local_error,err,error,*999)
21160 CASE(field_gauss_point_based_interpolation)
21161 local_error=
"Can not get by node for component number "// &
21162 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21163 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21164 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 21165 CALL flagerror(local_error,err,error,*999)
21166 CASE(field_data_point_based_interpolation)
21167 local_error=
"Can not add element for component number "// &
21168 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21169 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21170 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 21171 CALL flagerror(local_error,err,error,*999)
21173 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
21174 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
21175 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
21176 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21177 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21178 CALL flagerror(local_error,err,error,*999)
21181 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
21182 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21183 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21184 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
21186 CALL flagerror(local_error,err,error,*999)
21189 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
21190 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21191 CALL flagerror(local_error,err,error,*999)
21194 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
21195 &
" is invalid. The field parameter set type must be between 1 and "// &
21196 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 21197 CALL flagerror(local_error,err,error,*999)
21200 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
21201 &
" does not correspond to the single precision data type of the given value." 21202 CALL flagerror(local_error,err,error,*999)
21205 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21206 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21207 CALL flagerror(local_error,err,error,*999)
21210 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21211 &
" is invalid. The variable type must be between 1 and "// &
21212 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 21213 CALL flagerror(local_error,err,error,*999)
21216 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
21217 &
" has not been finished." 21218 CALL flagerror(local_error,err,error,*999)
21221 CALL flagerror(
"Field is not associated.",err,error,*999)
21224 exits(
"FIELD_PARAMETER_SET_GET_NODE_SP")
21226 999 errorsexits(
"FIELD_PARAMETER_SET_GET_NODE_SP",err,error)
21228 END SUBROUTINE field_parameter_set_get_node_sp
21235 SUBROUTINE field_parameter_set_get_node_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
21236 & user_node_number,component_number,
VALUE,err,error,*)
21239 TYPE(field_type),
POINTER :: field
21240 INTEGER(INTG),
INTENT(IN) :: variable_type
21241 INTEGER(INTG),
INTENT(IN) :: field_set_type
21242 INTEGER(INTG),
INTENT(IN) :: version_number
21243 INTEGER(INTG),
INTENT(IN) :: derivative_number
21244 INTEGER(INTG),
INTENT(IN) :: user_node_number
21245 INTEGER(INTG),
INTENT(IN) :: component_number
21246 REAL(DP),
INTENT(OUT) ::
VALUE 21247 INTEGER(INTG),
INTENT(OUT) :: err
21248 TYPE(varying_string),
INTENT(OUT) :: error
21250 INTEGER(INTG) :: domain_local_node_number,dof_idx
21251 LOGICAL :: ghost_node,user_node_exists
21252 TYPE(domain_type),
POINTER :: domain
21253 TYPE(domain_nodes_type),
POINTER :: domain_nodes
21254 TYPE(domain_topology_type),
POINTER :: domain_topology
21255 TYPE(field_parameter_set_type),
POINTER :: parameter_set
21256 TYPE(field_variable_type),
POINTER :: field_variable
21257 TYPE(varying_string) :: local_error
21259 enters(
"FIELD_PARAMETER_SET_GET_NODE_DP",err,error,*999)
21261 IF(
ASSOCIATED(field))
THEN 21262 IF(field%FIELD_FINISHED)
THEN 21263 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 21264 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
21265 IF(
ASSOCIATED(field_variable))
THEN 21266 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 21267 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 21268 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
21269 IF(
ASSOCIATED(parameter_set))
THEN 21270 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 21271 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
21272 CASE(field_constant_interpolation)
21273 local_error=
"Can not get by node for component number "// &
21274 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21275 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21276 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 21277 CALL flagerror(local_error,err,error,*999)
21278 CASE(field_element_based_interpolation)
21279 local_error=
"Can not get by node for component number "// &
21280 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21281 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21282 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 21283 CALL flagerror(local_error,err,error,*999)
21284 CASE(field_node_based_interpolation)
21285 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
21286 IF(
ASSOCIATED(domain))
THEN 21287 domain_topology=>domain%TOPOLOGY
21288 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
21289 & domain_local_node_number,ghost_node,err,error,*999)
21290 IF(user_node_exists)
THEN 21291 domain_nodes=>domain_topology%NODES
21292 IF(
ASSOCIATED(domain_nodes))
THEN 21293 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
21294 & number_of_derivatives)
THEN 21295 IF(version_number>0.AND.version_number<= &
21296 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
21297 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
21298 & number_of_versions)
THEN 21299 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
21300 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
21301 & versions(version_number)
21302 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
21304 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
21305 &
" is invalid for derivative number "// &
21306 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
21307 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
21308 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21309 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21310 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
21311 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
21312 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
21313 &
"(note version numbers are indexed directly from the value the user specifies during "// &
21314 &
"element creation and no record is kept of the total number of versions the user sets."// &
21315 &
"The maximum version number the user sets defines the total number of versions allocated)." 21316 CALL flagerror(local_error,err,error,*999)
21319 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
21320 &
" is invalid for user node number "// &
21321 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
21322 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21323 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21324 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21325 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
21326 & number_of_derivatives,
"*",err,error))//
" derivatives." 21327 CALL flagerror(local_error,err,error,*999)
21331 local_error=
"The specified user node number of "// &
21332 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
21333 &
" does not exist in the domain for field component number "// &
21334 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
21335 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21336 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21337 CALL flagerror(local_error,err,error,*999)
21340 CALL flagerror(
"Domain is not associated.",err,error,*999)
21342 CASE(field_grid_point_based_interpolation)
21343 local_error=
"Can not get by node for component number "// &
21344 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21345 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21346 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 21347 CALL flagerror(local_error,err,error,*999)
21348 CASE(field_gauss_point_based_interpolation)
21349 local_error=
"Can not get by node for component number "// &
21350 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21351 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21352 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 21353 CALL flagerror(local_error,err,error,*999)
21354 CASE(field_data_point_based_interpolation)
21355 local_error=
"Can not add element for component number "// &
21356 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21357 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21358 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 21359 CALL flagerror(local_error,err,error,*999)
21361 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
21362 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
21363 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
21364 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21365 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21366 CALL flagerror(local_error,err,error,*999)
21369 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
21370 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21371 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21372 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
21374 CALL flagerror(local_error,err,error,*999)
21377 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
21378 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21379 CALL flagerror(local_error,err,error,*999)
21382 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
21383 &
" is invalid. The field parameter set type must be between 1 and "// &
21384 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 21385 CALL flagerror(local_error,err,error,*999)
21388 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
21389 &
" does not correspond to the double precision data type of the given value." 21390 CALL flagerror(local_error,err,error,*999)
21393 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21394 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21395 CALL flagerror(local_error,err,error,*999)
21398 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21399 &
" is invalid. The variable type must be between 1 and "// &
21400 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 21401 CALL flagerror(local_error,err,error,*999)
21404 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
21405 &
" has not been finished." 21406 CALL flagerror(local_error,err,error,*999)
21409 CALL flagerror(
"Field is not associated.",err,error,*999)
21412 exits(
"FIELD_PARAMETER_SET_GET_NODE_DP")
21414 999 errorsexits(
"FIELD_PARAMETER_SET_GET_NODE_DP",err,error)
21416 END SUBROUTINE field_parameter_set_get_node_dp
21423 SUBROUTINE field_parameter_set_get_node_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
21424 & user_node_number,component_number,
VALUE,err,error,*)
21427 TYPE(field_type),
POINTER :: field
21428 INTEGER(INTG),
INTENT(IN) :: variable_type
21429 INTEGER(INTG),
INTENT(IN) :: field_set_type
21430 INTEGER(INTG),
INTENT(IN) :: version_number
21431 INTEGER(INTG),
INTENT(IN) :: derivative_number
21432 INTEGER(INTG),
INTENT(IN) :: user_node_number
21433 INTEGER(INTG),
INTENT(IN) :: component_number
21434 LOGICAL,
INTENT(OUT) ::
VALUE 21435 INTEGER(INTG),
INTENT(OUT) :: err
21436 TYPE(varying_string),
INTENT(OUT) :: error
21438 INTEGER(INTG) :: domain_local_node_number,dof_idx
21439 LOGICAL :: ghost_node,user_node_exists
21440 TYPE(domain_type),
POINTER :: domain
21441 TYPE(domain_nodes_type),
POINTER :: domain_nodes
21442 TYPE(domain_topology_type),
POINTER :: domain_topology
21443 TYPE(field_parameter_set_type),
POINTER :: parameter_set
21444 TYPE(field_variable_type),
POINTER :: field_variable
21445 TYPE(varying_string) :: local_error
21447 enters(
"FIELD_PARAMETER_SET_GET_NODE_L",err,error,*999)
21449 IF(
ASSOCIATED(field))
THEN 21450 IF(field%FIELD_FINISHED)
THEN 21451 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 21452 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
21453 IF(
ASSOCIATED(field_variable))
THEN 21454 IF(field_variable%DATA_TYPE==field_l_type)
THEN 21455 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 21456 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
21457 IF(
ASSOCIATED(parameter_set))
THEN 21458 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 21459 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
21460 CASE(field_constant_interpolation)
21461 local_error=
"Can not get by node for component number "// &
21462 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21463 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21464 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 21465 CALL flagerror(local_error,err,error,*999)
21466 CASE(field_element_based_interpolation)
21467 local_error=
"Can not get by node for component number "// &
21468 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21469 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21470 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 21471 CALL flagerror(local_error,err,error,*999)
21472 CASE(field_node_based_interpolation)
21473 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
21474 IF(
ASSOCIATED(domain))
THEN 21475 domain_topology=>domain%TOPOLOGY
21476 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
21477 & domain_local_node_number,ghost_node,err,error,*999)
21478 IF(user_node_exists)
THEN 21479 domain_nodes=>domain_topology%NODES
21480 IF(
ASSOCIATED(domain_nodes))
THEN 21481 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
21482 & number_of_derivatives)
THEN 21483 IF(version_number>0.AND.version_number<= &
21484 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
21485 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
21486 & number_of_versions)
THEN 21487 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
21488 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
21489 & versions(version_number)
21490 CALL distributed_vector_values_get(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
21492 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
21493 &
" is invalid for derivative number "// &
21494 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
21495 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
21496 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21497 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21498 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
21499 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
21500 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
21501 &
"(note version numbers are indexed directly from the value the user specifies during "// &
21502 &
"element creation and no record is kept of the total number of versions the user sets."// &
21503 &
"The maximum version number the user sets defines the total number of versions allocated)." 21504 CALL flagerror(local_error,err,error,*999)
21507 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
21508 &
" is invalid for user node number "// &
21509 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
21510 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21511 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21512 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21513 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
21514 & number_of_derivatives,
"*",err,error))//
" derivatives." 21515 CALL flagerror(local_error,err,error,*999)
21518 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
21521 local_error=
"The specified user node number of "// &
21522 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
21523 &
" does not exist in the domain for field component number "// &
21524 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
21525 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21526 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21527 CALL flagerror(local_error,err,error,*999)
21530 CALL flagerror(
"Domain is not associated.",err,error,*999)
21532 CASE(field_grid_point_based_interpolation)
21533 local_error=
"Can not get by node for component number "// &
21534 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21535 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21536 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 21537 CALL flagerror(local_error,err,error,*999)
21538 CASE(field_gauss_point_based_interpolation)
21539 local_error=
"Can not get by node for component number "// &
21540 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21541 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21542 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 21543 CALL flagerror(local_error,err,error,*999)
21544 CASE(field_data_point_based_interpolation)
21545 local_error=
"Can not add element for component number "// &
21546 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
21547 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
21548 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 21549 CALL flagerror(local_error,err,error,*999)
21551 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
21552 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
21553 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
21554 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21555 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21556 CALL flagerror(local_error,err,error,*999)
21559 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
21560 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21561 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21562 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
21564 CALL flagerror(local_error,err,error,*999)
21567 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
21568 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21569 CALL flagerror(local_error,err,error,*999)
21572 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
21573 &
" is invalid. The field parameter set type must be between 1 and "// &
21574 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 21575 CALL flagerror(local_error,err,error,*999)
21578 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
21579 &
" does not correspond to the double precision data type of the given value." 21580 CALL flagerror(local_error,err,error,*999)
21583 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21584 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21585 CALL flagerror(local_error,err,error,*999)
21588 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
21589 &
" is invalid. The variable type must be between 1 and "// &
21590 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 21591 CALL flagerror(local_error,err,error,*999)
21594 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
21595 &
" has not been finished." 21596 CALL flagerror(local_error,err,error,*999)
21599 CALL flagerror(
"Field is not associated.",err,error,*999)
21602 exits(
"FIELD_PARAMETER_SET_GET_NODE_L")
21604 999 errorsexits(
"FIELD_PARAMETER_SET_GET_NODE_L",err,error)
21606 END SUBROUTINE field_parameter_set_get_node_l
21614 SUBROUTINE field_parametersetgetlocalnode_intg(field,variableType,fieldSetType,versionNumber,derivativeNumber,localNodeNumber, &
21615 & componentnumber,
VALUE,err,error,*)
21618 TYPE(field_type),
POINTER :: field
21619 INTEGER(INTG),
INTENT(IN) :: variabletype
21620 INTEGER(INTG),
INTENT(IN) :: fieldsettype
21621 INTEGER(INTG),
INTENT(IN) :: versionnumber
21622 INTEGER(INTG),
INTENT(IN) :: derivativenumber
21623 INTEGER(INTG),
INTENT(IN) :: localnodenumber
21624 INTEGER(INTG),
INTENT(IN) :: componentnumber
21625 INTEGER(INTG),
INTENT(OUT) ::
value 21626 INTEGER(INTG),
INTENT(OUT) :: err
21627 TYPE(varying_string),
INTENT(OUT) :: error
21629 INTEGER(INTG) :: dofidx
21630 TYPE(domain_type),
POINTER :: domain
21631 TYPE(domain_nodes_type),
POINTER :: domainnodes
21632 TYPE(domain_topology_type),
POINTER :: domaintopology
21633 TYPE(field_parameter_set_type),
POINTER :: parameterset
21634 TYPE(field_variable_type),
POINTER :: fieldvariable
21635 TYPE(varying_string) :: localerror
21637 enters(
"Field_ParameterSetGetLocalNode_Intg",err,error,*999)
21639 IF(
ASSOCIATED(field))
THEN 21640 IF(field%FIELD_FINISHED)
THEN 21641 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 21642 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
21643 IF(
ASSOCIATED(fieldvariable))
THEN 21644 IF(fieldvariable%DATA_TYPE==field_intg_type)
THEN 21645 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 21646 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
21647 IF(
ASSOCIATED(parameterset))
THEN 21648 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 21649 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
21650 CASE(field_constant_interpolation)
21651 localerror=
"Can not get by node for component number "// &
21652 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21653 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21654 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 21655 CALL flagerror(localerror,err,error,*999)
21656 CASE(field_element_based_interpolation)
21657 localerror=
"Can not get by node for component number "// &
21658 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21659 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21660 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 21661 CALL flagerror(localerror,err,error,*999)
21662 CASE(field_node_based_interpolation)
21663 domain=>fieldvariable%components(componentnumber)%domain
21664 IF(
ASSOCIATED(domain))
THEN 21665 domaintopology=>domain%topology
21666 IF(
ASSOCIATED(domaintopology))
THEN 21667 domainnodes=>domaintopology%nodes
21668 IF(
ASSOCIATED(domainnodes))
THEN 21669 IF(localnodenumber>0.AND.localnodenumber<=domainnodes%TOTAL_NUMBER_OF_NODES)
THEN 21670 IF(derivativenumber>0.AND.derivativenumber<=domainnodes%nodes(localnodenumber)% &
21671 & number_of_derivatives)
THEN 21672 IF(versionnumber>0.AND.versionnumber<=domainnodes%nodes(localnodenumber)%derivatives( &
21673 & derivativenumber)%numberOfVersions)
THEN 21674 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
21675 & node_param2dof_map%NODES(localnodenumber)%derivatives(derivativenumber)% &
21676 & versions(versionnumber)
21677 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
value,err,error,*999)
21679 localerror=
"Version number "//trim(number_to_vstring(versionnumber,
"*",err,error))// &
21680 &
" is invalid for derivative number "// &
21681 & trim(number_to_vstring(derivativenumber,
"*",err,error))//
" of local node number "// &
21682 & trim(number_to_vstring(localnodenumber,
"*",err,error))//
" of component number "// &
21683 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21684 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21685 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
21686 & trim(number_to_vstring(domainnodes%nodes(localnodenumber)%derivatives( &
21687 & derivativenumber)%numberOfVersions,
"*",err,error))//
" versions "// &
21688 &
"(note version numbers are indexed directly from the value the user specifies during "// &
21689 &
"element creation and no record is kept of the total number of versions the user sets."// &
21690 &
"The maximum version number the user sets defines the total number of versions allocated)." 21691 CALL flagerror(localerror,err,error,*999)
21694 localerror=
"Derivative number "//trim(number_to_vstring(derivativenumber,
"*",err,error))// &
21695 &
" is invalid for local node number "// &
21696 & trim(number_to_vstring(localnodenumber,
"*",err,error))//
" of component number "// &
21697 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21698 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21699 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21700 & trim(number_to_vstring(domainnodes%nodes(localnodenumber)% &
21701 & number_of_derivatives,
"*",err,error))//
" derivatives." 21702 CALL flagerror(localerror,err,error,*999)
21705 localerror=
"The specified local node number of "// &
21706 & trim(number_to_vstring(localnodenumber,
"*",err,error))// &
21707 &
" does not exist in the domain for field component number "// &
21708 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
21709 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21710 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21711 & trim(number_to_vstring(domainnodes%TOTAL_NUMBER_OF_NODES,
"*",err,error))//
" local nodes." 21712 CALL flagerror(localerror,err,error,*999)
21715 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
21718 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
21721 CALL flagerror(
"Domain is not associated.",err,error,*999)
21723 CASE(field_grid_point_based_interpolation)
21724 localerror=
"Can not get by node for component number "// &
21725 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21726 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21727 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 21728 CALL flagerror(localerror,err,error,*999)
21729 CASE(field_gauss_point_based_interpolation)
21730 localerror=
"Can not get by node for component number "// &
21731 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21732 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21733 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 21734 CALL flagerror(localerror,err,error,*999)
21735 CASE(field_data_point_based_interpolation)
21736 localerror=
"Can not add element for component number "// &
21737 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21738 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21739 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 21740 CALL flagerror(localerror,err,error,*999)
21742 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
21743 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
21744 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
21745 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
21746 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21747 CALL flagerror(localerror,err,error,*999)
21750 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
21751 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
21752 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21753 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
21755 CALL flagerror(localerror,err,error,*999)
21758 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
21759 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21760 CALL flagerror(localerror,err,error,*999)
21763 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
21764 &
" is invalid. The field parameter set type must be between 1 and "// &
21765 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 21766 CALL flagerror(localerror,err,error,*999)
21769 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
21770 &
" does not correspond to the integer data type of the given value." 21771 CALL flagerror(localerror,err,error,*999)
21774 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
21775 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21776 CALL flagerror(localerror,err,error,*999)
21779 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
21780 &
" is invalid. The variable type must be between 1 and "// &
21781 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 21782 CALL flagerror(localerror,err,error,*999)
21785 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
21786 &
" has not been finished." 21787 CALL flagerror(localerror,err,error,*999)
21790 CALL flagerror(
"Field is not associated.",err,error,*999)
21793 exits(
"Field_ParameterSetGetLocalNode_Intg")
21795 999 errorsexits(
"Field_ParameterSetGetLocalNode_Intg",err,error)
21797 END SUBROUTINE field_parametersetgetlocalnode_intg
21804 SUBROUTINE field_parametersetgetlocalnode_sp(field,variableType,fieldSetType,versionNumber,derivativeNumber,localNodeNumber, &
21805 & componentnumber,
VALUE,err,error,*)
21808 TYPE(field_type),
POINTER :: field
21809 INTEGER(INTG),
INTENT(IN) :: variabletype
21810 INTEGER(INTG),
INTENT(IN) :: fieldsettype
21811 INTEGER(INTG),
INTENT(IN) :: versionnumber
21812 INTEGER(INTG),
INTENT(IN) :: derivativenumber
21813 INTEGER(INTG),
INTENT(IN) :: localnodenumber
21814 INTEGER(INTG),
INTENT(IN) :: componentnumber
21815 REAL(SP),
INTENT(OUT) ::
value 21816 INTEGER(INTG),
INTENT(OUT) :: err
21817 TYPE(varying_string),
INTENT(OUT) :: error
21819 INTEGER(INTG) :: dofidx
21820 TYPE(domain_type),
POINTER :: domain
21821 TYPE(domain_nodes_type),
POINTER :: domainnodes
21822 TYPE(domain_topology_type),
POINTER :: domaintopology
21823 TYPE(field_parameter_set_type),
POINTER :: parameterset
21824 TYPE(field_variable_type),
POINTER :: fieldvariable
21825 TYPE(varying_string) :: localerror
21827 enters(
"Field_ParameterSetGetLocalNode_Sp",err,error,*999)
21829 IF(
ASSOCIATED(field))
THEN 21830 IF(field%FIELD_FINISHED)
THEN 21831 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 21832 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
21833 IF(
ASSOCIATED(fieldvariable))
THEN 21834 IF(fieldvariable%DATA_TYPE==field_sp_type)
THEN 21835 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 21836 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
21837 IF(
ASSOCIATED(parameterset))
THEN 21838 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 21839 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
21840 CASE(field_constant_interpolation)
21841 localerror=
"Can not get by node for component number "// &
21842 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21843 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21844 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 21845 CALL flagerror(localerror,err,error,*999)
21846 CASE(field_element_based_interpolation)
21847 localerror=
"Can not get by node for component number "// &
21848 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21849 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21850 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 21851 CALL flagerror(localerror,err,error,*999)
21852 CASE(field_node_based_interpolation)
21853 domain=>fieldvariable%components(componentnumber)%domain
21854 IF(
ASSOCIATED(domain))
THEN 21855 domaintopology=>domain%topology
21856 IF(
ASSOCIATED(domaintopology))
THEN 21857 domainnodes=>domaintopology%nodes
21858 IF(
ASSOCIATED(domainnodes))
THEN 21859 IF(localnodenumber>0.AND.localnodenumber<=domainnodes%TOTAL_NUMBER_OF_NODES)
THEN 21860 IF(derivativenumber>0.AND.derivativenumber<=domainnodes%nodes(localnodenumber)% &
21861 & number_of_derivatives)
THEN 21862 IF(versionnumber>0.AND.versionnumber<=domainnodes%nodes(localnodenumber)%derivatives( &
21863 & derivativenumber)%numberOfVersions)
THEN 21864 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
21865 & node_param2dof_map%NODES(localnodenumber)%derivatives(derivativenumber)% &
21866 & versions(versionnumber)
21867 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
value,err,error,*999)
21869 localerror=
"Version number "//trim(number_to_vstring(versionnumber,
"*",err,error))// &
21870 &
" is invalid for derivative number "// &
21871 & trim(number_to_vstring(derivativenumber,
"*",err,error))//
" of local node number "// &
21872 & trim(number_to_vstring(localnodenumber,
"*",err,error))//
" of component number "// &
21873 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21874 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21875 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
21876 & trim(number_to_vstring(domainnodes%nodes(localnodenumber)%derivatives( &
21877 & derivativenumber)%numberOfVersions,
"*",err,error))//
" versions "// &
21878 &
"(note version numbers are indexed directly from the value the user specifies during "// &
21879 &
"element creation and no record is kept of the total number of versions the user sets."// &
21880 &
"The maximum version number the user sets defines the total number of versions allocated)." 21881 CALL flagerror(localerror,err,error,*999)
21884 localerror=
"Derivative number "//trim(number_to_vstring(derivativenumber,
"*",err,error))// &
21885 &
" is invalid for local node number "// &
21886 & trim(number_to_vstring(localnodenumber,
"*",err,error))//
" of component number "// &
21887 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21888 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21889 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21890 & trim(number_to_vstring(domainnodes%nodes(localnodenumber)% &
21891 & number_of_derivatives,
"*",err,error))//
" derivatives." 21892 CALL flagerror(localerror,err,error,*999)
21895 localerror=
"The specified local node number of "// &
21896 & trim(number_to_vstring(localnodenumber,
"*",err,error))// &
21897 &
" does not exist in the domain for field component number "// &
21898 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
21899 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21900 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21901 & trim(number_to_vstring(domainnodes%TOTAL_NUMBER_OF_NODES,
"*",err,error))//
" local nodes." 21902 CALL flagerror(localerror,err,error,*999)
21905 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
21908 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
21911 CALL flagerror(
"Domain is not associated.",err,error,*999)
21913 CASE(field_grid_point_based_interpolation)
21914 localerror=
"Can not get by node for component number "// &
21915 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21916 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21917 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 21918 CALL flagerror(localerror,err,error,*999)
21919 CASE(field_gauss_point_based_interpolation)
21920 localerror=
"Can not get by node for component number "// &
21921 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21922 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21923 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 21924 CALL flagerror(localerror,err,error,*999)
21925 CASE(field_data_point_based_interpolation)
21926 localerror=
"Can not add element for component number "// &
21927 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
21928 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
21929 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 21930 CALL flagerror(localerror,err,error,*999)
21932 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
21933 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
21934 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
21935 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
21936 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21937 CALL flagerror(localerror,err,error,*999)
21940 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
21941 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
21942 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
21943 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
21945 CALL flagerror(localerror,err,error,*999)
21948 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
21949 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21950 CALL flagerror(localerror,err,error,*999)
21953 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
21954 &
" is invalid. The field parameter set type must be between 1 and "// &
21955 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 21956 CALL flagerror(localerror,err,error,*999)
21959 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
21960 &
" does not correspond to the single precision data type of the given value." 21961 CALL flagerror(localerror,err,error,*999)
21964 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
21965 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 21966 CALL flagerror(localerror,err,error,*999)
21969 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
21970 &
" is invalid. The variable type must be between 1 and "// &
21971 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 21972 CALL flagerror(localerror,err,error,*999)
21975 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
21976 &
" has not been finished." 21977 CALL flagerror(localerror,err,error,*999)
21980 CALL flagerror(
"Field is not associated.",err,error,*999)
21983 exits(
"Field_ParameterSetGetLocalNode_Sp")
21985 999 errorsexits(
"Field_ParameterSetGetLocalNode_Sp",err,error)
21987 END SUBROUTINE field_parametersetgetlocalnode_sp
21994 SUBROUTINE field_parametersetgetlocalnode_dp(field,variableType,fieldSetType,versionNumber,derivativeNumber,localNodeNumber, &
21995 & componentnumber,
VALUE,err,error,*)
21998 TYPE(field_type),
POINTER :: field
21999 INTEGER(INTG),
INTENT(IN) :: variabletype
22000 INTEGER(INTG),
INTENT(IN) :: fieldsettype
22001 INTEGER(INTG),
INTENT(IN) :: versionnumber
22002 INTEGER(INTG),
INTENT(IN) :: derivativenumber
22003 INTEGER(INTG),
INTENT(IN) :: localnodenumber
22004 INTEGER(INTG),
INTENT(IN) :: componentnumber
22005 REAL(DP),
INTENT(OUT) ::
value 22006 INTEGER(INTG),
INTENT(OUT) :: err
22007 TYPE(varying_string),
INTENT(OUT) :: error
22009 INTEGER(INTG) :: dofidx
22010 TYPE(domain_type),
POINTER :: domain
22011 TYPE(domain_nodes_type),
POINTER :: domainnodes
22012 TYPE(domain_topology_type),
POINTER :: domaintopology
22013 TYPE(field_parameter_set_type),
POINTER :: parameterset
22014 TYPE(field_variable_type),
POINTER :: fieldvariable
22015 TYPE(varying_string) :: localerror
22017 enters(
"Field_ParameterSetGetLocalNode_Dp",err,error,*999)
22019 IF(
ASSOCIATED(field))
THEN 22020 IF(field%FIELD_FINISHED)
THEN 22021 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 22022 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
22023 IF(
ASSOCIATED(fieldvariable))
THEN 22024 IF(fieldvariable%DATA_TYPE==field_dp_type)
THEN 22025 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 22026 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
22027 IF(
ASSOCIATED(parameterset))
THEN 22028 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 22029 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
22030 CASE(field_constant_interpolation)
22031 localerror=
"Can not get by node for component number "// &
22032 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22033 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22034 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 22035 CALL flagerror(localerror,err,error,*999)
22036 CASE(field_element_based_interpolation)
22037 localerror=
"Can not get by node for component number "// &
22038 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22039 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22040 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 22041 CALL flagerror(localerror,err,error,*999)
22042 CASE(field_node_based_interpolation)
22043 domain=>fieldvariable%components(componentnumber)%domain
22044 IF(
ASSOCIATED(domain))
THEN 22045 domaintopology=>domain%topology
22046 IF(
ASSOCIATED(domaintopology))
THEN 22047 domainnodes=>domaintopology%nodes
22048 IF(
ASSOCIATED(domainnodes))
THEN 22049 IF(localnodenumber>0.AND.localnodenumber<=domainnodes%TOTAL_NUMBER_OF_NODES)
THEN 22050 IF(derivativenumber>0.AND.derivativenumber<=domainnodes%nodes(localnodenumber)% &
22051 & number_of_derivatives)
THEN 22052 IF(versionnumber>0.AND.versionnumber<=domainnodes%nodes(localnodenumber)%derivatives( &
22053 & derivativenumber)%numberOfVersions)
THEN 22054 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
22055 & node_param2dof_map%NODES(localnodenumber)%derivatives(derivativenumber)% &
22056 & versions(versionnumber)
22057 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
value,err,error,*999)
22059 localerror=
"Version number "//trim(number_to_vstring(versionnumber,
"*",err,error))// &
22060 &
" is invalid for derivative number "// &
22061 & trim(number_to_vstring(derivativenumber,
"*",err,error))//
" of local node number "// &
22062 & trim(number_to_vstring(localnodenumber,
"*",err,error))//
" of component number "// &
22063 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22064 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22065 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
22066 & trim(number_to_vstring(domainnodes%nodes(localnodenumber)%derivatives( &
22067 & derivativenumber)%numberOfVersions,
"*",err,error))//
" versions "// &
22068 &
"(note version numbers are indexed directly from the value the user specifies during "// &
22069 &
"element creation and no record is kept of the total number of versions the user sets."// &
22070 &
"The maximum version number the user sets defines the total number of versions allocated)." 22071 CALL flagerror(localerror,err,error,*999)
22074 localerror=
"Derivative number "//trim(number_to_vstring(derivativenumber,
"*",err,error))// &
22075 &
" is invalid for local node number "// &
22076 & trim(number_to_vstring(localnodenumber,
"*",err,error))//
" of component number "// &
22077 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22078 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22079 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22080 & trim(number_to_vstring(domainnodes%nodes(localnodenumber)% &
22081 & number_of_derivatives,
"*",err,error))//
" derivatives." 22082 CALL flagerror(localerror,err,error,*999)
22085 localerror=
"The specified local node number of "// &
22086 & trim(number_to_vstring(localnodenumber,
"*",err,error))// &
22087 &
" does not exist in the domain for field component number "// &
22088 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
22089 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22090 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22091 & trim(number_to_vstring(domainnodes%TOTAL_NUMBER_OF_NODES,
"*",err,error))//
" local nodes." 22092 CALL flagerror(localerror,err,error,*999)
22095 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
22098 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
22101 CALL flagerror(
"Domain is not associated.",err,error,*999)
22103 CASE(field_grid_point_based_interpolation)
22104 localerror=
"Can not get by node for component number "// &
22105 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22106 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22107 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 22108 CALL flagerror(localerror,err,error,*999)
22109 CASE(field_gauss_point_based_interpolation)
22110 localerror=
"Can not get by node for component number "// &
22111 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22112 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22113 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 22114 CALL flagerror(localerror,err,error,*999)
22115 CASE(field_data_point_based_interpolation)
22116 localerror=
"Can not add element for component number "// &
22117 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22118 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22119 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 22120 CALL flagerror(localerror,err,error,*999)
22122 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
22123 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
22124 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22125 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22126 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22127 CALL flagerror(localerror,err,error,*999)
22130 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22131 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22132 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22133 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
22135 CALL flagerror(localerror,err,error,*999)
22138 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22139 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22140 CALL flagerror(localerror,err,error,*999)
22143 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22144 &
" is invalid. The field parameter set type must be between 1 and "// &
22145 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 22146 CALL flagerror(localerror,err,error,*999)
22149 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
22150 &
" does not correspond to the double precision data type of the given value." 22151 CALL flagerror(localerror,err,error,*999)
22154 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22155 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22156 CALL flagerror(localerror,err,error,*999)
22159 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22160 &
" is invalid. The variable type must be between 1 and "// &
22161 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 22162 CALL flagerror(localerror,err,error,*999)
22165 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
22166 &
" has not been finished." 22167 CALL flagerror(localerror,err,error,*999)
22170 CALL flagerror(
"Field is not associated.",err,error,*999)
22173 exits(
"Field_ParameterSetGetLocalNode_Dp")
22175 999 errorsexits(
"Field_ParameterSetGetLocalNode_Dp",err,error)
22177 END SUBROUTINE field_parametersetgetlocalnode_dp
22184 SUBROUTINE field_parametersetgetlocalnode_l(field,variableType,fieldSetType,versionNumber,derivativeNumber,localNodeNumber, &
22185 & componentnumber,
VALUE,err,error,*)
22188 TYPE(field_type),
POINTER :: field
22189 INTEGER(INTG),
INTENT(IN) :: variabletype
22190 INTEGER(INTG),
INTENT(IN) :: fieldsettype
22191 INTEGER(INTG),
INTENT(IN) :: versionnumber
22192 INTEGER(INTG),
INTENT(IN) :: derivativenumber
22193 INTEGER(INTG),
INTENT(IN) :: localnodenumber
22194 INTEGER(INTG),
INTENT(IN) :: componentnumber
22195 LOGICAL,
INTENT(OUT) ::
value 22196 INTEGER(INTG),
INTENT(OUT) :: err
22197 TYPE(varying_string),
INTENT(OUT) :: error
22199 INTEGER(INTG) :: dofidx
22200 TYPE(domain_type),
POINTER :: domain
22201 TYPE(domain_nodes_type),
POINTER :: domainnodes
22202 TYPE(domain_topology_type),
POINTER :: domaintopology
22203 TYPE(field_parameter_set_type),
POINTER :: parameterset
22204 TYPE(field_variable_type),
POINTER :: fieldvariable
22205 TYPE(varying_string) :: localerror
22207 enters(
"Field_ParameterSetGetLocalNode_L",err,error,*999)
22209 IF(
ASSOCIATED(field))
THEN 22210 IF(field%FIELD_FINISHED)
THEN 22211 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 22212 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
22213 IF(
ASSOCIATED(fieldvariable))
THEN 22214 IF(fieldvariable%DATA_TYPE==field_l_type)
THEN 22215 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 22216 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
22217 IF(
ASSOCIATED(parameterset))
THEN 22218 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 22219 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
22220 CASE(field_constant_interpolation)
22221 localerror=
"Can not get by node for component number "// &
22222 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22223 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22224 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 22225 CALL flagerror(localerror,err,error,*999)
22226 CASE(field_element_based_interpolation)
22227 localerror=
"Can not get by node for component number "// &
22228 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22229 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22230 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 22231 CALL flagerror(localerror,err,error,*999)
22232 CASE(field_node_based_interpolation)
22233 domain=>fieldvariable%components(componentnumber)%domain
22234 IF(
ASSOCIATED(domain))
THEN 22235 domaintopology=>domain%topology
22236 IF(
ASSOCIATED(domaintopology))
THEN 22237 domainnodes=>domaintopology%nodes
22238 IF(
ASSOCIATED(domainnodes))
THEN 22239 IF(localnodenumber>0.AND.localnodenumber<=domainnodes%TOTAL_NUMBER_OF_NODES)
THEN 22240 IF(derivativenumber>0.AND.derivativenumber<=domainnodes%nodes(localnodenumber)% &
22241 & number_of_derivatives)
THEN 22242 IF(versionnumber>0.AND.versionnumber<=domainnodes%nodes(localnodenumber)%derivatives( &
22243 & derivativenumber)%numberOfVersions)
THEN 22244 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
22245 & node_param2dof_map%NODES(localnodenumber)%derivatives(derivativenumber)% &
22246 & versions(versionnumber)
22247 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
value,err,error,*999)
22249 localerror=
"Version number "//trim(number_to_vstring(versionnumber,
"*",err,error))// &
22250 &
" is invalid for derivative number "// &
22251 & trim(number_to_vstring(derivativenumber,
"*",err,error))//
" of local node number "// &
22252 & trim(number_to_vstring(localnodenumber,
"*",err,error))//
" of component number "// &
22253 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22254 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22255 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
22256 & trim(number_to_vstring(domainnodes%nodes(localnodenumber)%derivatives( &
22257 & derivativenumber)%numberOfVersions,
"*",err,error))//
" versions "// &
22258 &
"(note version numbers are indexed directly from the value the user specifies during "// &
22259 &
"element creation and no record is kept of the total number of versions the user sets."// &
22260 &
"The maximum version number the user sets defines the total number of versions allocated)." 22261 CALL flagerror(localerror,err,error,*999)
22264 localerror=
"Derivative number "//trim(number_to_vstring(derivativenumber,
"*",err,error))// &
22265 &
" is invalid for local node number "// &
22266 & trim(number_to_vstring(localnodenumber,
"*",err,error))//
" of component number "// &
22267 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22268 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22269 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22270 & trim(number_to_vstring(domainnodes%nodes(localnodenumber)% &
22271 & number_of_derivatives,
"*",err,error))//
" derivatives." 22272 CALL flagerror(localerror,err,error,*999)
22275 localerror=
"The specified local node number of "// &
22276 & trim(number_to_vstring(localnodenumber,
"*",err,error))// &
22277 &
" does not exist in the domain for field component number "// &
22278 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
22279 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22280 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22281 & trim(number_to_vstring(domainnodes%TOTAL_NUMBER_OF_NODES,
"*",err,error))//
" local nodes." 22282 CALL flagerror(localerror,err,error,*999)
22285 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
22288 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
22291 CALL flagerror(
"Domain is not associated.",err,error,*999)
22293 CASE(field_grid_point_based_interpolation)
22294 localerror=
"Can not get by node for component number "// &
22295 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22296 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22297 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 22298 CALL flagerror(localerror,err,error,*999)
22299 CASE(field_gauss_point_based_interpolation)
22300 localerror=
"Can not get by node for component number "// &
22301 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22302 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22303 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 22304 CALL flagerror(localerror,err,error,*999)
22305 CASE(field_data_point_based_interpolation)
22306 localerror=
"Can not add element for component number "// &
22307 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22308 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22309 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 22310 CALL flagerror(localerror,err,error,*999)
22312 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
22313 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
22314 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22315 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22316 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22317 CALL flagerror(localerror,err,error,*999)
22320 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22321 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22322 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22323 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
22325 CALL flagerror(localerror,err,error,*999)
22328 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22329 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22330 CALL flagerror(localerror,err,error,*999)
22333 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22334 &
" is invalid. The field parameter set type must be between 1 and "// &
22335 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 22336 CALL flagerror(localerror,err,error,*999)
22339 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
22340 &
" does not correspond to the logical data type of the given value." 22341 CALL flagerror(localerror,err,error,*999)
22344 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22345 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22346 CALL flagerror(localerror,err,error,*999)
22349 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22350 &
" is invalid. The variable type must be between 1 and "// &
22351 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 22352 CALL flagerror(localerror,err,error,*999)
22355 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
22356 &
" has not been finished." 22357 CALL flagerror(localerror,err,error,*999)
22360 CALL flagerror(
"Field is not associated.",err,error,*999)
22363 exits(
"Field_ParameterSetGetLocalNode_L")
22365 999 errorsexits(
"Field_ParameterSetGetLocalNode_L",err,error)
22367 END SUBROUTINE field_parametersetgetlocalnode_l
22375 SUBROUTINE field_parametersetgetlocalelement_intg(field,variableType,fieldSetType,localElementNumber, &
22376 & componentnumber,
VALUE,err,error,*)
22379 TYPE(field_type),
POINTER :: field
22380 INTEGER(INTG),
INTENT(IN) :: variabletype
22381 INTEGER(INTG),
INTENT(IN) :: fieldsettype
22382 INTEGER(INTG),
INTENT(IN) :: localelementnumber
22383 INTEGER(INTG),
INTENT(IN) :: componentnumber
22384 INTEGER(INTG),
INTENT(OUT) ::
value 22385 INTEGER(INTG),
INTENT(OUT) :: err
22386 TYPE(varying_string),
INTENT(OUT) :: error
22388 INTEGER(INTG) :: dofidx
22389 TYPE(domain_type),
POINTER :: domain
22390 TYPE(domain_elements_type),
POINTER :: domainelements
22391 TYPE(domain_topology_type),
POINTER :: domaintopology
22392 TYPE(field_parameter_set_type),
POINTER :: parameterset
22393 TYPE(field_variable_type),
POINTER :: fieldvariable
22394 TYPE(varying_string) :: localerror
22396 enters(
"Field_ParameterSetGetLocalElement_Intg",err,error,*999)
22398 IF(
ASSOCIATED(field))
THEN 22399 IF(field%FIELD_FINISHED)
THEN 22400 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 22401 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
22402 IF(
ASSOCIATED(fieldvariable))
THEN 22403 IF(fieldvariable%DATA_TYPE==field_intg_type)
THEN 22404 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 22405 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
22406 IF(
ASSOCIATED(parameterset))
THEN 22407 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 22408 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
22409 CASE(field_constant_interpolation)
22410 localerror=
"Can not get by element for component number "// &
22411 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22412 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22413 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 22414 CALL flagerror(localerror,err,error,*999)
22415 CASE(field_element_based_interpolation)
22416 domain=>fieldvariable%components(componentnumber)%domain
22417 IF(
ASSOCIATED(domain))
THEN 22418 domaintopology=>domain%topology
22419 IF(
ASSOCIATED(domaintopology))
THEN 22420 domainelements=>domaintopology%elements
22421 IF(
ASSOCIATED(domainelements))
THEN 22422 IF(localelementnumber>0.AND.localelementnumber<=domainelements%TOTAL_NUMBER_OF_ELEMENTS)
THEN 22423 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
22424 & element_param2dof_map%ELEMENTS(localelementnumber)
22425 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
value,err,error,*999)
22427 localerror=
"The specified local element number of "// &
22428 & trim(number_to_vstring(localelementnumber,
"*",err,error))// &
22429 &
" does not exist in the domain for field component number "// &
22430 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
22431 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22432 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22433 & trim(number_to_vstring(domainelements%TOTAL_NUMBER_OF_ELEMENTS,
"*",err,error))//
" local elements." 22434 CALL flagerror(localerror,err,error,*999)
22437 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
22440 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
22443 CALL flagerror(
"Domain is not associated.",err,error,*999)
22445 CASE(field_node_based_interpolation)
22446 localerror=
"Can not get by element for component number "// &
22447 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22448 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22449 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 22450 CALL flagerror(localerror,err,error,*999)
22451 CASE(field_grid_point_based_interpolation)
22452 localerror=
"Can not get by element for component number "// &
22453 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22454 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22455 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 22456 CALL flagerror(localerror,err,error,*999)
22457 CASE(field_gauss_point_based_interpolation)
22458 localerror=
"Can not get by element for component number "// &
22459 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22460 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22461 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 22462 CALL flagerror(localerror,err,error,*999)
22463 CASE(field_data_point_based_interpolation)
22464 localerror=
"Can not add element for component number "// &
22465 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22466 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22467 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 22468 CALL flagerror(localerror,err,error,*999)
22470 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
22471 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
22472 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22473 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22474 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22475 CALL flagerror(localerror,err,error,*999)
22478 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22479 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22480 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22481 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
22483 CALL flagerror(localerror,err,error,*999)
22486 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22487 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22488 CALL flagerror(localerror,err,error,*999)
22491 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22492 &
" is invalid. The field parameter set type must be between 1 and "// &
22493 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 22494 CALL flagerror(localerror,err,error,*999)
22497 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
22498 &
" does not correspond to the integer data type of the given value." 22499 CALL flagerror(localerror,err,error,*999)
22502 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22503 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22504 CALL flagerror(localerror,err,error,*999)
22507 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22508 &
" is invalid. The variable type must be between 1 and "// &
22509 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 22510 CALL flagerror(localerror,err,error,*999)
22513 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
22514 &
" has not been finished." 22515 CALL flagerror(localerror,err,error,*999)
22518 CALL flagerror(
"Field is not associated.",err,error,*999)
22521 exits(
"Field_ParameterSetGetLocalElement_Intg")
22523 999 errorsexits(
"Field_ParameterSetGetLocalElement_Intg",err,error)
22525 END SUBROUTINE field_parametersetgetlocalelement_intg
22533 SUBROUTINE field_parametersetgetlocalelement_sp(field,variableType,fieldSetType,localElementNumber, &
22534 & componentnumber,
VALUE,err,error,*)
22537 TYPE(field_type),
POINTER :: field
22538 INTEGER(INTG),
INTENT(IN) :: variabletype
22539 INTEGER(INTG),
INTENT(IN) :: fieldsettype
22540 INTEGER(INTG),
INTENT(IN) :: localelementnumber
22541 INTEGER(INTG),
INTENT(IN) :: componentnumber
22542 REAL(SP),
INTENT(OUT) ::
value 22543 INTEGER(INTG),
INTENT(OUT) :: err
22544 TYPE(varying_string),
INTENT(OUT) :: error
22546 INTEGER(INTG) :: dofidx
22547 TYPE(domain_type),
POINTER :: domain
22548 TYPE(domain_elements_type),
POINTER :: domainelements
22549 TYPE(domain_topology_type),
POINTER :: domaintopology
22550 TYPE(field_parameter_set_type),
POINTER :: parameterset
22551 TYPE(field_variable_type),
POINTER :: fieldvariable
22552 TYPE(varying_string) :: localerror
22554 enters(
"Field_ParameterSetGetLocalElement_Sp",err,error,*999)
22556 IF(
ASSOCIATED(field))
THEN 22557 IF(field%FIELD_FINISHED)
THEN 22558 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 22559 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
22560 IF(
ASSOCIATED(fieldvariable))
THEN 22561 IF(fieldvariable%DATA_TYPE==field_sp_type)
THEN 22562 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 22563 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
22564 IF(
ASSOCIATED(parameterset))
THEN 22565 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 22566 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
22567 CASE(field_constant_interpolation)
22568 localerror=
"Can not get by element for component number "// &
22569 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22570 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22571 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 22572 CALL flagerror(localerror,err,error,*999)
22573 CASE(field_element_based_interpolation)
22574 domain=>fieldvariable%components(componentnumber)%domain
22575 IF(
ASSOCIATED(domain))
THEN 22576 domaintopology=>domain%topology
22577 IF(
ASSOCIATED(domaintopology))
THEN 22578 domainelements=>domaintopology%elements
22579 IF(
ASSOCIATED(domainelements))
THEN 22580 IF(localelementnumber>0.AND.localelementnumber<=domainelements%TOTAL_NUMBER_OF_ELEMENTS)
THEN 22581 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
22582 & element_param2dof_map%ELEMENTS(localelementnumber)
22583 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
value,err,error,*999)
22585 localerror=
"The specified local element number of "// &
22586 & trim(number_to_vstring(localelementnumber,
"*",err,error))// &
22587 &
" does not exist in the domain for field component number "// &
22588 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
22589 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22590 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22591 & trim(number_to_vstring(domainelements%TOTAL_NUMBER_OF_ELEMENTS,
"*",err,error))//
" local elements." 22592 CALL flagerror(localerror,err,error,*999)
22595 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
22598 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
22601 CALL flagerror(
"Domain is not associated.",err,error,*999)
22603 CASE(field_node_based_interpolation)
22604 localerror=
"Can not get by element for component number "// &
22605 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22606 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22607 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 22608 CALL flagerror(localerror,err,error,*999)
22609 CASE(field_grid_point_based_interpolation)
22610 localerror=
"Can not get by element for component number "// &
22611 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22612 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22613 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 22614 CALL flagerror(localerror,err,error,*999)
22615 CASE(field_gauss_point_based_interpolation)
22616 localerror=
"Can not get by element for component number "// &
22617 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22618 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22619 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 22620 CALL flagerror(localerror,err,error,*999)
22621 CASE(field_data_point_based_interpolation)
22622 localerror=
"Can not add element for component number "// &
22623 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22624 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22625 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 22626 CALL flagerror(localerror,err,error,*999)
22628 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
22629 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
22630 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22631 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22632 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22633 CALL flagerror(localerror,err,error,*999)
22636 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22637 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22638 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22639 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
22641 CALL flagerror(localerror,err,error,*999)
22644 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22645 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22646 CALL flagerror(localerror,err,error,*999)
22649 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22650 &
" is invalid. The field parameter set type must be between 1 and "// &
22651 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 22652 CALL flagerror(localerror,err,error,*999)
22655 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
22656 &
" does not correspond to the single precision data type of the given value." 22657 CALL flagerror(localerror,err,error,*999)
22660 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22661 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22662 CALL flagerror(localerror,err,error,*999)
22665 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22666 &
" is invalid. The variable type must be between 1 and "// &
22667 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 22668 CALL flagerror(localerror,err,error,*999)
22671 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
22672 &
" has not been finished." 22673 CALL flagerror(localerror,err,error,*999)
22676 CALL flagerror(
"Field is not associated.",err,error,*999)
22679 exits(
"Field_ParameterSetGetLocalElement_Sp")
22681 999 errorsexits(
"Field_ParameterSetGetLocalElement_Sp",err,error)
22683 END SUBROUTINE field_parametersetgetlocalelement_sp
22691 SUBROUTINE field_parametersetgetlocalelement_dp(field,variableType,fieldSetType,localElementNumber, &
22692 & componentnumber,
VALUE,err,error,*)
22695 TYPE(field_type),
POINTER :: field
22696 INTEGER(INTG),
INTENT(IN) :: variabletype
22697 INTEGER(INTG),
INTENT(IN) :: fieldsettype
22698 INTEGER(INTG),
INTENT(IN) :: localelementnumber
22699 INTEGER(INTG),
INTENT(IN) :: componentnumber
22700 REAL(DP),
INTENT(OUT) ::
value 22701 INTEGER(INTG),
INTENT(OUT) :: err
22702 TYPE(varying_string),
INTENT(OUT) :: error
22704 INTEGER(INTG) :: dofidx
22705 TYPE(domain_type),
POINTER :: domain
22706 TYPE(domain_elements_type),
POINTER :: domainelements
22707 TYPE(domain_topology_type),
POINTER :: domaintopology
22708 TYPE(field_parameter_set_type),
POINTER :: parameterset
22709 TYPE(field_variable_type),
POINTER :: fieldvariable
22710 TYPE(varying_string) :: localerror
22712 enters(
"Field_ParameterSetGetLocalElement_Dp",err,error,*999)
22714 IF(
ASSOCIATED(field))
THEN 22715 IF(field%FIELD_FINISHED)
THEN 22716 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 22717 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
22718 IF(
ASSOCIATED(fieldvariable))
THEN 22719 IF(fieldvariable%DATA_TYPE==field_dp_type)
THEN 22720 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 22721 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
22722 IF(
ASSOCIATED(parameterset))
THEN 22723 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 22724 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
22725 CASE(field_constant_interpolation)
22726 localerror=
"Can not get by element for component number "// &
22727 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22728 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22729 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 22730 CALL flagerror(localerror,err,error,*999)
22731 CASE(field_element_based_interpolation)
22732 domain=>fieldvariable%components(componentnumber)%domain
22733 IF(
ASSOCIATED(domain))
THEN 22734 domaintopology=>domain%topology
22735 IF(
ASSOCIATED(domaintopology))
THEN 22736 domainelements=>domaintopology%elements
22737 IF(
ASSOCIATED(domainelements))
THEN 22738 IF(localelementnumber>0.AND.localelementnumber<=domainelements%TOTAL_NUMBER_OF_ELEMENTS)
THEN 22739 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
22740 & element_param2dof_map%ELEMENTS(localelementnumber)
22741 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
value,err,error,*999)
22743 localerror=
"The specified local element number of "// &
22744 & trim(number_to_vstring(localelementnumber,
"*",err,error))// &
22745 &
" does not exist in the domain for field component number "// &
22746 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
22747 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22748 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22749 & trim(number_to_vstring(domainelements%TOTAL_NUMBER_OF_ELEMENTS,
"*",err,error))//
" local elements." 22750 CALL flagerror(localerror,err,error,*999)
22753 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
22756 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
22759 CALL flagerror(
"Domain is not associated.",err,error,*999)
22761 CASE(field_node_based_interpolation)
22762 localerror=
"Can not get by element for component number "// &
22763 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22764 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22765 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 22766 CALL flagerror(localerror,err,error,*999)
22767 CASE(field_grid_point_based_interpolation)
22768 localerror=
"Can not get by element for component number "// &
22769 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22770 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22771 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 22772 CALL flagerror(localerror,err,error,*999)
22773 CASE(field_gauss_point_based_interpolation)
22774 localerror=
"Can not get by element for component number "// &
22775 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22776 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22777 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 22778 CALL flagerror(localerror,err,error,*999)
22779 CASE(field_data_point_based_interpolation)
22780 localerror=
"Can not add element for component number "// &
22781 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22782 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22783 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 22784 CALL flagerror(localerror,err,error,*999)
22786 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
22787 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
22788 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22789 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22790 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22791 CALL flagerror(localerror,err,error,*999)
22794 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22795 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22796 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22797 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
22799 CALL flagerror(localerror,err,error,*999)
22802 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22803 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22804 CALL flagerror(localerror,err,error,*999)
22807 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22808 &
" is invalid. The field parameter set type must be between 1 and "// &
22809 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 22810 CALL flagerror(localerror,err,error,*999)
22813 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
22814 &
" does not correspond to the double precision data type of the given value." 22815 CALL flagerror(localerror,err,error,*999)
22818 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22819 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22820 CALL flagerror(localerror,err,error,*999)
22823 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22824 &
" is invalid. The variable type must be between 1 and "// &
22825 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 22826 CALL flagerror(localerror,err,error,*999)
22829 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
22830 &
" has not been finished." 22831 CALL flagerror(localerror,err,error,*999)
22834 CALL flagerror(
"Field is not associated.",err,error,*999)
22837 exits(
"Field_ParameterSetGetLocalElement_Dp")
22839 999 errorsexits(
"Field_ParameterSetGetLocalElement_Dp",err,error)
22841 END SUBROUTINE field_parametersetgetlocalelement_dp
22849 SUBROUTINE field_parametersetgetlocalelement_l(field,variableType,fieldSetType,localElementNumber, &
22850 & componentnumber,
VALUE,err,error,*)
22853 TYPE(field_type),
POINTER :: field
22854 INTEGER(INTG),
INTENT(IN) :: variabletype
22855 INTEGER(INTG),
INTENT(IN) :: fieldsettype
22856 INTEGER(INTG),
INTENT(IN) :: localelementnumber
22857 INTEGER(INTG),
INTENT(IN) :: componentnumber
22858 LOGICAL,
INTENT(OUT) ::
value 22859 INTEGER(INTG),
INTENT(OUT) :: err
22860 TYPE(varying_string),
INTENT(OUT) :: error
22862 INTEGER(INTG) :: dofidx
22863 TYPE(domain_type),
POINTER :: domain
22864 TYPE(domain_elements_type),
POINTER :: domainelements
22865 TYPE(domain_topology_type),
POINTER :: domaintopology
22866 TYPE(field_parameter_set_type),
POINTER :: parameterset
22867 TYPE(field_variable_type),
POINTER :: fieldvariable
22868 TYPE(varying_string) :: localerror
22870 enters(
"Field_ParameterSetGetLocalElement_L",err,error,*999)
22872 IF(
ASSOCIATED(field))
THEN 22873 IF(field%FIELD_FINISHED)
THEN 22874 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 22875 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
22876 IF(
ASSOCIATED(fieldvariable))
THEN 22877 IF(fieldvariable%DATA_TYPE==field_l_type)
THEN 22878 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 22879 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
22880 IF(
ASSOCIATED(parameterset))
THEN 22881 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 22882 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
22883 CASE(field_constant_interpolation)
22884 localerror=
"Can not get by element for component number "// &
22885 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22886 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22887 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 22888 CALL flagerror(localerror,err,error,*999)
22889 CASE(field_element_based_interpolation)
22890 domain=>fieldvariable%components(componentnumber)%domain
22891 IF(
ASSOCIATED(domain))
THEN 22892 domaintopology=>domain%topology
22893 IF(
ASSOCIATED(domaintopology))
THEN 22894 domainelements=>domaintopology%elements
22895 IF(
ASSOCIATED(domainelements))
THEN 22896 IF(localelementnumber>0.AND.localelementnumber<=domainelements%TOTAL_NUMBER_OF_ELEMENTS)
THEN 22897 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
22898 & element_param2dof_map%ELEMENTS(localelementnumber)
22899 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
value,err,error,*999)
22901 localerror=
"The specified local element number of "// &
22902 & trim(number_to_vstring(localelementnumber,
"*",err,error))// &
22903 &
" does not exist in the domain for field component number "// &
22904 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
22905 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22906 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22907 & trim(number_to_vstring(domainelements%TOTAL_NUMBER_OF_ELEMENTS,
"*",err,error))//
" local elements." 22908 CALL flagerror(localerror,err,error,*999)
22911 CALL flagerror(
"Domain topology elements is not associated.",err,error,*999)
22914 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
22917 CALL flagerror(
"Domain is not associated.",err,error,*999)
22919 CASE(field_node_based_interpolation)
22920 localerror=
"Can not get by element for component number "// &
22921 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22922 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22923 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 22924 CALL flagerror(localerror,err,error,*999)
22925 CASE(field_grid_point_based_interpolation)
22926 localerror=
"Can not get by element for component number "// &
22927 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22928 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22929 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 22930 CALL flagerror(localerror,err,error,*999)
22931 CASE(field_gauss_point_based_interpolation)
22932 localerror=
"Can not get by element for component number "// &
22933 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22934 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22935 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 22936 CALL flagerror(localerror,err,error,*999)
22937 CASE(field_data_point_based_interpolation)
22938 localerror=
"Can not add element for component number "// &
22939 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
22940 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
22941 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 22942 CALL flagerror(localerror,err,error,*999)
22944 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
22945 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
22946 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22947 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22948 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22949 CALL flagerror(localerror,err,error,*999)
22952 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
22953 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22954 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
22955 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
22957 CALL flagerror(localerror,err,error,*999)
22960 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22961 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22962 CALL flagerror(localerror,err,error,*999)
22965 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
22966 &
" is invalid. The field parameter set type must be between 1 and "// &
22967 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 22968 CALL flagerror(localerror,err,error,*999)
22971 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
22972 &
" does not correspond to the logical data type of the given value." 22973 CALL flagerror(localerror,err,error,*999)
22976 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22977 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 22978 CALL flagerror(localerror,err,error,*999)
22981 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
22982 &
" is invalid. The variable type must be between 1 and "// &
22983 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 22984 CALL flagerror(localerror,err,error,*999)
22987 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
22988 &
" has not been finished." 22989 CALL flagerror(localerror,err,error,*999)
22992 CALL flagerror(
"Field is not associated.",err,error,*999)
22995 exits(
"Field_ParameterSetGetLocalElement_L")
22997 999 errorsexits(
"Field_ParameterSetGetLocalElement_L",err,error)
22999 END SUBROUTINE field_parametersetgetlocalelement_l
23006 SUBROUTINE field_parametersetgetgausspointdp(field,variableType,fieldSetType,gaussPointNumber,userElementNumber, &
23007 & componentnumber,
value,err,error,*)
23010 TYPE(field_type),
POINTER :: field
23011 INTEGER(INTG),
INTENT(IN) :: variabletype
23012 INTEGER(INTG),
INTENT(IN) :: fieldsettype
23013 INTEGER(INTG),
INTENT(IN) :: gausspointnumber
23014 INTEGER(INTG),
INTENT(IN) :: userelementnumber
23015 INTEGER(INTG),
INTENT(IN) :: componentnumber
23016 REAL(DP),
INTENT(OUT) ::
value 23017 INTEGER(INTG),
INTENT(OUT) :: err
23018 TYPE(varying_string),
INTENT(OUT) :: error
23020 INTEGER(INTG) :: decompositionlocalelementnumber,dofidx
23021 LOGICAL :: ghostelement,userelementexists
23022 TYPE(decomposition_type),
POINTER :: decomposition
23023 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
23024 TYPE(field_parameter_set_type),
POINTER :: parameterset
23025 TYPE(field_variable_type),
POINTER :: fieldvariable
23026 TYPE(varying_string) :: localerror
23028 enters(
"Field_ParameterSetGetGaussPointDP",err,error,*999)
23030 IF(
ASSOCIATED(field))
THEN 23031 IF(field%FIELD_FINISHED)
THEN 23032 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 23033 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%ptr
23034 IF(
ASSOCIATED(fieldvariable))
THEN 23035 IF(fieldvariable%DATA_TYPE==field_dp_type)
THEN 23036 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 23037 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
23038 IF(
ASSOCIATED(parameterset))
THEN 23039 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 23040 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
23041 CASE(field_constant_interpolation)
23042 localerror=
"Can not get by gauss point for component number "// &
23043 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23044 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23045 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 23046 CALL flagerror(localerror,err,error,*999)
23047 CASE(field_element_based_interpolation)
23048 localerror=
"Can not get by gauss point for component number "// &
23049 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23050 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23051 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 23052 CALL flagerror(localerror,err,error,*999)
23053 CASE(field_node_based_interpolation)
23054 localerror=
"Can not get by gauss point for component number "// &
23055 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23056 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23057 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 23058 CALL flagerror(localerror,err,error,*999)
23059 CASE(field_grid_point_based_interpolation)
23060 localerror=
"Can not get by gauss point for component number "// &
23061 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23062 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23063 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 23064 CALL flagerror(localerror,err,error,*999)
23065 CASE(field_gauss_point_based_interpolation)
23066 decomposition=>field%decomposition
23067 IF(
ASSOCIATED(decomposition))
THEN 23068 decompositiontopology=>decomposition%topology
23069 CALL decomposition_topology_element_check_exists(decompositiontopology,userelementnumber, &
23070 & userelementexists,decompositionlocalelementnumber,ghostelement,err,error,*999)
23071 IF(userelementexists)
THEN 23072 IF(gausspointnumber >= 1 .AND. gausspointnumber <=
SIZE(fieldvariable% &
23073 & components(componentnumber)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1))
THEN 23074 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
23075 & gauss_point_param2dof_map%GAUSS_POINTS(gausspointnumber,decompositionlocalelementnumber)
23076 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
value,err,error,*999)
23078 localerror=
"The specified gauss point number "// &
23079 & trim(numbertovstring(gausspointnumber,
"*",err,error))// &
23080 &
" is not within the expected range." 23081 CALL flagerror(localerror,err,error,*999)
23084 localerror=
"The specified user element number of "// &
23085 & trim(numbertovstring(userelementnumber,
"*",err,error))// &
23086 &
" does not exist in the decomposition for field component number "// &
23087 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of field variable type "// &
23088 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23089 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 23090 CALL flagerror(localerror,err,error,*999)
23093 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
23095 CASE(field_data_point_based_interpolation)
23096 localerror=
"Can not add element for component number "// &
23097 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23098 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23099 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 23100 CALL flagerror(localerror,err,error,*999)
23102 localerror=
"The field component interpolation type of "//trim(numbertovstring(fieldvariable% &
23103 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
23104 &
" is invalid for component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
23105 &
" of variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
23106 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 23107 CALL flagerror(localerror,err,error,*999)
23110 localerror=
"Component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
23111 &
" is invalid for variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
23112 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
23113 & trim(numbertovstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 23114 CALL flagerror(localerror,err,error,*999)
23117 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
23118 &
" has not been created on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))
23119 CALL flagerror(localerror,err,error,*999)
23122 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
23123 &
" is invalid. The field parameter set type must be between 1 and "// &
23124 & trim(numbertovstring(field_number_of_set_types,
"*",err,error))
23125 CALL flagerror(localerror,err,error,*999)
23128 localerror=
"The field variable data type of "//trim(numbertovstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
23129 &
" does not correspond to the double precision data type of the given value." 23130 CALL flagerror(localerror,err,error,*999)
23133 localerror=
"The specified field variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
23134 &
" has not been defined on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 23135 CALL flagerror(localerror,err,error,*999)
23138 localerror=
"The specified variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
23139 &
" is invalid. The variable type must be between 1 and "// &
23140 & trim(numbertovstring(field_number_of_variable_types,
"*",err,error))//
"." 23141 CALL flagerror(localerror,err,error,*999)
23144 localerror=
"Field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))// &
23145 &
" has not been finished." 23146 CALL flagerror(localerror,err,error,*999)
23149 CALL flagerror(
"Field is not associated.",err,error,*999)
23152 exits(
"Field_ParameterSetGetGaussPointDP")
23154 999 errorsexits(
"Field_ParameterSetGetGaussPointDP",err,error)
23157 END SUBROUTINE field_parametersetgetgausspointdp
23164 SUBROUTINE field_parametersetgetlocalgausspointdp(field,variableType,fieldSetType,gaussPointNumber,localElementNumber, &
23165 & componentnumber,
value,err,error,*)
23168 TYPE(field_type),
POINTER :: field
23169 INTEGER(INTG),
INTENT(IN) :: variabletype
23170 INTEGER(INTG),
INTENT(IN) :: fieldsettype
23171 INTEGER(INTG),
INTENT(IN) :: gausspointnumber
23172 INTEGER(INTG),
INTENT(IN) :: localelementnumber
23173 INTEGER(INTG),
INTENT(IN) :: componentnumber
23174 REAL(DP),
INTENT(OUT) ::
value 23175 INTEGER(INTG),
INTENT(OUT) :: err
23176 TYPE(varying_string),
INTENT(OUT) :: error
23178 INTEGER(INTG) :: dofidx
23179 TYPE(decomposition_type),
POINTER :: decomposition
23180 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
23181 TYPE(field_parameter_set_type),
POINTER :: parameterset
23182 TYPE(field_variable_type),
POINTER :: fieldvariable
23183 TYPE(varying_string) :: localerror
23185 enters(
"Field_ParameterSetGetLocalGaussPointDP",err,error,*999)
23187 IF(
ASSOCIATED(field))
THEN 23188 IF(field%FIELD_FINISHED)
THEN 23189 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 23190 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%ptr
23191 IF(
ASSOCIATED(fieldvariable))
THEN 23192 IF(fieldvariable%DATA_TYPE==field_dp_type)
THEN 23193 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 23194 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%ptr
23195 IF(
ASSOCIATED(parameterset))
THEN 23196 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 23197 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
23198 CASE(field_constant_interpolation)
23199 localerror=
"Can not get by gauss point for component number "// &
23200 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23201 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23202 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 23203 CALL flagerror(localerror,err,error,*999)
23204 CASE(field_element_based_interpolation)
23205 localerror=
"Can not get by gauss point for component number "// &
23206 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23207 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23208 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 23209 CALL flagerror(localerror,err,error,*999)
23210 CASE(field_node_based_interpolation)
23211 localerror=
"Can not get by gauss point for component number "// &
23212 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23213 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23214 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 23215 CALL flagerror(localerror,err,error,*999)
23216 CASE(field_grid_point_based_interpolation)
23217 localerror=
"Can not get by gauss point for component number "// &
23218 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23219 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23220 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 23221 CALL flagerror(localerror,err,error,*999)
23222 CASE(field_gauss_point_based_interpolation)
23223 decomposition=>field%decomposition
23224 IF(
ASSOCIATED(decomposition))
THEN 23225 decompositiontopology=>decomposition%topology
23226 IF(
ASSOCIATED(decompositiontopology))
THEN 23227 IF(
ASSOCIATED(decompositiontopology%elements))
THEN 23228 IF(localelementnumber>=1.AND. &
23229 & localelementnumber<=decompositiontopology%elements%TOTAL_NUMBER_OF_ELEMENTS)
THEN 23231 IF(gausspointnumber >= 1 .AND. gausspointnumber <=
SIZE(fieldvariable% &
23232 & components(componentnumber)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1))
THEN 23233 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
23234 & gauss_point_param2dof_map%GAUSS_POINTS(gausspointnumber,localelementnumber)
23235 CALL distributed_vector_values_get(parameterset%parameters,dofidx,
VALUE,err,error,*999)
23237 localerror=
"The specified gauss point number "// &
23238 & trim(numbertovstring(gausspointnumber,
"*",err,error))// &
23239 &
" is not within the expected range." 23240 CALL flagerror(localerror,err,error,*999)
23243 localerror=
"Local element number "//trim(numbertovstring(localelementnumber,
"*",err,error))// &
23244 &
" is invalid. The local element number must be >=1 and <= "// &
23245 & trim(numbertovstring(decompositiontopology%elements%TOTAL_NUMBER_OF_ELEMENTS,
"*",err,error))//
"." 23246 CALL flagerror(localerror,err,error,*999)
23249 CALL flagerror(
"Decomposition topology elements is not associated.",err,error,*999)
23252 CALL flagerror(
"Decomposition topology is not associated.",err,error,*999)
23255 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
23257 CASE(field_data_point_based_interpolation)
23258 localerror=
"Can not add element for component number "// &
23259 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
23260 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
23261 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 23262 CALL flagerror(localerror,err,error,*999)
23264 localerror=
"The field component interpolation type of "//trim(numbertovstring(fieldvariable% &
23265 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
23266 &
" is invalid for component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
23267 &
" of variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
23268 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 23269 CALL flagerror(localerror,err,error,*999)
23272 localerror=
"Component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
23273 &
" is invalid for variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
23274 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
23275 & trim(numbertovstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 23276 CALL flagerror(localerror,err,error,*999)
23279 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
23280 &
" has not been created on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))
23281 CALL flagerror(localerror,err,error,*999)
23284 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
23285 &
" is invalid. The field parameter set type must be between 1 and "// &
23286 & trim(numbertovstring(field_number_of_set_types,
"*",err,error))
23287 CALL flagerror(localerror,err,error,*999)
23290 localerror=
"The field variable data type of "//trim(numbertovstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
23291 &
" does not correspond to the double precision data type of the given value." 23292 CALL flagerror(localerror,err,error,*999)
23295 localerror=
"The specified field variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
23296 &
" has not been defined on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 23297 CALL flagerror(localerror,err,error,*999)
23300 localerror=
"The specified variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
23301 &
" is invalid. The variable type must be between 1 and "// &
23302 & trim(numbertovstring(field_number_of_variable_types,
"*",err,error))//
"." 23303 CALL flagerror(localerror,err,error,*999)
23306 localerror=
"Field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))// &
23307 &
" has not been finished." 23308 CALL flagerror(localerror,err,error,*999)
23311 CALL flagerror(
"Field is not associated.",err,error,*999)
23314 exits(
"Field_ParameterSetGetLocalGaussPointDP")
23316 999 errorsexits(
"Field_ParameterSetGetLocalGaussPointDP",err,error)
23319 END SUBROUTINE field_parametersetgetlocalgausspointdp
23326 SUBROUTINE field_parametersetupdateelementdatapointdp(field,variableType,fieldSetType,userElementNumber,dataPointIndex, &
23327 & componentnumber,
value,err,error,*)
23330 TYPE(field_type),
POINTER :: field
23331 INTEGER(INTG),
INTENT(IN) :: variabletype
23332 INTEGER(INTG),
INTENT(IN) :: fieldsettype
23333 INTEGER(INTG),
INTENT(IN) :: userelementnumber
23334 INTEGER(INTG),
INTENT(IN) :: datapointindex
23335 INTEGER(INTG),
INTENT(IN) :: componentnumber
23336 REAL(DP),
INTENT(IN) ::
value 23337 INTEGER(INTG),
INTENT(OUT) :: err
23338 TYPE(varying_string),
INTENT(OUT) :: error
23340 INTEGER(INTG) :: decompositionlocalelementnumber,datapointlocalnumber,dofidx
23341 LOGICAL :: ghostelement,userelementexists
23342 TYPE(decomposition_type),
POINTER :: decomposition
23343 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
23344 TYPE(data_projection_type),
POINTER :: dataprojection
23345 TYPE(field_parameter_set_type),
POINTER :: parameterset
23346 TYPE(field_variable_type),
POINTER :: fieldvariable
23347 TYPE(varying_string) :: localerror
23349 enters(
"Field_ParameterSetUpdateElementDataPointDP",err,error,*999)
23351 IF(
ASSOCIATED(field))
THEN 23352 IF(field%FIELD_FINISHED)
THEN 23353 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 23354 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
23355 IF(
ASSOCIATED(fieldvariable))
THEN 23356 IF(fieldvariable%DATA_TYPE==field_dp_type)
THEN 23357 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 23358 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
23359 IF(
ASSOCIATED(parameterset))
THEN 23360 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 23361 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
23362 CASE(field_constant_interpolation)
23363 localerror=
"Can not update by data point for component number "// &
23364 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
23365 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
23366 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 23367 CALL flagerror(localerror,err,error,*999)
23368 CASE(field_element_based_interpolation)
23369 localerror=
"Can not update by data point for component number "// &
23370 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
23371 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
23372 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 23373 CALL flagerror(localerror,err,error,*999)
23374 CASE(field_node_based_interpolation)
23375 localerror=
"Can not update by data point for component number "// &
23376 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
23377 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
23378 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 23379 CALL flagerror(localerror,err,error,*999)
23380 CASE(field_grid_point_based_interpolation)
23381 localerror=
"Can not update by data point for component number "// &
23382 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
23383 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
23384 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 23385 CALL flagerror(localerror,err,error,*999)
23386 CASE(field_gauss_point_based_interpolation)
23387 localerror=
"Can not update by gauss point for component number "// &
23388 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
23389 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
23390 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has gauss point based interpolation." 23391 CALL flagerror(localerror,err,error,*999)
23392 CASE(field_data_point_based_interpolation)
23393 decomposition=>field%DECOMPOSITION
23394 IF(
ASSOCIATED(decomposition))
THEN 23395 decompositiontopology=>decomposition%TOPOLOGY
23396 IF(
ASSOCIATED(decompositiontopology))
THEN 23397 dataprojection=>field%dataProjection
23398 IF(
ASSOCIATED(dataprojection))
THEN 23400 CALL decomposition_topology_element_check_exists(decompositiontopology,userelementnumber, &
23401 & userelementexists,decompositionlocalelementnumber,ghostelement,err,error,*999)
23402 IF(userelementexists)
THEN 23403 IF(ghostelement)
THEN 23404 localerror=
"Cannot update by data point for user element "// &
23405 & trim(number_to_vstring(userelementnumber,
"*",err,error))//
" as it is a ghost element." 23406 CALL flagerror(localerror,err,error,*999)
23408 datapointlocalnumber = decompositiontopology%dataPoints% &
23409 & elementdatapoint(decompositionlocalelementnumber)%dataIndices(datapointindex)%localNumber
23410 IF(datapointlocalnumber >= 1 .AND. datapointlocalnumber <= fieldvariable% &
23411 & components(componentnumber)%PARAM_TO_DOF_MAP%DATA_POINT_PARAM2DOF_MAP% &
23412 & number_of_data_point_parameters)
THEN 23413 dofidx=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
23414 & data_point_param2dof_map%DATA_POINTS(datapointlocalnumber)
23415 CALL distributed_vector_values_set(parameterset%PARAMETERS,dofidx,
value,err,error,*999)
23417 localerror=
"The specified data point index "// &
23418 & trim(number_to_vstring(datapointlocalnumber,
"*",err,error))// &
23419 &
" is not within the expected range." 23420 CALL flagerror(localerror,err,error,*999)
23424 localerror=
"The specified user element number of "// &
23425 & trim(number_to_vstring(userelementnumber,
"*",err,error))// &
23426 &
" does not exist in the decomposition for field component number "// &
23427 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
23428 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
23429 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23430 CALL flagerror(localerror,err,error,*999)
23433 CALL flagerror(
"Data point projection not associated on provided field.",err,error,*999)
23436 CALL flagerror(
"Field decomposition topology is not associated.",err,error,*999)
23439 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
23442 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
23443 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
23444 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
23445 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
23446 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23447 CALL flagerror(localerror,err,error,*999)
23450 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
23451 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
23452 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
23453 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 23454 CALL flagerror(localerror,err,error,*999)
23457 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
23458 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
23459 CALL flagerror(localerror,err,error,*999)
23462 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
23463 &
" is invalid. The field parameter set type must be between 1 and "// &
23464 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
23465 CALL flagerror(localerror,err,error,*999)
23468 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
23469 &
" does not correspond to the double precision data type of the given value." 23470 CALL flagerror(localerror,err,error,*999)
23473 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
23474 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23475 CALL flagerror(localerror,err,error,*999)
23478 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
23479 &
" is invalid. The variable type must be between 1 and "// &
23480 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 23481 CALL flagerror(localerror,err,error,*999)
23484 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
23485 &
" has not been finished." 23486 CALL flagerror(localerror,err,error,*999)
23489 CALL flagerror(
"Field is not associated.",err,error,*999)
23492 exits(
"Field_ParameterSetUpdateElementDataPointDP")
23494 999 errorsexits(
"Field_ParameterSetUpdateElementDataPointDP",err,error)
23496 END SUBROUTINE field_parametersetupdateelementdatapointdp
23503 SUBROUTINE field_parameter_set_initialise(FIELD_PARAMETER_SET,ERR,ERROR,*)
23506 TYPE(field_parameter_set_type),
POINTER :: field_parameter_set
23507 INTEGER(INTG),
INTENT(OUT) :: err
23508 TYPE(varying_string),
INTENT(OUT) :: error
23511 enters(
"FIELD_PARAMETER_SET_INITIALISE",err,error,*999)
23513 IF(
ASSOCIATED(field_parameter_set))
THEN 23514 field_parameter_set%SET_INDEX=0
23515 field_parameter_set%SET_TYPE=0
23517 CALL flagerror(
"Field parameter set is not associated",err,error,*999)
23520 exits(
"FIELD_PARAMETER_SET_INITIALISE")
23522 999 errorsexits(
"FIELD_PARAMETER_SET_INITIALISE",err,error)
23524 END SUBROUTINE field_parameter_set_initialise
23531 SUBROUTINE field_parameter_set_output(ID,FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,ERR,ERROR,*)
23534 INTEGER(INTG),
INTENT(IN) :: id
23535 TYPE(field_type),
POINTER :: field
23536 INTEGER(INTG),
INTENT(IN) :: variable_type
23537 INTEGER(INTG),
INTENT(IN) :: field_set_type
23538 INTEGER(INTG),
INTENT(OUT) :: err
23539 TYPE(varying_string),
INTENT(OUT) :: error
23541 TYPE(field_parameter_set_type),
POINTER :: parameter_set
23542 TYPE(field_variable_type),
POINTER :: field_variable
23543 TYPE(varying_string) :: local_error
23545 enters(
"FIELD_PARAMETER_SET_OUTPUT",err,error,*999)
23547 IF(
ASSOCIATED(field))
THEN 23548 IF(field%FIELD_FINISHED)
THEN 23549 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 23550 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
23551 IF(
ASSOCIATED(field_variable))
THEN 23552 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 23553 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
23554 IF(
ASSOCIATED(parameter_set))
THEN 23555 CALL distributed_vector_output(id,parameter_set%PARAMETERS,err,error,*999)
23557 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
23558 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23559 CALL flagerror(local_error,err,error,*999)
23562 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
23563 &
" is invalid. The field parameter set type must be between 1 and "// &
23564 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 23565 CALL flagerror(local_error,err,error,*999)
23568 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23569 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23570 CALL flagerror(local_error,err,error,*999)
23573 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23574 &
" is invalid. The variable type must be between 1 and "// &
23575 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 23576 CALL flagerror(local_error,err,error,*999)
23579 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
23580 &
" has not been finished." 23581 CALL flagerror(local_error,err,error,*999)
23584 CALL flagerror(
"Field is not associated.",err,error,*999)
23587 exits(
"FIELD_PARAMETER_SET_OUTPUT")
23589 999 errorsexits(
"FIELD_PARAMETER_SET_OUTPUT",err,error)
23591 END SUBROUTINE field_parameter_set_output
23598 SUBROUTINE field_parameter_set_update_constant_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
23601 TYPE(field_type),
POINTER :: field
23602 INTEGER(INTG),
INTENT(IN) :: variable_type
23603 INTEGER(INTG),
INTENT(IN) :: field_set_type
23604 INTEGER(INTG),
INTENT(IN) :: component_number
23605 INTEGER,
INTENT(IN) ::
VALUE 23606 INTEGER(INTG),
INTENT(OUT) :: err
23607 TYPE(varying_string),
INTENT(OUT) :: error
23609 INTEGER(INTG) :: ny
23610 TYPE(field_parameter_set_type),
POINTER :: parameter_set
23611 TYPE(field_variable_type),
POINTER :: field_variable
23612 TYPE(varying_string) :: local_error
23614 enters(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_INTG",err,error,*999)
23616 IF(
ASSOCIATED(field))
THEN 23617 IF(field%FIELD_FINISHED)
THEN 23618 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 23619 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
23620 IF(
ASSOCIATED(field_variable))
THEN 23621 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 23622 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 23623 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
23624 IF(
ASSOCIATED(parameter_set))
THEN 23625 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 23626 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
23627 CASE(field_constant_interpolation)
23628 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 23629 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
23630 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
23632 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
23633 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23634 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
23635 &
" does not have any constant parameters." 23636 CALL flagerror(local_error,err,error,*999)
23638 CASE(field_element_based_interpolation)
23639 local_error=
"Can not update by constant for component number "// &
23640 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23641 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23642 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 23643 CALL flagerror(local_error,err,error,*999)
23644 CASE(field_node_based_interpolation)
23645 local_error=
"Can not update by constant for component number "// &
23646 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23647 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23648 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 23649 CALL flagerror(local_error,err,error,*999)
23650 CASE(field_grid_point_based_interpolation)
23651 local_error=
"Can not update by constant for component number "// &
23652 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23653 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23654 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 23655 CALL flagerror(local_error,err,error,*999)
23656 CASE(field_gauss_point_based_interpolation)
23657 local_error=
"Can not update by constant for component number "// &
23658 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23659 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23660 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 23661 CALL flagerror(local_error,err,error,*999)
23662 CASE(field_data_point_based_interpolation)
23663 local_error=
"Can not add element for component number "// &
23664 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23665 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23666 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 23667 CALL flagerror(local_error,err,error,*999)
23669 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
23670 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
23671 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
23672 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23673 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23674 CALL flagerror(local_error,err,error,*999)
23677 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
23678 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23679 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
23680 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
23682 CALL flagerror(local_error,err,error,*999)
23685 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
23686 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23687 CALL flagerror(local_error,err,error,*999)
23690 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
23691 &
" is invalid. The field parameter set type must be between 1 and "// &
23692 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 23693 CALL flagerror(local_error,err,error,*999)
23696 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
23697 &
" does not correspond to the integer data type of the given value." 23698 CALL flagerror(local_error,err,error,*999)
23701 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23702 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23703 CALL flagerror(local_error,err,error,*999)
23706 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23707 &
" is invalid. The variable type must be between 1 and "// &
23708 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 23709 CALL flagerror(local_error,err,error,*999)
23712 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
23713 &
" has not been finished." 23714 CALL flagerror(local_error,err,error,*999)
23717 CALL flagerror(
"Field is not associated.",err,error,*999)
23720 exits(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_INTG")
23722 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_INTG",err,error)
23724 END SUBROUTINE field_parameter_set_update_constant_intg
23731 SUBROUTINE field_parameter_set_update_constant_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
23734 TYPE(field_type),
POINTER :: field
23735 INTEGER(INTG),
INTENT(IN) :: variable_type
23736 INTEGER(INTG),
INTENT(IN) :: field_set_type
23737 INTEGER(INTG),
INTENT(IN) :: component_number
23738 REAL(SP),
INTENT(IN) ::
VALUE 23739 INTEGER(INTG),
INTENT(OUT) :: err
23740 TYPE(varying_string),
INTENT(OUT) :: error
23742 INTEGER(INTG) :: ny
23743 TYPE(field_parameter_set_type),
POINTER :: parameter_set
23744 TYPE(field_variable_type),
POINTER :: field_variable
23745 TYPE(varying_string) :: local_error
23747 enters(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_SP",err,error,*999)
23749 IF(
ASSOCIATED(field))
THEN 23750 IF(field%FIELD_FINISHED)
THEN 23751 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 23752 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
23753 IF(
ASSOCIATED(field_variable))
THEN 23754 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 23755 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 23756 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
23757 IF(
ASSOCIATED(parameter_set))
THEN 23758 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 23759 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
23760 CASE(field_constant_interpolation)
23761 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 23762 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
23763 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
23765 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
23766 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23767 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
23768 &
" does not have any constant parameters." 23769 CALL flagerror(local_error,err,error,*999)
23771 CASE(field_element_based_interpolation)
23772 local_error=
"Can not update by constant for component number "// &
23773 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23774 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23775 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 23777 CALL flagerror(local_error,err,error,*999)
23778 CASE(field_node_based_interpolation)
23779 local_error=
"Can not update by constant for component number "// &
23780 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23781 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23782 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 23783 CALL flagerror(local_error,err,error,*999)
23784 CASE(field_grid_point_based_interpolation)
23785 local_error=
"Can not update by constant for component number "// &
23786 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23787 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23788 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 23789 CALL flagerror(local_error,err,error,*999)
23790 CASE(field_gauss_point_based_interpolation)
23791 local_error=
"Can not update by constant for component number "// &
23792 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23793 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23794 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 23795 CALL flagerror(local_error,err,error,*999)
23796 CASE(field_data_point_based_interpolation)
23797 local_error=
"Can not add element for component number "// &
23798 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23799 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23800 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 23801 CALL flagerror(local_error,err,error,*999)
23803 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
23804 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
23805 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
23806 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23807 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23808 CALL flagerror(local_error,err,error,*999)
23811 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
23812 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23813 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
23814 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
23816 CALL flagerror(local_error,err,error,*999)
23819 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
23820 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23821 CALL flagerror(local_error,err,error,*999)
23824 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
23825 &
" is invalid. The field parameter set type must be between 1 and "// &
23826 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 23827 CALL flagerror(local_error,err,error,*999)
23830 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
23831 &
" does not correspond to the single precision data type of the given value." 23832 CALL flagerror(local_error,err,error,*999)
23835 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23836 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23837 CALL flagerror(local_error,err,error,*999)
23840 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23841 &
" is invalid. The variable type must be between 1 and "// &
23842 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 23843 CALL flagerror(local_error,err,error,*999)
23846 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
23847 &
" has not been finished." 23848 CALL flagerror(local_error,err,error,*999)
23851 CALL flagerror(
"Field is not associated.",err,error,*999)
23854 exits(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_SP")
23856 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_SP",err,error)
23858 END SUBROUTINE field_parameter_set_update_constant_sp
23865 SUBROUTINE field_parameter_set_update_constant_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
23868 TYPE(field_type),
POINTER :: field
23869 INTEGER(INTG),
INTENT(IN) :: variable_type
23870 INTEGER(INTG),
INTENT(IN) :: field_set_type
23871 INTEGER(INTG),
INTENT(IN) :: component_number
23872 REAL(DP),
INTENT(IN) ::
VALUE 23873 INTEGER(INTG),
INTENT(OUT) :: err
23874 TYPE(varying_string),
INTENT(OUT) :: error
23876 INTEGER(INTG) :: ny
23877 TYPE(field_parameter_set_type),
POINTER :: parameter_set
23878 TYPE(field_variable_type),
POINTER :: field_variable
23879 TYPE(varying_string) :: local_error
23881 enters(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_DP",err,error,*999)
23883 IF(
ASSOCIATED(field))
THEN 23884 IF(field%FIELD_FINISHED)
THEN 23885 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 23886 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
23887 IF(
ASSOCIATED(field_variable))
THEN 23888 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 23889 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 23890 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
23891 IF(
ASSOCIATED(parameter_set))
THEN 23892 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 23893 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
23894 CASE(field_constant_interpolation)
23895 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 23896 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
23897 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
23899 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
23900 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23901 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
23902 &
" does not have any constant parameters." 23903 CALL flagerror(local_error,err,error,*999)
23905 CASE(field_element_based_interpolation)
23906 local_error=
"Can not update by constant for component number "// &
23907 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23908 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23909 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 23910 CALL flagerror(local_error,err,error,*999)
23911 CASE(field_node_based_interpolation)
23912 local_error=
"Can not update by constant for component number "// &
23913 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23914 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23915 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 23916 CALL flagerror(local_error,err,error,*999)
23917 CASE(field_grid_point_based_interpolation)
23918 local_error=
"Can not update by constant for component number "// &
23919 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23920 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23921 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 23922 CALL flagerror(local_error,err,error,*999)
23923 CASE(field_gauss_point_based_interpolation)
23924 local_error=
"Can not update by constant for component number "// &
23925 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23926 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23927 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 23928 CALL flagerror(local_error,err,error,*999)
23929 CASE(field_data_point_based_interpolation)
23930 local_error=
"Can not add element for component number "// &
23931 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
23932 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
23933 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 23934 CALL flagerror(local_error,err,error,*999)
23936 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
23937 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
23938 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
23939 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23940 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23941 CALL flagerror(local_error,err,error,*999)
23944 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
23945 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23946 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
23947 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
23949 CALL flagerror(local_error,err,error,*999)
23952 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
23953 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23954 CALL flagerror(local_error,err,error,*999)
23957 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
23958 &
" is invalid. The field parameter set type must be between 1 and "// &
23959 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 23960 CALL flagerror(local_error,err,error,*999)
23963 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
23964 &
" does not correspond to the double precision data type of the given value." 23965 CALL flagerror(local_error,err,error,*999)
23968 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23969 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 23970 CALL flagerror(local_error,err,error,*999)
23973 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
23974 &
" is invalid. The variable type must be between 1 and "// &
23975 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 23976 CALL flagerror(local_error,err,error,*999)
23979 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
23980 &
" has not been finished." 23981 CALL flagerror(local_error,err,error,*999)
23984 CALL flagerror(
"Field is not associated.",err,error,*999)
23987 exits(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_DP")
23989 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_DP",err,error)
23991 END SUBROUTINE field_parameter_set_update_constant_dp
23998 SUBROUTINE field_parameter_set_update_constant_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,COMPONENT_NUMBER,VALUE,ERR,ERROR,*)
24001 TYPE(field_type),
POINTER :: field
24002 INTEGER(INTG),
INTENT(IN) :: variable_type
24003 INTEGER(INTG),
INTENT(IN) :: field_set_type
24004 INTEGER(INTG),
INTENT(IN) :: component_number
24005 LOGICAL,
INTENT(IN) ::
VALUE 24006 INTEGER(INTG),
INTENT(OUT) :: err
24007 TYPE(varying_string),
INTENT(OUT) :: error
24009 INTEGER(INTG) :: ny
24010 TYPE(field_parameter_set_type),
POINTER :: parameter_set
24011 TYPE(field_variable_type),
POINTER :: field_variable
24012 TYPE(varying_string) :: local_error
24014 enters(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_L",err,error,*999)
24016 IF(
ASSOCIATED(field))
THEN 24017 IF(field%FIELD_FINISHED)
THEN 24018 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 24019 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
24020 IF(
ASSOCIATED(field_variable))
THEN 24021 IF(field_variable%DATA_TYPE==field_l_type)
THEN 24022 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 24023 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
24024 IF(
ASSOCIATED(parameter_set))
THEN 24025 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 24026 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
24027 CASE(field_constant_interpolation)
24028 IF(field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NUMBER_OF_CONSTANT_PARAMETERS>0)
THEN 24029 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
24030 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
24032 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
24033 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24034 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
24035 &
" does not have any constant parameters." 24036 CALL flagerror(local_error,err,error,*999)
24038 CASE(field_element_based_interpolation)
24039 local_error=
"Can not update by constant for component number "// &
24040 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
24041 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
24042 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 24043 CALL flagerror(local_error,err,error,*999)
24044 CASE(field_node_based_interpolation)
24045 local_error=
"Can not update by constant for component number "// &
24046 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
24047 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
24048 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 24049 CALL flagerror(local_error,err,error,*999)
24050 CASE(field_grid_point_based_interpolation)
24051 local_error=
"Can not update by constant for component number "// &
24052 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
24053 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
24054 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 24055 CALL flagerror(local_error,err,error,*999)
24056 CASE(field_gauss_point_based_interpolation)
24057 local_error=
"Can not update by constant for component number "// &
24058 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
24059 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
24060 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 24061 CALL flagerror(local_error,err,error,*999)
24062 CASE(field_data_point_based_interpolation)
24063 local_error=
"Can not add element for component number "// &
24064 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
24065 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
24066 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 24067 CALL flagerror(local_error,err,error,*999)
24069 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
24070 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
24071 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
24072 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24073 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24074 CALL flagerror(local_error,err,error,*999)
24077 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
24078 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24079 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
24080 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
24082 CALL flagerror(local_error,err,error,*999)
24085 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
24086 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24087 CALL flagerror(local_error,err,error,*999)
24090 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
24091 &
" is invalid. The field parameter set type must be between 1 and "// &
24092 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 24093 CALL flagerror(local_error,err,error,*999)
24096 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
24097 &
" does not correspond to the logical data type of the given value." 24098 CALL flagerror(local_error,err,error,*999)
24101 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24102 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24103 CALL flagerror(local_error,err,error,*999)
24106 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24107 &
" is invalid. The variable type must be between 1 and "// &
24108 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 24109 CALL flagerror(local_error,err,error,*999)
24112 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
24113 &
" has not been finished." 24114 CALL flagerror(local_error,err,error,*999)
24117 CALL flagerror(
"Field is not associated.",err,error,*999)
24120 exits(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_L")
24122 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_CONSTANT_L",err,error)
24124 END SUBROUTINE field_parameter_set_update_constant_l
24131 SUBROUTINE field_parametersetupdatedatapointintg(field,variableType,fieldSetType,userDataPointNumber,componentNumber,value, &
24135 TYPE(field_type),
POINTER :: field
24136 INTEGER(INTG),
INTENT(IN) :: variabletype
24137 INTEGER(INTG),
INTENT(IN) :: fieldsettype
24138 INTEGER(INTG),
INTENT(IN) :: userdatapointnumber
24139 INTEGER(INTG),
INTENT(IN) :: componentnumber
24140 INTEGER(INTG),
INTENT(IN) ::
value 24141 INTEGER(INTG),
INTENT(OUT) :: err
24142 TYPE(varying_string),
INTENT(OUT) :: error
24144 INTEGER(INTG) :: decompositionlocaldatapointnumber,dofidx
24145 LOGICAL :: userdatapointexists,ghostdatapoint
24146 TYPE(decomposition_type),
POINTER :: decomposition
24147 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
24148 TYPE(field_parameter_set_type),
POINTER :: parameterset
24149 TYPE(field_variable_type),
POINTER :: fieldvariable
24150 TYPE(varying_string) :: localerror
24152 enters(
"Field_ParameterSetUpdateDataPointIntg",err,error,*999)
24154 IF(
ASSOCIATED(field))
THEN 24155 IF(field%FIELD_FINISHED)
THEN 24156 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 24157 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
24158 IF(
ASSOCIATED(fieldvariable))
THEN 24159 IF(fieldvariable%DATA_TYPE==field_intg_type)
THEN 24160 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 24161 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
24162 IF(
ASSOCIATED(parameterset))
THEN 24163 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 24164 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
24165 CASE(field_constant_interpolation)
24166 localerror=
"Can not Update by data point for component number "// &
24167 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24168 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24169 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 24170 CALL flagerror(localerror,err,error,*999)
24171 CASE(field_element_based_interpolation)
24172 localerror=
"Can not Update by data point for component number "// &
24173 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24174 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24175 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 24176 CALL flagerror(localerror,err,error,*999)
24177 CASE(field_node_based_interpolation)
24178 localerror=
"Can not Update by data point for component number "// &
24179 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24180 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24181 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 24182 CALL flagerror(localerror,err,error,*999)
24183 CASE(field_grid_point_based_interpolation)
24184 localerror=
"Can not Update by data point for component number "// &
24185 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24186 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24187 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 24188 CALL flagerror(localerror,err,error,*999)
24189 CASE(field_gauss_point_based_interpolation)
24190 localerror=
"Can not Update by data point for component number "// &
24191 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24192 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24193 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 24194 CALL flagerror(localerror,err,error,*999)
24195 CASE(field_data_point_based_interpolation)
24196 decomposition=>field%DECOMPOSITION
24197 IF(
ASSOCIATED(decomposition))
THEN 24198 decompositiontopology=>decomposition%TOPOLOGY
24199 IF(
ASSOCIATED(decompositiontopology))
THEN 24200 CALL decompositiontopology_datapointcheckexists(decompositiontopology,userdatapointnumber, &
24201 & userdatapointexists,decompositionlocaldatapointnumber,ghostdatapoint,err,error,*999)
24202 IF(userdatapointexists)
THEN 24203 dofidx=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
24204 & data_point_param2dof_map%DATA_POINTS(decompositionlocaldatapointnumber)
24205 CALL distributed_vector_values_set(parameterset%PARAMETERS,dofidx,
value,err,error,*999)
24207 localerror=
"The specified user data point number of "// &
24208 & trim(number_to_vstring(userdatapointnumber,
"*",err,error))// &
24209 &
" does not exist in the decomposition for field component number "// &
24210 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
24211 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24212 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24213 CALL flagerror(localerror,err,error,*999)
24216 CALL flagerror(
"Field decomposition topology is not associated.",err,error,*999)
24219 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
24222 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
24223 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
24224 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
24225 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24226 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24227 CALL flagerror(localerror,err,error,*999)
24230 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
24231 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24232 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
24233 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 24234 CALL flagerror(localerror,err,error,*999)
24237 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
24238 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
24239 CALL flagerror(localerror,err,error,*999)
24242 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
24243 &
" is invalid. The field parameter set type must be between 1 and "// &
24244 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
24245 CALL flagerror(localerror,err,error,*999)
24248 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
24249 &
" does not correspond to the integer data type of the given value." 24250 CALL flagerror(localerror,err,error,*999)
24253 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24254 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24255 CALL flagerror(localerror,err,error,*999)
24258 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24259 &
" is invalid. The variable type must be between 1 and "// &
24260 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 24261 CALL flagerror(localerror,err,error,*999)
24264 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
24265 &
" has not been finished." 24266 CALL flagerror(localerror,err,error,*999)
24269 CALL flagerror(
"Field is not associated.",err,error,*999)
24272 exits(
"Field_ParameterSetUpdateDataPointIntg")
24274 999 errorsexits(
"Field_ParameterSetUpdateDataPointIntg",err,error)
24276 END SUBROUTINE field_parametersetupdatedatapointintg
24283 SUBROUTINE field_parametersetupdatedatapointsp(field,variableType,fieldSetType,userDataPointNumber,componentNumber,value, &
24287 TYPE(field_type),
POINTER :: field
24288 INTEGER(INTG),
INTENT(IN) :: variabletype
24289 INTEGER(INTG),
INTENT(IN) :: fieldsettype
24290 INTEGER(INTG),
INTENT(IN) :: userdatapointnumber
24291 INTEGER(INTG),
INTENT(IN) :: componentnumber
24292 REAL(SP),
INTENT(IN) ::
value 24293 INTEGER(INTG),
INTENT(OUT) :: err
24294 TYPE(varying_string),
INTENT(OUT) :: error
24296 INTEGER(INTG) :: decompositionlocaldatapointnumber,dofidx
24297 LOGICAL :: userdatapointexists,ghostdatapoint
24298 TYPE(decomposition_type),
POINTER :: decomposition
24299 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
24300 TYPE(field_parameter_set_type),
POINTER :: parameterset
24301 TYPE(field_variable_type),
POINTER :: fieldvariable
24302 TYPE(varying_string) :: localerror
24304 enters(
"Field_ParameterSetUpdateDataPointSP",err,error,*999)
24306 IF(
ASSOCIATED(field))
THEN 24307 IF(field%FIELD_FINISHED)
THEN 24308 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 24309 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
24310 IF(
ASSOCIATED(fieldvariable))
THEN 24311 IF(fieldvariable%DATA_TYPE==field_sp_type)
THEN 24312 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 24313 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
24314 IF(
ASSOCIATED(parameterset))
THEN 24315 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 24316 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
24317 CASE(field_constant_interpolation)
24318 localerror=
"Can not Update by data point for component number "// &
24319 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24320 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24321 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 24322 CALL flagerror(localerror,err,error,*999)
24323 CASE(field_element_based_interpolation)
24324 localerror=
"Can not Update by data point for component number "// &
24325 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24326 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24327 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 24328 CALL flagerror(localerror,err,error,*999)
24329 CASE(field_node_based_interpolation)
24330 localerror=
"Can not Update by data point for component number "// &
24331 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24332 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24333 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 24334 CALL flagerror(localerror,err,error,*999)
24335 CASE(field_grid_point_based_interpolation)
24336 localerror=
"Can not Update by data point for component number "// &
24337 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24338 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24339 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 24340 CALL flagerror(localerror,err,error,*999)
24341 CASE(field_gauss_point_based_interpolation)
24342 localerror=
"Can not Update by data point for component number "// &
24343 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24344 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24345 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 24346 CALL flagerror(localerror,err,error,*999)
24347 CASE(field_data_point_based_interpolation)
24348 decomposition=>field%DECOMPOSITION
24349 IF(
ASSOCIATED(decomposition))
THEN 24350 decompositiontopology=>decomposition%TOPOLOGY
24351 IF(
ASSOCIATED(decompositiontopology))
THEN 24352 CALL decompositiontopology_datapointcheckexists(decompositiontopology,userdatapointnumber, &
24353 & userdatapointexists,decompositionlocaldatapointnumber,ghostdatapoint,err,error,*999)
24354 IF(userdatapointexists)
THEN 24355 dofidx=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
24356 & data_point_param2dof_map%DATA_POINTS(decompositionlocaldatapointnumber)
24357 CALL distributed_vector_values_set(parameterset%PARAMETERS,dofidx,
value,err,error,*999)
24359 localerror=
"The specified user data point number of "// &
24360 & trim(number_to_vstring(userdatapointnumber,
"*",err,error))// &
24361 &
" does not exist in the decomposition for field component number "// &
24362 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
24363 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24364 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24365 CALL flagerror(localerror,err,error,*999)
24368 CALL flagerror(
"Field decomposition topology is not associated.",err,error,*999)
24371 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
24374 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
24375 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
24376 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
24377 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24378 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24379 CALL flagerror(localerror,err,error,*999)
24382 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
24383 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24384 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
24385 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 24386 CALL flagerror(localerror,err,error,*999)
24389 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
24390 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
24391 CALL flagerror(localerror,err,error,*999)
24394 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
24395 &
" is invalid. The field parameter set type must be between 1 and "// &
24396 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
24397 CALL flagerror(localerror,err,error,*999)
24400 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
24401 &
" does not correspond to the single precision data type of the given value." 24402 CALL flagerror(localerror,err,error,*999)
24405 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24406 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24407 CALL flagerror(localerror,err,error,*999)
24410 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24411 &
" is invalid. The variable type must be between 1 and "// &
24412 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 24413 CALL flagerror(localerror,err,error,*999)
24416 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
24417 &
" has not been finished." 24418 CALL flagerror(localerror,err,error,*999)
24421 CALL flagerror(
"Field is not associated.",err,error,*999)
24424 exits(
"Field_ParameterSetUpdateDataPointSP")
24426 999 errorsexits(
"Field_ParameterSetUpdateDataPointSP",err,error)
24428 END SUBROUTINE field_parametersetupdatedatapointsp
24435 SUBROUTINE field_parametersetupdatedatapointdp(field,variableType,fieldSetType,userDataPointNumber,componentNumber,value, &
24439 TYPE(field_type),
POINTER :: field
24440 INTEGER(INTG),
INTENT(IN) :: variabletype
24441 INTEGER(INTG),
INTENT(IN) :: fieldsettype
24442 INTEGER(INTG),
INTENT(IN) :: userdatapointnumber
24443 INTEGER(INTG),
INTENT(IN) :: componentnumber
24444 REAL(DP),
INTENT(IN) ::
value 24445 INTEGER(INTG),
INTENT(OUT) :: err
24446 TYPE(varying_string),
INTENT(OUT) :: error
24448 INTEGER(INTG) :: decompositionlocaldatapointnumber,dofidx
24449 LOGICAL :: userdatapointexists,ghostdatapoint
24450 TYPE(decomposition_type),
POINTER :: decomposition
24451 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
24452 TYPE(field_parameter_set_type),
POINTER :: parameterset
24453 TYPE(field_variable_type),
POINTER :: fieldvariable
24454 TYPE(varying_string) :: localerror
24456 enters(
"Field_ParameterSetUpdateDataPointDP",err,error,*999)
24458 IF(
ASSOCIATED(field))
THEN 24459 IF(field%FIELD_FINISHED)
THEN 24460 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 24461 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
24462 IF(
ASSOCIATED(fieldvariable))
THEN 24463 IF(fieldvariable%DATA_TYPE==field_dp_type)
THEN 24464 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 24465 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
24466 IF(
ASSOCIATED(parameterset))
THEN 24467 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 24468 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
24469 CASE(field_constant_interpolation)
24470 localerror=
"Can not Update by data point for component number "// &
24471 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24472 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24473 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 24474 CALL flagerror(localerror,err,error,*999)
24475 CASE(field_element_based_interpolation)
24476 localerror=
"Can not Update by data point for component number "// &
24477 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24478 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24479 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 24480 CALL flagerror(localerror,err,error,*999)
24481 CASE(field_node_based_interpolation)
24482 localerror=
"Can not Update by data point for component number "// &
24483 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24484 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24485 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 24486 CALL flagerror(localerror,err,error,*999)
24487 CASE(field_grid_point_based_interpolation)
24488 localerror=
"Can not Update by data point for component number "// &
24489 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24490 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24491 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 24492 CALL flagerror(localerror,err,error,*999)
24493 CASE(field_gauss_point_based_interpolation)
24494 localerror=
"Can not Update by data point for component number "// &
24495 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24496 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24497 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 24498 CALL flagerror(localerror,err,error,*999)
24499 CASE(field_data_point_based_interpolation)
24500 decomposition=>field%DECOMPOSITION
24501 IF(
ASSOCIATED(decomposition))
THEN 24502 decompositiontopology=>decomposition%TOPOLOGY
24503 IF(
ASSOCIATED(decompositiontopology))
THEN 24504 CALL decompositiontopology_datapointcheckexists(decompositiontopology,userdatapointnumber, &
24505 & userdatapointexists,decompositionlocaldatapointnumber,ghostdatapoint,err,error,*999)
24506 IF(userdatapointexists)
THEN 24507 dofidx=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
24508 & data_point_param2dof_map%DATA_POINTS(decompositionlocaldatapointnumber)
24509 CALL distributed_vector_values_set(parameterset%PARAMETERS,dofidx,
value,err,error,*999)
24511 localerror=
"The specified user data point number of "// &
24512 & trim(number_to_vstring(userdatapointnumber,
"*",err,error))// &
24513 &
" does not exist in the decomposition for field component number "// &
24514 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
24515 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24516 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24517 CALL flagerror(localerror,err,error,*999)
24520 CALL flagerror(
"Field decomposition topology is not associated.",err,error,*999)
24523 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
24526 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
24527 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
24528 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
24529 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24530 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24531 CALL flagerror(localerror,err,error,*999)
24534 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
24535 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24536 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
24537 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 24538 CALL flagerror(localerror,err,error,*999)
24541 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
24542 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
24543 CALL flagerror(localerror,err,error,*999)
24546 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
24547 &
" is invalid. The field parameter set type must be between 1 and "// &
24548 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
24549 CALL flagerror(localerror,err,error,*999)
24552 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
24553 &
" does not correspond to the double precision data type of the given value." 24554 CALL flagerror(localerror,err,error,*999)
24557 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24558 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24559 CALL flagerror(localerror,err,error,*999)
24562 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24563 &
" is invalid. The variable type must be between 1 and "// &
24564 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 24565 CALL flagerror(localerror,err,error,*999)
24568 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
24569 &
" has not been finished." 24570 CALL flagerror(localerror,err,error,*999)
24573 CALL flagerror(
"Field is not associated.",err,error,*999)
24576 exits(
"Field_ParameterSetUpdateDataPointDP")
24578 999 errorsexits(
"Field_ParameterSetUpdateDataPointDP",err,error)
24580 END SUBROUTINE field_parametersetupdatedatapointdp
24587 SUBROUTINE field_parametersetupdatedatapointl(field,variableType,fieldSetType,userDataPointNumber,componentNumber,value, &
24591 TYPE(field_type),
POINTER :: field
24592 INTEGER(INTG),
INTENT(IN) :: variabletype
24593 INTEGER(INTG),
INTENT(IN) :: fieldsettype
24594 INTEGER(INTG),
INTENT(IN) :: userdatapointnumber
24595 INTEGER(INTG),
INTENT(IN) :: componentnumber
24596 LOGICAL,
INTENT(IN) ::
value 24597 INTEGER(INTG),
INTENT(OUT) :: err
24598 TYPE(varying_string),
INTENT(OUT) :: error
24600 INTEGER(INTG) :: decompositionlocaldatapointnumber,dofidx
24601 LOGICAL :: userdatapointexists,ghostdatapoint
24602 TYPE(decomposition_type),
POINTER :: decomposition
24603 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
24604 TYPE(field_parameter_set_type),
POINTER :: parameterset
24605 TYPE(field_variable_type),
POINTER :: fieldvariable
24606 TYPE(varying_string) :: localerror
24608 enters(
"Field_ParameterSetUpdateDataPointL",err,error,*999)
24610 IF(
ASSOCIATED(field))
THEN 24611 IF(field%FIELD_FINISHED)
THEN 24612 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 24613 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
24614 IF(
ASSOCIATED(fieldvariable))
THEN 24615 IF(fieldvariable%DATA_TYPE==field_l_type)
THEN 24616 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 24617 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
24618 IF(
ASSOCIATED(parameterset))
THEN 24619 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 24620 SELECT CASE(fieldvariable%COMPONENTS(componentnumber)%INTERPOLATION_TYPE)
24621 CASE(field_constant_interpolation)
24622 localerror=
"Can not Update by data point for component number "// &
24623 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24624 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24625 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 24626 CALL flagerror(localerror,err,error,*999)
24627 CASE(field_element_based_interpolation)
24628 localerror=
"Can not Update by data point for component number "// &
24629 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24630 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24631 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 24632 CALL flagerror(localerror,err,error,*999)
24633 CASE(field_node_based_interpolation)
24634 localerror=
"Can not Update by data point for component number "// &
24635 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24636 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24637 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 24638 CALL flagerror(localerror,err,error,*999)
24639 CASE(field_grid_point_based_interpolation)
24640 localerror=
"Can not Update by data point for component number "// &
24641 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24642 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24643 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 24644 CALL flagerror(localerror,err,error,*999)
24645 CASE(field_gauss_point_based_interpolation)
24646 localerror=
"Can not Update by data point for component number "// &
24647 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of variable type "// &
24648 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24649 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 24650 CALL flagerror(localerror,err,error,*999)
24651 CASE(field_data_point_based_interpolation)
24652 decomposition=>field%DECOMPOSITION
24653 IF(
ASSOCIATED(decomposition))
THEN 24654 decompositiontopology=>decomposition%TOPOLOGY
24655 IF(
ASSOCIATED(decompositiontopology))
THEN 24656 CALL decompositiontopology_datapointcheckexists(decompositiontopology,userdatapointnumber, &
24657 & userdatapointexists,decompositionlocaldatapointnumber,ghostdatapoint,err,error,*999)
24658 IF(userdatapointexists)
THEN 24659 dofidx=fieldvariable%COMPONENTS(componentnumber)%PARAM_TO_DOF_MAP% &
24660 & data_point_param2dof_map%DATA_POINTS(decompositionlocaldatapointnumber)
24661 CALL distributed_vector_values_set(parameterset%PARAMETERS,dofidx,
value,err,error,*999)
24663 localerror=
"The specified user data point number of "// &
24664 & trim(number_to_vstring(userdatapointnumber,
"*",err,error))// &
24665 &
" does not exist in the decomposition for field component number "// &
24666 & trim(number_to_vstring(componentnumber,
"*",err,error))//
" of field variable type "// &
24667 & trim(number_to_vstring(variabletype,
"*",err,error))//
" of field number "// &
24668 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24669 CALL flagerror(localerror,err,error,*999)
24672 CALL flagerror(
"Field decomposition topology is not associated.",err,error,*999)
24675 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
24678 localerror=
"The field component interpolation type of "//trim(number_to_vstring(fieldvariable% &
24679 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
24680 &
" is invalid for component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
24681 &
" of variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24682 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24683 CALL flagerror(localerror,err,error,*999)
24686 localerror=
"Component number "//trim(number_to_vstring(componentnumber,
"*",err,error))// &
24687 &
" is invalid for variable type "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24688 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
24689 & trim(number_to_vstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 24690 CALL flagerror(localerror,err,error,*999)
24693 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
24694 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
24695 CALL flagerror(localerror,err,error,*999)
24698 localerror=
"The field parameter set type of "//trim(number_to_vstring(fieldsettype,
"*",err,error))// &
24699 &
" is invalid. The field parameter set type must be between 1 and "// &
24700 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
24701 CALL flagerror(localerror,err,error,*999)
24704 localerror=
"The field variable data type of "//trim(number_to_vstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
24705 &
" does not correspond to the logical data type of the given value." 24706 CALL flagerror(localerror,err,error,*999)
24709 localerror=
"The specified field variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24710 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24711 CALL flagerror(localerror,err,error,*999)
24714 localerror=
"The specified variable type of "//trim(number_to_vstring(variabletype,
"*",err,error))// &
24715 &
" is invalid. The variable type must be between 1 and "// &
24716 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 24717 CALL flagerror(localerror,err,error,*999)
24720 localerror=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
24721 &
" has not been finished." 24722 CALL flagerror(localerror,err,error,*999)
24725 CALL flagerror(
"Field is not associated.",err,error,*999)
24728 exits(
"Field_ParameterSetUpdateDataPointL")
24730 999 errorsexits(
"Field_ParameterSetUpdateDataPointL",err,error)
24732 END SUBROUTINE field_parametersetupdatedatapointl
24739 SUBROUTINE field_parameter_set_update_local_dof_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
24742 TYPE(field_type),
POINTER :: field
24743 INTEGER(INTG),
INTENT(IN) :: variable_type
24744 INTEGER(INTG),
INTENT(IN) :: field_set_type
24745 INTEGER(INTG),
INTENT(IN) :: dof_number
24746 INTEGER(INTG),
INTENT(IN) ::
VALUE 24747 INTEGER(INTG),
INTENT(OUT) :: err
24748 TYPE(varying_string),
INTENT(OUT) :: error
24750 TYPE(field_parameter_set_type),
POINTER :: parameter_set
24751 TYPE(field_variable_type),
POINTER :: field_variable
24752 TYPE(varying_string) :: local_error
24754 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_INTG",err,error,*999)
24757 IF(
ASSOCIATED(field))
THEN 24758 IF(field%FIELD_FINISHED)
THEN 24759 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 24760 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
24761 IF(
ASSOCIATED(field_variable))
THEN 24762 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 24763 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 24764 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
24765 IF(
ASSOCIATED(parameter_set))
THEN 24767 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL)
THEN 24768 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
24770 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
24771 &
" is invalid. It must be >0 and <="// &
24772 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL,
"*",err,error))// &
24773 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24774 CALL flagerror(local_error,err,error,*999)
24777 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
24778 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24779 CALL flagerror(local_error,err,error,*999)
24782 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
24783 &
" is invalid. The field parameter set type must be between 1 and "// &
24784 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 24785 CALL flagerror(local_error,err,error,*999)
24788 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
24789 &
" does not correspond to the integer data type of the given value." 24790 CALL flagerror(local_error,err,error,*999)
24793 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24794 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24795 CALL flagerror(local_error,err,error,*999)
24798 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24799 &
" is invalid. The variable type must be between 1 and "// &
24800 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 24801 CALL flagerror(local_error,err,error,*999)
24804 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
24805 &
" has not been finished." 24806 CALL flagerror(local_error,err,error,*999)
24809 CALL flagerror(
"Field is not associated.",err,error,*999)
24812 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_INTG")
24814 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_INTG",err,error)
24816 END SUBROUTINE field_parameter_set_update_local_dof_intg
24823 SUBROUTINE field_parameter_set_update_local_dof_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
24826 TYPE(field_type),
POINTER :: field
24827 INTEGER(INTG),
INTENT(IN) :: variable_type
24828 INTEGER(INTG),
INTENT(IN) :: field_set_type
24829 INTEGER(INTG),
INTENT(IN) :: dof_number
24830 REAL(SP),
INTENT(IN) ::
VALUE 24831 INTEGER(INTG),
INTENT(OUT) :: err
24832 TYPE(varying_string),
INTENT(OUT) :: error
24834 TYPE(field_parameter_set_type),
POINTER :: parameter_set
24835 TYPE(field_variable_type),
POINTER :: field_variable
24836 TYPE(varying_string) :: local_error
24838 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_SP",err,error,*999)
24841 IF(
ASSOCIATED(field))
THEN 24842 IF(field%FIELD_FINISHED)
THEN 24843 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 24844 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
24845 IF(
ASSOCIATED(field_variable))
THEN 24846 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 24847 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 24848 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
24849 IF(
ASSOCIATED(parameter_set))
THEN 24851 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL)
THEN 24852 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
24854 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
24855 &
" is invalid. It must be >0 and <="// &
24856 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL,
"*",err,error))// &
24857 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24858 CALL flagerror(local_error,err,error,*999)
24861 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
24862 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24863 CALL flagerror(local_error,err,error,*999)
24866 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
24867 &
" is invalid. The field parameter set type must be between 1 and "// &
24868 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 24869 CALL flagerror(local_error,err,error,*999)
24872 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
24873 &
" does not correspond to the single precision data type of the given value." 24874 CALL flagerror(local_error,err,error,*999)
24877 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24878 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24879 CALL flagerror(local_error,err,error,*999)
24882 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24883 &
" is invalid. The variable type must be between 1 and "// &
24884 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 24885 CALL flagerror(local_error,err,error,*999)
24888 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
24889 &
" has not been finished." 24890 CALL flagerror(local_error,err,error,*999)
24893 CALL flagerror(
"Field is not associated.",err,error,*999)
24896 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_SP")
24898 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_SP",err,error)
24900 END SUBROUTINE field_parameter_set_update_local_dof_sp
24907 SUBROUTINE field_parameter_set_update_local_dof_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
24910 TYPE(field_type),
POINTER :: field
24911 INTEGER(INTG),
INTENT(IN) :: variable_type
24912 INTEGER(INTG),
INTENT(IN) :: field_set_type
24913 INTEGER(INTG),
INTENT(IN) :: dof_number
24914 REAL(DP),
INTENT(IN) ::
VALUE 24915 INTEGER(INTG),
INTENT(OUT) :: err
24916 TYPE(varying_string),
INTENT(OUT) :: error
24918 TYPE(field_parameter_set_type),
POINTER :: parameter_set
24919 TYPE(field_variable_type),
POINTER :: field_variable
24920 TYPE(varying_string) :: local_error
24922 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_DP",err,error,*999)
24925 IF(
ASSOCIATED(field))
THEN 24926 IF(field%FIELD_FINISHED)
THEN 24927 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 24928 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
24929 IF(
ASSOCIATED(field_variable))
THEN 24930 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 24931 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 24932 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
24933 IF(
ASSOCIATED(parameter_set))
THEN 24935 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL)
THEN 24936 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
24938 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
24939 &
" is invalid. It must be >0 and <="// &
24940 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL,
"*",err,error))// &
24941 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24942 CALL flagerror(local_error,err,error,*999)
24945 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
24946 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24947 CALL flagerror(local_error,err,error,*999)
24950 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
24951 &
" is invalid. The field parameter set type must be between 1 and "// &
24952 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 24953 CALL flagerror(local_error,err,error,*999)
24956 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
24957 &
" does not correspond to the double precision data type of the given value." 24958 CALL flagerror(local_error,err,error,*999)
24961 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24962 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 24963 CALL flagerror(local_error,err,error,*999)
24966 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
24967 &
" is invalid. The variable type must be between 1 and "// &
24968 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 24969 CALL flagerror(local_error,err,error,*999)
24972 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
24973 &
" has not been finished." 24974 CALL flagerror(local_error,err,error,*999)
24977 CALL flagerror(
"Field is not associated.",err,error,*999)
24980 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_DP")
24982 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_DP",err,error)
24984 END SUBROUTINE field_parameter_set_update_local_dof_dp
24991 SUBROUTINE field_parameter_set_update_local_dof_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DOF_NUMBER,VALUE,ERR,ERROR,*)
24994 TYPE(field_type),
POINTER :: field
24995 INTEGER(INTG),
INTENT(IN) :: variable_type
24996 INTEGER(INTG),
INTENT(IN) :: field_set_type
24997 INTEGER(INTG),
INTENT(IN) :: dof_number
24998 LOGICAL,
INTENT(IN) ::
VALUE 24999 INTEGER(INTG),
INTENT(OUT) :: err
25000 TYPE(varying_string),
INTENT(OUT) :: error
25002 TYPE(field_parameter_set_type),
POINTER :: parameter_set
25003 TYPE(field_variable_type),
POINTER :: field_variable
25004 TYPE(varying_string) :: local_error
25006 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_L",err,error,*999)
25009 IF(
ASSOCIATED(field))
THEN 25010 IF(field%FIELD_FINISHED)
THEN 25011 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 25012 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
25013 IF(
ASSOCIATED(field_variable))
THEN 25014 IF(field_variable%DATA_TYPE==field_l_type)
THEN 25015 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 25016 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
25017 IF(
ASSOCIATED(parameter_set))
THEN 25019 IF(dof_number>0.AND.dof_number<=field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL)
THEN 25020 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_number,
VALUE,err,error,*999)
25022 local_error=
"The field dof number of "//trim(number_to_vstring(dof_number,
"*",err,error))// &
25023 &
" is invalid. It must be >0 and <="// &
25024 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL,
"*",err,error))// &
25025 &
" for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25026 CALL flagerror(local_error,err,error,*999)
25029 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25030 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25031 CALL flagerror(local_error,err,error,*999)
25034 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25035 &
" is invalid. The field parameter set type must be between 1 and "// &
25036 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 25037 CALL flagerror(local_error,err,error,*999)
25040 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
25041 &
" does not correspond to the logical data type of the given value." 25042 CALL flagerror(local_error,err,error,*999)
25045 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25046 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25047 CALL flagerror(local_error,err,error,*999)
25050 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25051 &
" is invalid. The variable type must be between 1 and "// &
25052 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 25053 CALL flagerror(local_error,err,error,*999)
25056 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
25057 &
" has not been finished." 25058 CALL flagerror(local_error,err,error,*999)
25061 CALL flagerror(
"Field is not associated.",err,error,*999)
25064 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_L")
25066 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_L",err,error)
25068 END SUBROUTINE field_parameter_set_update_local_dof_l
25075 SUBROUTINE field_parameter_set_update_local_dofs_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VALUES,ERR,ERROR,*)
25078 TYPE(field_type),
POINTER :: field
25079 INTEGER(INTG),
INTENT(IN) :: variable_type
25080 INTEGER(INTG),
INTENT(IN) :: field_set_type
25081 REAL(DP),
INTENT(IN) :: values(:)
25082 INTEGER(INTG),
INTENT(OUT) :: err
25083 TYPE(varying_string),
INTENT(OUT) :: error
25085 INTEGER(INTG) :: dof
25086 TYPE(field_parameter_set_type),
POINTER :: parameter_set
25087 TYPE(field_variable_type),
POINTER :: field_variable
25088 TYPE(varying_string) :: local_error
25090 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOFS_DP",err,error,*999)
25092 IF(
ASSOCIATED(field))
THEN 25093 IF(field%FIELD_FINISHED)
THEN 25094 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 25095 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
25096 IF(
ASSOCIATED(field_variable))
THEN 25097 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 25098 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 25099 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
25100 IF(
ASSOCIATED(parameter_set))
THEN 25102 IF(
SIZE(values)==field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL)
THEN 25104 DO dof=1,field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL
25105 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof,values(dof),err,error,*999)
25108 local_error=
"The size of the parameter vector ("//trim(number_to_vstring(
SIZE(values),
"*",err,error))// &
25109 &
") does not match the number of dofs for this field ("// &
25110 & trim(number_to_vstring(field_variable%DOMAIN_MAPPING%NUMBER_OF_LOCAL,
"*",err,error))// &
25112 CALL flagerror(local_error,err,error,*999)
25115 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25116 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25117 CALL flagerror(local_error,err,error,*999)
25120 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25121 &
" is invalid. The field parameter set type must be between 1 and "// &
25122 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 25123 CALL flagerror(local_error,err,error,*999)
25126 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
25127 &
" does not correspond to the double precision data type of the given value." 25128 CALL flagerror(local_error,err,error,*999)
25131 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25132 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25133 CALL flagerror(local_error,err,error,*999)
25136 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25137 &
" is invalid. The variable type must be between 1 and "// &
25138 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 25139 CALL flagerror(local_error,err,error,*999)
25142 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
25143 &
" has not been finished." 25144 CALL flagerror(local_error,err,error,*999)
25147 CALL flagerror(
"Field is not associated.",err,error,*999)
25150 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_DP")
25152 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_DOF_DP",err,error)
25154 END SUBROUTINE field_parameter_set_update_local_dofs_dp
25161 SUBROUTINE field_parameter_set_update_element_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
25162 &
VALUE,err,error,*)
25165 TYPE(field_type),
POINTER :: field
25166 INTEGER(INTG),
INTENT(IN) :: variable_type
25167 INTEGER(INTG),
INTENT(IN) :: field_set_type
25168 INTEGER(INTG),
INTENT(IN) :: user_element_number
25169 INTEGER(INTG),
INTENT(IN) :: component_number
25170 INTEGER(INTG),
INTENT(IN) ::
VALUE 25171 INTEGER(INTG),
INTENT(OUT) :: err
25172 TYPE(varying_string),
INTENT(OUT) :: error
25174 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
25175 LOGICAL :: ghost_element,user_element_exists
25176 TYPE(decomposition_type),
POINTER :: decomposition
25177 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
25178 TYPE(field_parameter_set_type),
POINTER :: parameter_set
25179 TYPE(field_variable_type),
POINTER :: field_variable
25180 TYPE(varying_string) :: local_error
25182 enters(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_INTG",err,error,*999)
25184 IF(
ASSOCIATED(field))
THEN 25185 IF(field%FIELD_FINISHED)
THEN 25186 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 25187 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
25188 IF(
ASSOCIATED(field_variable))
THEN 25189 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 25190 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 25191 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
25192 IF(
ASSOCIATED(parameter_set))
THEN 25193 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 25194 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
25195 CASE(field_constant_interpolation)
25196 local_error=
"Can not update by element for component number "// &
25197 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25198 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25199 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 25200 CALL flagerror(local_error,err,error,*999)
25201 CASE(field_element_based_interpolation)
25202 decomposition=>field%DECOMPOSITION
25203 IF(
ASSOCIATED(decomposition))
THEN 25204 decomposition_topology=>decomposition%TOPOLOGY
25205 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
25206 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
25207 IF(user_element_exists)
THEN 25208 IF(ghost_element)
THEN 25209 local_error=
"Cannot update by element for user element "// &
25210 & trim(number_to_vstring(user_element_number,
"*",err,error))//
" as it is a ghost element." 25211 CALL flagerror(local_error,err,error,*999)
25213 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
25214 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
25215 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
25218 local_error=
"The specified user element number of "// &
25219 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
25220 &
" does not exist in the decomposition for field component number "// &
25221 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
25222 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25223 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25224 CALL flagerror(local_error,err,error,*999)
25227 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
25229 CASE(field_node_based_interpolation)
25230 local_error=
"Can not update by element for component number "// &
25231 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25232 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25233 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 25234 CALL flagerror(local_error,err,error,*999)
25235 CASE(field_grid_point_based_interpolation)
25236 local_error=
"Can not update by element for component number "// &
25237 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25238 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25240 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 25241 CALL flagerror(local_error,err,error,*999)
25242 CASE(field_gauss_point_based_interpolation)
25243 local_error=
"Can not update by element for component number "// &
25244 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25245 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25246 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 25247 CALL flagerror(local_error,err,error,*999)
25248 CASE(field_data_point_based_interpolation)
25249 local_error=
"Can not add element for component number "// &
25250 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25251 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25252 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 25253 CALL flagerror(local_error,err,error,*999)
25255 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
25256 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
25257 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25258 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25259 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25260 CALL flagerror(local_error,err,error,*999)
25263 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25264 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25265 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
25266 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 25267 CALL flagerror(local_error,err,error,*999)
25270 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25271 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
25272 CALL flagerror(local_error,err,error,*999)
25275 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25276 &
" is invalid. The field parameter set type must be between 1 and "// &
25277 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
25278 CALL flagerror(local_error,err,error,*999)
25281 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
25282 &
" does not correspond to the integer data type of the given value." 25283 CALL flagerror(local_error,err,error,*999)
25286 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25287 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25288 CALL flagerror(local_error,err,error,*999)
25291 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25292 &
" is invalid. The variable type must be between 1 and "// &
25293 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 25294 CALL flagerror(local_error,err,error,*999)
25297 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
25298 &
" has not been finished." 25299 CALL flagerror(local_error,err,error,*999)
25302 CALL flagerror(
"Field is not associated.",err,error,*999)
25305 exits(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_INTG")
25307 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_INTG",err,error)
25309 END SUBROUTINE field_parameter_set_update_element_intg
25316 SUBROUTINE field_parameter_set_update_element_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
25317 &
VALUE,err,error,*)
25320 TYPE(field_type),
POINTER :: field
25321 INTEGER(INTG),
INTENT(IN) :: variable_type
25322 INTEGER(INTG),
INTENT(IN) :: field_set_type
25323 INTEGER(INTG),
INTENT(IN) :: user_element_number
25324 INTEGER(INTG),
INTENT(IN) :: component_number
25325 REAL(SP),
INTENT(IN) ::
VALUE 25326 INTEGER(INTG),
INTENT(OUT) :: err
25327 TYPE(varying_string),
INTENT(OUT) :: error
25329 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
25330 LOGICAL :: ghost_element,user_element_exists
25331 TYPE(decomposition_type),
POINTER :: decomposition
25332 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
25333 TYPE(field_parameter_set_type),
POINTER :: parameter_set
25334 TYPE(field_variable_type),
POINTER :: field_variable
25335 TYPE(varying_string) :: local_error
25337 enters(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_SP",err,error,*999)
25339 IF(
ASSOCIATED(field))
THEN 25340 IF(field%FIELD_FINISHED)
THEN 25341 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 25342 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
25343 IF(
ASSOCIATED(field_variable))
THEN 25344 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 25345 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 25346 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
25347 IF(
ASSOCIATED(parameter_set))
THEN 25348 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 25349 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
25350 CASE(field_constant_interpolation)
25351 local_error=
"Can not update by element for component number "// &
25352 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25353 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25354 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 25355 CALL flagerror(local_error,err,error,*999)
25356 CASE(field_element_based_interpolation)
25357 decomposition=>field%DECOMPOSITION
25358 IF(
ASSOCIATED(decomposition))
THEN 25359 decomposition_topology=>decomposition%TOPOLOGY
25360 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
25361 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
25362 IF(user_element_exists)
THEN 25363 IF(ghost_element)
THEN 25364 local_error=
"Cannot update by element for user element "// &
25365 & trim(number_to_vstring(user_element_number,
"*",err,error))//
" as it is a ghost element." 25366 CALL flagerror(local_error,err,error,*999)
25368 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
25369 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
25370 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
25373 local_error=
"The specified user element number of "// &
25374 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
25375 &
" does not exist in the decomposition for field component number "// &
25376 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
25377 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25378 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25379 CALL flagerror(local_error,err,error,*999)
25382 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
25384 CASE(field_node_based_interpolation)
25385 local_error=
"Can not update by element for component number "// &
25386 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25387 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25388 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 25389 CALL flagerror(local_error,err,error,*999)
25390 CASE(field_grid_point_based_interpolation)
25391 local_error=
"Can not update by element for component number "// &
25392 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25393 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25394 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 25395 CALL flagerror(local_error,err,error,*999)
25396 CASE(field_gauss_point_based_interpolation)
25397 local_error=
"Can not update by element for component number "// &
25398 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25399 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25400 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 25401 CALL flagerror(local_error,err,error,*999)
25402 CASE(field_data_point_based_interpolation)
25403 local_error=
"Can not add element for component number "// &
25404 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25405 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25406 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 25407 CALL flagerror(local_error,err,error,*999)
25409 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
25410 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
25411 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25412 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25413 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25414 CALL flagerror(local_error,err,error,*999)
25417 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25418 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25419 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
25420 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 25421 CALL flagerror(local_error,err,error,*999)
25424 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25425 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
25426 CALL flagerror(local_error,err,error,*999)
25429 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25430 &
" is invalid. The field parameter set type must be between 1 and "// &
25431 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
25432 CALL flagerror(local_error,err,error,*999)
25435 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
25436 &
" does not correspond to the single precision data type of the given value." 25437 CALL flagerror(local_error,err,error,*999)
25440 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25441 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25442 CALL flagerror(local_error,err,error,*999)
25445 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25446 &
" is invalid. The variable type must be between 1 and "// &
25447 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 25448 CALL flagerror(local_error,err,error,*999)
25451 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
25452 &
" has not been finished." 25453 CALL flagerror(local_error,err,error,*999)
25456 CALL flagerror(
"Field is not associated.",err,error,*999)
25459 exits(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_SP")
25461 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_SP",err,error)
25463 END SUBROUTINE field_parameter_set_update_element_sp
25470 SUBROUTINE field_parameter_set_update_element_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
25471 &
VALUE,err,error,*)
25474 TYPE(field_type),
POINTER :: field
25475 INTEGER(INTG),
INTENT(IN) :: variable_type
25476 INTEGER(INTG),
INTENT(IN) :: field_set_type
25477 INTEGER(INTG),
INTENT(IN) :: user_element_number
25478 INTEGER(INTG),
INTENT(IN) :: component_number
25479 REAL(DP),
INTENT(IN) ::
VALUE 25480 INTEGER(INTG),
INTENT(OUT) :: err
25481 TYPE(varying_string),
INTENT(OUT) :: error
25483 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
25484 LOGICAL :: ghost_element,user_element_exists
25485 TYPE(decomposition_type),
POINTER :: decomposition
25486 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
25487 TYPE(field_parameter_set_type),
POINTER :: parameter_set
25488 TYPE(field_variable_type),
POINTER :: field_variable
25489 TYPE(varying_string) :: local_error
25491 enters(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_DP",err,error,*999)
25493 IF(
ASSOCIATED(field))
THEN 25494 IF(field%FIELD_FINISHED)
THEN 25495 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 25496 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
25497 IF(
ASSOCIATED(field_variable))
THEN 25498 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 25499 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 25500 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
25501 IF(
ASSOCIATED(parameter_set))
THEN 25502 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 25503 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
25504 CASE(field_constant_interpolation)
25505 local_error=
"Can not update by element for component number "// &
25506 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25507 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25508 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 25509 CALL flagerror(local_error,err,error,*999)
25510 CASE(field_element_based_interpolation)
25511 decomposition=>field%DECOMPOSITION
25512 IF(
ASSOCIATED(decomposition))
THEN 25513 decomposition_topology=>decomposition%TOPOLOGY
25514 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
25515 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
25516 IF(user_element_exists)
THEN 25517 IF(ghost_element)
THEN 25518 local_error=
"Cannot update by element for user element "// &
25519 & trim(number_to_vstring(user_element_number,
"*",err,error))//
" as it is a ghost element." 25520 CALL flagerror(local_error,err,error,*999)
25522 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
25523 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
25524 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
25527 local_error=
"The specified user element number of "// &
25528 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
25529 &
" does not exist in the decomposition for field component number "// &
25530 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
25531 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25532 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25533 CALL flagerror(local_error,err,error,*999)
25536 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
25538 CASE(field_node_based_interpolation)
25539 local_error=
"Can not update by element for component number "// &
25540 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25541 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25542 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 25543 CALL flagerror(local_error,err,error,*999)
25544 CASE(field_grid_point_based_interpolation)
25545 local_error=
"Can not update by element for component number "// &
25546 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25547 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25548 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 25549 CALL flagerror(local_error,err,error,*999)
25550 CASE(field_gauss_point_based_interpolation)
25551 local_error=
"Can not update by element for component number "// &
25552 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25553 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25554 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 25555 CALL flagerror(local_error,err,error,*999)
25556 CASE(field_data_point_based_interpolation)
25557 local_error=
"Can not add element for component number "// &
25558 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25559 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25560 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 25561 CALL flagerror(local_error,err,error,*999)
25563 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
25564 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
25565 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25566 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25567 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25568 CALL flagerror(local_error,err,error,*999)
25571 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25572 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25573 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
25574 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 25575 CALL flagerror(local_error,err,error,*999)
25578 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25579 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
25580 CALL flagerror(local_error,err,error,*999)
25583 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25584 &
" is invalid. The field parameter set type must be between 1 and "// &
25585 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
25586 CALL flagerror(local_error,err,error,*999)
25589 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
25590 &
" does not correspond to the double precision data type of the given value." 25591 CALL flagerror(local_error,err,error,*999)
25594 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25595 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25596 CALL flagerror(local_error,err,error,*999)
25599 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25600 &
" is invalid. The variable type must be between 1 and "// &
25601 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 25602 CALL flagerror(local_error,err,error,*999)
25605 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
25606 &
" has not been finished." 25607 CALL flagerror(local_error,err,error,*999)
25610 CALL flagerror(
"Field is not associated.",err,error,*999)
25613 exits(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_DP")
25615 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_DP",err,error)
25617 END SUBROUTINE field_parameter_set_update_element_dp
25624 SUBROUTINE field_parameter_set_update_element_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,USER_ELEMENT_NUMBER,COMPONENT_NUMBER, &
25625 &
VALUE,err,error,*)
25628 TYPE(field_type),
POINTER :: field
25629 INTEGER(INTG),
INTENT(IN) :: variable_type
25630 INTEGER(INTG),
INTENT(IN) :: field_set_type
25631 INTEGER(INTG),
INTENT(IN) :: user_element_number
25632 INTEGER(INTG),
INTENT(IN) :: component_number
25633 LOGICAL,
INTENT(IN) ::
VALUE 25634 INTEGER(INTG),
INTENT(OUT) :: err
25635 TYPE(varying_string),
INTENT(OUT) :: error
25637 INTEGER(INTG) :: decomposition_local_element_number,dof_idx
25638 LOGICAL :: ghost_element,user_element_exists
25639 TYPE(decomposition_type),
POINTER :: decomposition
25640 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
25641 TYPE(field_parameter_set_type),
POINTER :: parameter_set
25642 TYPE(field_variable_type),
POINTER :: field_variable
25643 TYPE(varying_string) :: local_error
25645 enters(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_L",err,error,*999)
25647 IF(
ASSOCIATED(field))
THEN 25648 IF(field%FIELD_FINISHED)
THEN 25649 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 25650 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
25651 IF(
ASSOCIATED(field_variable))
THEN 25652 IF(field_variable%DATA_TYPE==field_l_type)
THEN 25653 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 25654 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
25655 IF(
ASSOCIATED(parameter_set))
THEN 25656 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 25657 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
25658 CASE(field_constant_interpolation)
25659 local_error=
"Can not update by element for component number "// &
25660 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25661 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25662 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 25663 CALL flagerror(local_error,err,error,*999)
25664 CASE(field_element_based_interpolation)
25665 decomposition=>field%DECOMPOSITION
25666 IF(
ASSOCIATED(decomposition))
THEN 25667 decomposition_topology=>decomposition%TOPOLOGY
25668 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
25669 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
25670 IF(user_element_exists)
THEN 25671 IF(ghost_element)
THEN 25672 local_error=
"Cannot update by element for user element "// &
25673 & trim(number_to_vstring(user_element_number,
"*",err,error))//
" as it is a ghost element." 25674 CALL flagerror(local_error,err,error,*999)
25676 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
25677 & element_param2dof_map%ELEMENTS(decomposition_local_element_number)
25678 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
25681 local_error=
"The specified user element number of "// &
25682 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
25683 &
" does not exist in the decomposition for field component number "// &
25684 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
25685 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25686 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25687 CALL flagerror(local_error,err,error,*999)
25690 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
25692 CASE(field_node_based_interpolation)
25693 local_error=
"Can not update by element for component number "// &
25694 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25695 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25696 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 25697 CALL flagerror(local_error,err,error,*999)
25698 CASE(field_grid_point_based_interpolation)
25699 local_error=
"Can not update by element for component number "// &
25700 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25701 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25702 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 25703 CALL flagerror(local_error,err,error,*999)
25704 CASE(field_gauss_point_based_interpolation)
25705 local_error=
"Can not update by element for component number "// &
25706 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25707 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25708 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 25709 CALL flagerror(local_error,err,error,*999)
25710 CASE(field_data_point_based_interpolation)
25711 local_error=
"Can not add element for component number "// &
25712 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25713 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25714 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 25715 CALL flagerror(local_error,err,error,*999)
25717 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
25718 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
25719 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25720 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25721 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25722 CALL flagerror(local_error,err,error,*999)
25725 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25726 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25727 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
25728 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 25729 CALL flagerror(local_error,err,error,*999)
25732 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25733 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
25734 CALL flagerror(local_error,err,error,*999)
25737 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25738 &
" is invalid. The field parameter set type must be between 1 and "// &
25739 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
25740 CALL flagerror(local_error,err,error,*999)
25743 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
25744 &
" does not correspond to the logical data type of the given value." 25745 CALL flagerror(local_error,err,error,*999)
25748 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25749 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25750 CALL flagerror(local_error,err,error,*999)
25753 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25754 &
" is invalid. The variable type must be between 1 and "// &
25755 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 25756 CALL flagerror(local_error,err,error,*999)
25759 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
25760 &
" has not been finished." 25761 CALL flagerror(local_error,err,error,*999)
25764 CALL flagerror(
"Field is not associated.",err,error,*999)
25767 exits(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_L")
25769 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_ELEMENT_L",err,error)
25771 END SUBROUTINE field_parameter_set_update_element_l
25778 SUBROUTINE field_parametersetupdatelocalelementintg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,LOCAL_ELEMENT_NUMBER, &
25779 & component_number,
VALUE,err,error,*)
25782 TYPE(field_type),
POINTER :: field
25783 INTEGER(INTG),
INTENT(IN) :: variable_type
25784 INTEGER(INTG),
INTENT(IN) :: field_set_type
25785 INTEGER(INTG),
INTENT(IN) :: local_element_number
25786 INTEGER(INTG),
INTENT(IN) :: component_number
25787 INTEGER(INTG),
INTENT(IN) ::
VALUE 25788 INTEGER(INTG),
INTENT(OUT) :: err
25789 TYPE(varying_string),
INTENT(OUT) :: error
25791 INTEGER(INTG) :: ny
25792 TYPE(field_parameter_set_type),
POINTER :: parameter_set
25793 TYPE(field_variable_type),
POINTER :: field_variable
25794 TYPE(varying_string) :: local_error
25796 enters(
"Field_ParameterSetUpdateLocalElementIntg",err,error,*999)
25798 IF(
ASSOCIATED(field))
THEN 25799 IF(field%FIELD_FINISHED)
THEN 25800 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 25801 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
25802 IF(
ASSOCIATED(field_variable))
THEN 25803 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 25804 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 25805 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
25806 IF(
ASSOCIATED(parameter_set))
THEN 25807 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 25808 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
25809 CASE(field_constant_interpolation)
25810 local_error=
"Can not update by element for component number "// &
25811 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25812 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25813 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 25814 CALL flagerror(local_error,err,error,*999)
25815 CASE(field_element_based_interpolation)
25816 IF(local_element_number>0.AND.local_element_number<=field_variable%COMPONENTS(component_number)% &
25817 & param_to_dof_map%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS)
THEN 25818 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS( &
25819 & local_element_number)
25820 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
25822 local_error=
"Local element number "//trim(number_to_vstring(local_element_number,
"*",err,error))// &
25823 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25824 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25825 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
25826 &
" which has "//trim(number_to_vstring(field_variable%COMPONENTS(component_number)% &
25827 & param_to_dof_map%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" elements." 25828 CALL flagerror(local_error,err,error,*999)
25830 CASE(field_node_based_interpolation)
25831 local_error=
"Can not update by element for component number "// &
25832 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25833 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25834 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 25835 CALL flagerror(local_error,err,error,*999)
25836 CASE(field_grid_point_based_interpolation)
25837 local_error=
"Can not update by element for component number "// &
25838 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25839 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25840 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 25842 CALL flagerror(local_error,err,error,*999)
25843 CASE(field_gauss_point_based_interpolation)
25844 local_error=
"Can not update by element for component number "// &
25845 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25846 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25847 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 25848 CALL flagerror(local_error,err,error,*999)
25849 CASE(field_data_point_based_interpolation)
25850 local_error=
"Can not add element for component number "// &
25851 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25852 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25853 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 25854 CALL flagerror(local_error,err,error,*999)
25856 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
25857 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
25858 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25859 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25860 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25861 CALL flagerror(local_error,err,error,*999)
25864 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25865 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25866 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
25867 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 25868 CALL flagerror(local_error,err,error,*999)
25871 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25872 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
25873 CALL flagerror(local_error,err,error,*999)
25876 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
25877 &
" is invalid. The field parameter set type must be between 1 and "// &
25878 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
25879 CALL flagerror(local_error,err,error,*999)
25882 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
25883 &
" does not correspond to the integer data type of the given value." 25884 CALL flagerror(local_error,err,error,*999)
25887 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25888 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 25889 CALL flagerror(local_error,err,error,*999)
25892 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25893 &
" is invalid. The variable type must be between 1 and "// &
25894 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 25895 CALL flagerror(local_error,err,error,*999)
25898 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
25899 &
" has not been finished." 25900 CALL flagerror(local_error,err,error,*999)
25903 CALL flagerror(
"Field is not associated.",err,error,*999)
25906 exits(
"Field_ParameterSetUpdateLocalElementIntg")
25908 999 errorsexits(
"Field_ParameterSetUpdateLocalElementIntg",err,error)
25911 END SUBROUTINE field_parametersetupdatelocalelementintg
25918 SUBROUTINE field_parameter_set_update_local_element_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,LOCAL_ELEMENT_NUMBER,COMPONENT_NUMBER, &
25919 &
VALUE,err,error,*)
25922 TYPE(field_type),
POINTER :: field
25923 INTEGER(INTG),
INTENT(IN) :: variable_type
25924 INTEGER(INTG),
INTENT(IN) :: field_set_type
25925 INTEGER(INTG),
INTENT(IN) :: local_element_number
25926 INTEGER(INTG),
INTENT(IN) :: component_number
25927 REAL(SP),
INTENT(IN) ::
VALUE 25928 INTEGER(INTG),
INTENT(OUT) :: err
25929 TYPE(varying_string),
INTENT(OUT) :: error
25931 INTEGER(INTG) :: ny
25932 TYPE(field_parameter_set_type),
POINTER :: parameter_set
25933 TYPE(field_variable_type),
POINTER :: field_variable
25934 TYPE(varying_string) :: local_error
25936 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_ELEMENT_SP",err,error,*999)
25938 IF(
ASSOCIATED(field))
THEN 25939 IF(field%FIELD_FINISHED)
THEN 25940 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 25941 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
25942 IF(
ASSOCIATED(field_variable))
THEN 25943 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 25944 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 25945 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
25946 IF(
ASSOCIATED(parameter_set))
THEN 25947 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 25948 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
25949 CASE(field_constant_interpolation)
25950 local_error=
"Can not update by element for component number "// &
25951 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25952 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25953 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 25954 CALL flagerror(local_error,err,error,*999)
25955 CASE(field_element_based_interpolation)
25956 IF(local_element_number>0.AND.local_element_number<=field_variable%COMPONENTS(component_number)% &
25957 & param_to_dof_map%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS)
THEN 25958 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS( &
25959 & local_element_number)
25960 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
25962 local_error=
"Local element number "//trim(number_to_vstring(local_element_number,
"*",err,error))// &
25963 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25964 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25965 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
25966 &
" which has "//trim(number_to_vstring(field_variable%COMPONENTS(component_number)% &
25967 & param_to_dof_map%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" elements." 25968 CALL flagerror(local_error,err,error,*999)
25970 CASE(field_node_based_interpolation)
25971 local_error=
"Can not update by element for component number "// &
25972 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25973 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25974 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 25975 CALL flagerror(local_error,err,error,*999)
25976 CASE(field_grid_point_based_interpolation)
25977 local_error=
"Can not update by element for component number "// &
25978 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25979 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25980 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 25981 CALL flagerror(local_error,err,error,*999)
25982 CASE(field_gauss_point_based_interpolation)
25983 local_error=
"Can not update by element for component number "// &
25984 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25985 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25986 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 25987 CALL flagerror(local_error,err,error,*999)
25988 CASE(field_data_point_based_interpolation)
25989 local_error=
"Can not add element for component number "// &
25990 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
25991 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
25992 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 25993 CALL flagerror(local_error,err,error,*999)
25995 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
25996 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
25997 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
25998 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
25999 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26000 CALL flagerror(local_error,err,error,*999)
26003 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26004 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26005 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
26006 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 26007 CALL flagerror(local_error,err,error,*999)
26010 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26011 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
26012 CALL flagerror(local_error,err,error,*999)
26015 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26016 &
" is invalid. The field parameter set type must be between 1 and "// &
26017 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
26018 CALL flagerror(local_error,err,error,*999)
26021 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
26022 &
" does not correspond to the single precision data type of the given value." 26023 CALL flagerror(local_error,err,error,*999)
26026 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26027 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26028 CALL flagerror(local_error,err,error,*999)
26031 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26032 &
" is invalid. The variable type must be between 1 and "// &
26033 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 26034 CALL flagerror(local_error,err,error,*999)
26037 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
26038 &
" has not been finished." 26039 CALL flagerror(local_error,err,error,*999)
26042 CALL flagerror(
"Field is not associated.",err,error,*999)
26045 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_ELEMENT_SP")
26047 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_ELEMENT_SP",err,error)
26049 END SUBROUTINE field_parameter_set_update_local_element_sp
26056 SUBROUTINE field_parameter_set_update_local_element_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,LOCAL_ELEMENT_NUMBER,COMPONENT_NUMBER, &
26057 &
VALUE,err,error,*)
26060 TYPE(field_type),
POINTER :: field
26061 INTEGER(INTG),
INTENT(IN) :: variable_type
26062 INTEGER(INTG),
INTENT(IN) :: field_set_type
26063 INTEGER(INTG),
INTENT(IN) :: local_element_number
26064 INTEGER(INTG),
INTENT(IN) :: component_number
26065 REAL(DP),
INTENT(IN) ::
VALUE 26066 INTEGER(INTG),
INTENT(OUT) :: err
26067 TYPE(varying_string),
INTENT(OUT) :: error
26069 INTEGER(INTG) :: ny
26070 TYPE(field_parameter_set_type),
POINTER :: parameter_set
26071 TYPE(field_variable_type),
POINTER :: field_variable
26072 TYPE(varying_string) :: local_error
26074 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_ELEMENT_DP",err,error,*999)
26076 IF(
ASSOCIATED(field))
THEN 26077 IF(field%FIELD_FINISHED)
THEN 26078 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 26079 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
26080 IF(
ASSOCIATED(field_variable))
THEN 26081 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 26082 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 26083 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
26084 IF(
ASSOCIATED(parameter_set))
THEN 26085 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 26086 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
26087 CASE(field_constant_interpolation)
26088 local_error=
"Can not update by element for component number "// &
26089 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26090 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26091 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 26092 CALL flagerror(local_error,err,error,*999)
26093 CASE(field_element_based_interpolation)
26094 IF(local_element_number>0.AND.local_element_number<=field_variable%COMPONENTS(component_number)% &
26095 & param_to_dof_map%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS)
THEN 26096 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS( &
26097 & local_element_number)
26098 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
26100 local_error=
"Local element number "//trim(number_to_vstring(local_element_number,
"*",err,error))// &
26101 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26102 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26103 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
26104 &
" which has "//trim(number_to_vstring(field_variable%COMPONENTS(component_number)% &
26105 & param_to_dof_map%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" elements." 26106 CALL flagerror(local_error,err,error,*999)
26108 CASE(field_node_based_interpolation)
26109 local_error=
"Can not update by element for component number "// &
26110 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26111 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26112 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 26113 CALL flagerror(local_error,err,error,*999)
26114 CASE(field_grid_point_based_interpolation)
26115 local_error=
"Can not update by element for component number "// &
26116 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26117 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26118 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 26119 CALL flagerror(local_error,err,error,*999)
26120 CASE(field_gauss_point_based_interpolation)
26121 local_error=
"Can not update by element for component number "// &
26122 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26123 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26124 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 26125 CALL flagerror(local_error,err,error,*999)
26126 CASE(field_data_point_based_interpolation)
26127 local_error=
"Can not add element for component number "// &
26128 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26129 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26130 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 26131 CALL flagerror(local_error,err,error,*999)
26133 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
26134 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
26135 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26136 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26137 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26138 CALL flagerror(local_error,err,error,*999)
26141 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26142 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26143 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
26144 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 26145 CALL flagerror(local_error,err,error,*999)
26148 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26149 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
26150 CALL flagerror(local_error,err,error,*999)
26153 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26154 &
" is invalid. The field parameter set type must be between 1 and "// &
26155 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
26156 CALL flagerror(local_error,err,error,*999)
26159 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
26160 &
" does not correspond to the double precision data type of the given value." 26161 CALL flagerror(local_error,err,error,*999)
26164 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26165 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26166 CALL flagerror(local_error,err,error,*999)
26169 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26170 &
" is invalid. The variable type must be between 1 and "// &
26171 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 26172 CALL flagerror(local_error,err,error,*999)
26175 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
26176 &
" has not been finished." 26177 CALL flagerror(local_error,err,error,*999)
26180 CALL flagerror(
"Field is not associated.",err,error,*999)
26183 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_ELEMENT_DP")
26185 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_ELEMENT_DP",err,error)
26187 END SUBROUTINE field_parameter_set_update_local_element_dp
26194 SUBROUTINE field_parameter_set_update_local_element_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,LOCAL_ELEMENT_NUMBER,COMPONENT_NUMBER, &
26195 &
VALUE,err,error,*)
26198 TYPE(field_type),
POINTER :: field
26199 INTEGER(INTG),
INTENT(IN) :: variable_type
26200 INTEGER(INTG),
INTENT(IN) :: field_set_type
26201 INTEGER(INTG),
INTENT(IN) :: local_element_number
26202 INTEGER(INTG),
INTENT(IN) :: component_number
26203 LOGICAL,
INTENT(IN) ::
VALUE 26204 INTEGER(INTG),
INTENT(OUT) :: err
26205 TYPE(varying_string),
INTENT(OUT) :: error
26207 INTEGER(INTG) :: ny
26208 TYPE(field_parameter_set_type),
POINTER :: parameter_set
26209 TYPE(field_variable_type),
POINTER :: field_variable
26210 TYPE(varying_string) :: local_error
26212 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_ELEMENT_L",err,error,*999)
26214 IF(
ASSOCIATED(field))
THEN 26215 IF(field%FIELD_FINISHED)
THEN 26216 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 26217 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
26218 IF(
ASSOCIATED(field_variable))
THEN 26219 IF(field_variable%DATA_TYPE==field_l_type)
THEN 26220 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 26221 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
26222 IF(
ASSOCIATED(parameter_set))
THEN 26223 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 26224 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
26225 CASE(field_constant_interpolation)
26226 local_error=
"Can not update by element for component number "// &
26227 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26228 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26229 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 26230 CALL flagerror(local_error,err,error,*999)
26231 CASE(field_element_based_interpolation)
26232 IF(local_element_number>0.AND.local_element_number<=field_variable%COMPONENTS(component_number)% &
26233 & param_to_dof_map%ELEMENT_PARAM2DOF_MAP%NUMBER_OF_ELEMENT_PARAMETERS)
THEN 26234 ny=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%ELEMENT_PARAM2DOF_MAP%ELEMENTS( &
26235 & local_element_number)
26236 CALL distributed_vector_values_set(parameter_set%PARAMETERS,ny,
VALUE,err,error,*999)
26238 local_error=
"Local element number "//trim(number_to_vstring(local_element_number,
"*",err,error))// &
26239 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26240 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26241 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
26242 &
" which has "//trim(number_to_vstring(field_variable%COMPONENTS(component_number)% &
26243 & param_to_dof_map%NODE_PARAM2DOF_MAP%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" elements." 26244 CALL flagerror(local_error,err,error,*999)
26246 CASE(field_node_based_interpolation)
26247 local_error=
"Can not update by element for component number "// &
26248 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26249 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26250 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 26251 CALL flagerror(local_error,err,error,*999)
26252 CASE(field_grid_point_based_interpolation)
26253 local_error=
"Can not update by element for component number "// &
26254 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26255 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26256 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 26257 CALL flagerror(local_error,err,error,*999)
26258 CASE(field_gauss_point_based_interpolation)
26259 local_error=
"Can not update by element for component number "// &
26260 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26261 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26262 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 26263 CALL flagerror(local_error,err,error,*999)
26264 CASE(field_data_point_based_interpolation)
26265 local_error=
"Can not add element for component number "// &
26266 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26267 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26268 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 26269 CALL flagerror(local_error,err,error,*999)
26271 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
26272 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
26273 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26274 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26275 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26276 CALL flagerror(local_error,err,error,*999)
26279 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26280 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26281 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
26282 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 26283 CALL flagerror(local_error,err,error,*999)
26286 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26287 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))
26288 CALL flagerror(local_error,err,error,*999)
26291 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26292 &
" is invalid. The field parameter set type must be between 1 and "// &
26293 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))
26294 CALL flagerror(local_error,err,error,*999)
26297 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
26298 &
" does not correspond to the logical data type of the given value." 26299 CALL flagerror(local_error,err,error,*999)
26302 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26303 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26304 CALL flagerror(local_error,err,error,*999)
26307 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26308 &
" is invalid. The variable type must be between 1 and "// &
26309 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 26310 CALL flagerror(local_error,err,error,*999)
26313 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
26314 &
" has not been finished." 26315 CALL flagerror(local_error,err,error,*999)
26318 CALL flagerror(
"Field is not associated.",err,error,*999)
26321 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_ELEMENT_L")
26323 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_ELEMENT_L",err,error)
26325 END SUBROUTINE field_parameter_set_update_local_element_l
26332 SUBROUTINE field_parameter_set_update_finish(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,ERR,ERROR,*)
26335 TYPE(field_type),
POINTER :: field
26336 INTEGER(INTG),
INTENT(IN) :: variable_type
26337 INTEGER(INTG),
INTENT(IN) :: field_set_type
26338 INTEGER(INTG),
INTENT(OUT) :: err
26339 TYPE(varying_string),
INTENT(OUT) :: error
26341 TYPE(field_parameter_set_type),
POINTER :: parameter_set
26342 TYPE(field_variable_type),
POINTER :: field_variable
26343 TYPE(varying_string) :: local_error
26345 enters(
"FIELD_PARAMETER_SET_UPDATE_FINISH",err,error,*999)
26347 IF(
ASSOCIATED(field))
THEN 26348 IF(field%FIELD_FINISHED)
THEN 26349 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 26350 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
26351 IF(
ASSOCIATED(field_variable))
THEN 26352 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 26353 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
26354 IF(
ASSOCIATED(parameter_set))
THEN 26355 CALL distributed_vector_update_finish(parameter_set%PARAMETERS,err,error,*999)
26356 IF(field%TYPE==field_geometric_type.AND.field_set_type==field_values_set_type)
THEN 26358 CALL field_geometric_parameters_calculate(field,err,error,*999)
26361 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26362 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26363 CALL flagerror(local_error,err,error,*999)
26366 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26367 &
" is invalid. The field parameter set type must be between 1 and "// &
26368 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 26369 CALL flagerror(local_error,err,error,*999)
26372 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26373 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26374 CALL flagerror(local_error,err,error,*999)
26377 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26378 &
" is invalid. The variable type must be between 1 and "// &
26379 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 26380 CALL flagerror(local_error,err,error,*999)
26383 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
26384 &
" has not been finished." 26385 CALL flagerror(local_error,err,error,*999)
26388 CALL flagerror(
"Field is not associated.",err,error,*999)
26391 exits(
"FIELD_PARAMETER_SET_UPDATE_FINISH")
26393 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_FINISH",err,error)
26395 END SUBROUTINE field_parameter_set_update_finish
26402 SUBROUTINE field_parameter_set_update_node_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
26403 & user_node_number,component_number,
VALUE,err,error,*)
26406 TYPE(field_type),
POINTER :: field
26407 INTEGER(INTG),
INTENT(IN) :: variable_type
26408 INTEGER(INTG),
INTENT(IN) :: field_set_type
26409 INTEGER(INTG),
INTENT(IN) :: version_number
26410 INTEGER(INTG),
INTENT(IN) :: derivative_number
26411 INTEGER(INTG),
INTENT(IN) :: user_node_number
26412 INTEGER(INTG),
INTENT(IN) :: component_number
26413 INTEGER(INTG),
INTENT(IN) ::
VALUE 26414 INTEGER(INTG),
INTENT(OUT) :: err
26415 TYPE(varying_string),
INTENT(OUT) :: error
26417 INTEGER(INTG) :: domain_local_node_number,dof_idx
26418 LOGICAL :: ghost_node,user_node_exists
26419 TYPE(domain_type),
POINTER :: domain
26420 TYPE(domain_nodes_type),
POINTER :: domain_nodes
26421 TYPE(domain_topology_type),
POINTER :: domain_topology
26422 TYPE(field_parameter_set_type),
POINTER :: parameter_set
26423 TYPE(field_variable_type),
POINTER :: field_variable
26424 TYPE(varying_string) :: local_error
26426 enters(
"FIELD_PARAMETER_SET_UPDATE_NODE_INTG",err,error,*999)
26428 IF(
ASSOCIATED(field))
THEN 26429 IF(field%FIELD_FINISHED)
THEN 26430 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 26431 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
26432 IF(
ASSOCIATED(field_variable))
THEN 26433 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 26434 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 26435 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
26436 IF(
ASSOCIATED(parameter_set))
THEN 26437 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 26438 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
26439 CASE(field_constant_interpolation)
26440 local_error=
"Can not update by node for component number "// &
26441 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26442 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26443 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 26444 CALL flagerror(local_error,err,error,*999)
26445 CASE(field_element_based_interpolation)
26446 local_error=
"Can not update by node for component number "// &
26447 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26448 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26449 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 26450 CALL flagerror(local_error,err,error,*999)
26451 CASE(field_node_based_interpolation)
26452 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
26453 IF(
ASSOCIATED(domain))
THEN 26454 domain_topology=>domain%TOPOLOGY
26455 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
26456 & domain_local_node_number,ghost_node,err,error,*999)
26457 IF(user_node_exists)
THEN 26458 IF(ghost_node)
THEN 26459 local_error=
"Cannot update by node for user node "// &
26460 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" as it is a ghost node." 26461 CALL flagerror(local_error,err,error,*999)
26463 domain_nodes=>domain_topology%NODES
26464 IF(
ASSOCIATED(domain_nodes))
THEN 26465 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
26466 & number_of_derivatives)
THEN 26467 IF(version_number>0.AND.version_number<= &
26468 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
26469 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
26470 & number_of_versions)
THEN 26471 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
26472 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
26473 & versions(version_number)
26474 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
26476 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
26477 &
" is invalid for derivative number "// &
26478 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
26479 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
26480 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26481 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26482 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
26483 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
26484 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
26485 &
"(note version numbers are indexed directly from the value the user specifies during "// &
26486 &
"element creation and no record is kept of the total number of versions the user sets."// &
26487 &
"The maximum version number the user sets defines the total number of versions allocated)." 26488 CALL flagerror(local_error,err,error,*999)
26491 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
26492 &
" is invalid for user node number "// &
26493 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
26494 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26495 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26496 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
26497 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
26498 & number_of_derivatives,
"*",err,error))//
" derivatives." 26499 CALL flagerror(local_error,err,error,*999)
26504 local_error=
"The specified user node number of "// &
26505 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
26506 &
" does not exist in the domain for field component number "// &
26507 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
26508 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26509 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26510 CALL flagerror(local_error,err,error,*999)
26513 CALL flagerror(
"Domain is not associated.",err,error,*999)
26515 CASE(field_grid_point_based_interpolation)
26516 local_error=
"Can not update by node for component number "// &
26517 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26518 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26519 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 26520 CALL flagerror(local_error,err,error,*999)
26521 CASE(field_gauss_point_based_interpolation)
26522 local_error=
"Can not update by node for component number "// &
26523 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26524 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26525 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 26526 CALL flagerror(local_error,err,error,*999)
26527 CASE(field_data_point_based_interpolation)
26528 local_error=
"Can not add element for component number "// &
26529 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26530 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26531 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 26532 CALL flagerror(local_error,err,error,*999)
26534 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
26535 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
26536 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26537 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26538 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26539 CALL flagerror(local_error,err,error,*999)
26542 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26543 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26544 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
26545 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
26547 CALL flagerror(local_error,err,error,*999)
26550 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26551 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26552 CALL flagerror(local_error,err,error,*999)
26555 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26556 &
" is invalid. The field parameter set type must be between 1 and "// &
26557 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 26558 CALL flagerror(local_error,err,error,*999)
26561 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
26562 &
" does not correspond to the integer data type of the given value." 26563 CALL flagerror(local_error,err,error,*999)
26566 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26567 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26568 CALL flagerror(local_error,err,error,*999)
26571 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26572 &
" is invalid. The variable type must be between 1 and "// &
26573 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 26574 CALL flagerror(local_error,err,error,*999)
26577 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
26578 &
" has not been finished." 26579 CALL flagerror(local_error,err,error,*999)
26582 CALL flagerror(
"Field is not associated.",err,error,*999)
26585 exits(
"FIELD_PARAMETER_SET_UPDATE_NODE_INTG")
26587 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_NODE_INTG",err,error)
26589 END SUBROUTINE field_parameter_set_update_node_intg
26596 SUBROUTINE field_parameter_set_update_node_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
26597 & user_node_number,component_number,
VALUE,err,error,*)
26600 TYPE(field_type),
POINTER :: field
26601 INTEGER(INTG),
INTENT(IN) :: variable_type
26602 INTEGER(INTG),
INTENT(IN) :: field_set_type
26603 INTEGER(INTG),
INTENT(IN) :: version_number
26604 INTEGER(INTG),
INTENT(IN) :: derivative_number
26605 INTEGER(INTG),
INTENT(IN) :: user_node_number
26606 INTEGER(INTG),
INTENT(IN) :: component_number
26607 REAL(SP),
INTENT(IN) ::
VALUE 26608 INTEGER(INTG),
INTENT(OUT) :: err
26609 TYPE(varying_string),
INTENT(OUT) :: error
26611 INTEGER(INTG) :: domain_local_node_number,dof_idx
26612 LOGICAL :: ghost_node,user_node_exists
26613 TYPE(domain_type),
POINTER :: domain
26614 TYPE(domain_nodes_type),
POINTER :: domain_nodes
26615 TYPE(domain_topology_type),
POINTER :: domain_topology
26616 TYPE(field_parameter_set_type),
POINTER :: parameter_set
26617 TYPE(field_variable_type),
POINTER :: field_variable
26618 TYPE(varying_string) :: local_error
26620 enters(
"FIELD_PARAMETER_SET_UPDATE_NODE_SP",err,error,*999)
26622 IF(
ASSOCIATED(field))
THEN 26623 IF(field%FIELD_FINISHED)
THEN 26624 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 26625 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
26626 IF(
ASSOCIATED(field_variable))
THEN 26627 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 26628 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 26629 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
26630 IF(
ASSOCIATED(parameter_set))
THEN 26631 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 26632 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
26633 CASE(field_constant_interpolation)
26634 local_error=
"Can not update by node for component number "// &
26635 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26636 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26637 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 26638 CALL flagerror(local_error,err,error,*999)
26639 CASE(field_element_based_interpolation)
26640 local_error=
"Can not update by node for component number "// &
26641 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26642 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26643 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 26644 CALL flagerror(local_error,err,error,*999)
26645 CASE(field_node_based_interpolation)
26646 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
26647 IF(
ASSOCIATED(domain))
THEN 26648 domain_topology=>domain%TOPOLOGY
26649 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
26650 & domain_local_node_number,ghost_node,err,error,*999)
26651 IF(user_node_exists)
THEN 26652 IF(ghost_node)
THEN 26653 local_error=
"Cannot update by node for user node "// &
26654 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" as it is a ghost node." 26655 CALL flagerror(local_error,err,error,*999)
26657 domain_nodes=>domain_topology%NODES
26658 IF(
ASSOCIATED(domain_nodes))
THEN 26659 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
26660 & number_of_derivatives)
THEN 26661 IF(version_number>0.AND.version_number<= &
26662 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
26663 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
26664 & number_of_versions)
THEN 26665 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
26666 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
26667 & versions(version_number)
26668 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
26670 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
26671 &
" is invalid for derivative number "// &
26672 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
26673 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
26674 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26675 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26676 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
26677 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
26678 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
26679 &
"(note version numbers are indexed directly from the value the user specifies during "// &
26680 &
"element creation and no record is kept of the total number of versions the user sets."// &
26681 &
"The maximum version number the user sets defines the total number of versions allocated)." 26682 CALL flagerror(local_error,err,error,*999)
26685 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
26686 &
" is invalid for user node number "// &
26687 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
26688 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26689 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26690 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
26691 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
26692 & number_of_derivatives,
"*",err,error))//
" derivatives." 26693 CALL flagerror(local_error,err,error,*999)
26698 local_error=
"The specified user node number of "// &
26699 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
26700 &
" does not exist in the domain for field component number "// &
26701 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
26702 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26703 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26704 CALL flagerror(local_error,err,error,*999)
26707 CALL flagerror(
"Domain is not associated.",err,error,*999)
26709 CASE(field_grid_point_based_interpolation)
26710 local_error=
"Can not update by node for component number "// &
26711 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26712 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26713 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 26714 CALL flagerror(local_error,err,error,*999)
26715 CASE(field_gauss_point_based_interpolation)
26716 local_error=
"Can not update by node for component number "// &
26717 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26718 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26719 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 26720 CALL flagerror(local_error,err,error,*999)
26721 CASE(field_data_point_based_interpolation)
26722 local_error=
"Can not add element for component number "// &
26723 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26724 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26725 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 26726 CALL flagerror(local_error,err,error,*999)
26728 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
26729 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
26730 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26731 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26732 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26733 CALL flagerror(local_error,err,error,*999)
26736 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26737 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26738 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
26739 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
26741 CALL flagerror(local_error,err,error,*999)
26744 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26745 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26746 CALL flagerror(local_error,err,error,*999)
26749 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26750 &
" is invalid. The field parameter set type must be between 1 and "// &
26751 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 26752 CALL flagerror(local_error,err,error,*999)
26755 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
26756 &
" does not correspond to the single precision data type of the given value." 26757 CALL flagerror(local_error,err,error,*999)
26760 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26761 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26762 CALL flagerror(local_error,err,error,*999)
26765 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26766 &
" is invalid. The variable type must be between 1 and "// &
26767 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 26768 CALL flagerror(local_error,err,error,*999)
26771 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
26772 &
" has not been finished." 26773 CALL flagerror(local_error,err,error,*999)
26776 CALL flagerror(
"Field is not associated.",err,error,*999)
26779 exits(
"FIELD_PARAMETER_SET_UPDATE_NODE_SP")
26781 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_NODE_SP",err,error)
26783 END SUBROUTINE field_parameter_set_update_node_sp
26790 SUBROUTINE field_parameter_set_update_node_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
26791 & user_node_number,component_number,
VALUE,err,error,*)
26794 TYPE(field_type),
POINTER :: field
26795 INTEGER(INTG),
INTENT(IN) :: variable_type
26796 INTEGER(INTG),
INTENT(IN) :: field_set_type
26797 INTEGER(INTG),
INTENT(IN) :: version_number
26798 INTEGER(INTG),
INTENT(IN) :: derivative_number
26799 INTEGER(INTG),
INTENT(IN) :: user_node_number
26800 INTEGER(INTG),
INTENT(IN) :: component_number
26801 REAL(DP),
INTENT(IN) ::
VALUE 26802 INTEGER(INTG),
INTENT(OUT) :: err
26803 TYPE(varying_string),
INTENT(OUT) :: error
26805 INTEGER(INTG) :: domain_local_node_number,dof_idx
26806 LOGICAL :: ghost_node,user_node_exists
26807 TYPE(domain_type),
POINTER :: domain
26808 TYPE(domain_nodes_type),
POINTER :: domain_nodes
26809 TYPE(domain_topology_type),
POINTER :: domain_topology
26810 TYPE(field_parameter_set_type),
POINTER :: parameter_set
26811 TYPE(field_variable_type),
POINTER :: field_variable
26812 TYPE(varying_string) :: local_error
26814 enters(
"FIELD_PARAMETER_SET_UPDATE_NODE_DP",err,error,*999)
26816 IF(
ASSOCIATED(field))
THEN 26817 IF(field%FIELD_FINISHED)
THEN 26818 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 26819 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
26820 IF(
ASSOCIATED(field_variable))
THEN 26821 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 26822 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 26823 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
26824 IF(
ASSOCIATED(parameter_set))
THEN 26825 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 26826 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
26827 CASE(field_constant_interpolation)
26828 local_error=
"Can not update by node for component number "// &
26829 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26830 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26831 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 26832 CALL flagerror(local_error,err,error,*999)
26833 CASE(field_element_based_interpolation)
26834 local_error=
"Can not update by node for component number "// &
26835 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26836 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26837 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 26838 CALL flagerror(local_error,err,error,*999)
26839 CASE(field_node_based_interpolation)
26840 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
26841 IF(
ASSOCIATED(domain))
THEN 26842 domain_topology=>domain%TOPOLOGY
26843 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
26844 & domain_local_node_number,ghost_node,err,error,*999)
26845 IF(user_node_exists)
THEN 26846 IF(ghost_node)
THEN 26847 local_error=
"Cannot update by node for user node "// &
26848 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" as it is a ghost node." 26849 CALL flagerror(local_error,err,error,*999)
26851 domain_nodes=>domain_topology%NODES
26852 IF(
ASSOCIATED(domain_nodes))
THEN 26853 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
26854 & number_of_derivatives)
THEN 26855 IF(version_number>0.AND.version_number<= &
26856 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
26857 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
26858 & number_of_versions)
THEN 26859 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
26860 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
26861 & versions(version_number)
26862 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
26864 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
26865 &
" is invalid for derivative number "// &
26866 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
26867 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
26868 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26869 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26870 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
26871 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
26872 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
26873 &
"(note version numbers are indexed directly from the value the user specifies during "// &
26874 &
"element creation and no record is kept of the total number of versions the user sets."// &
26875 &
"The maximum version number the user sets defines the total number of versions allocated)." 26876 CALL flagerror(local_error,err,error,*999)
26879 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
26880 &
" is invalid for user node number "// &
26881 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
26882 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26883 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26884 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
26885 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
26886 & number_of_derivatives,
"*",err,error))//
" derivatives." 26887 CALL flagerror(local_error,err,error,*999)
26892 local_error=
"The specified user node number of "// &
26893 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
26894 &
" does not exist in the domain for field component number "// &
26895 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
26896 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26897 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26898 CALL flagerror(local_error,err,error,*999)
26901 CALL flagerror(
"Domain is not associated.",err,error,*999)
26903 CASE(field_grid_point_based_interpolation)
26904 local_error=
"Can not update by node for component number "// &
26905 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26906 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26907 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 26908 CALL flagerror(local_error,err,error,*999)
26909 CASE(field_gauss_point_based_interpolation)
26910 local_error=
"Can not update by node for component number "// &
26911 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26912 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26913 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 26914 CALL flagerror(local_error,err,error,*999)
26915 CASE(field_data_point_based_interpolation)
26916 local_error=
"Can not add element for component number "// &
26917 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
26918 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
26919 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 26920 CALL flagerror(local_error,err,error,*999)
26922 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
26923 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
26924 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26925 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26926 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26927 CALL flagerror(local_error,err,error,*999)
26930 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
26931 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26932 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
26933 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
26935 CALL flagerror(local_error,err,error,*999)
26938 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26939 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26940 CALL flagerror(local_error,err,error,*999)
26943 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
26944 &
" is invalid. The field parameter set type must be between 1 and "// &
26945 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 26946 CALL flagerror(local_error,err,error,*999)
26949 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
26950 &
" does not correspond to the double precision data type of the given value." 26951 CALL flagerror(local_error,err,error,*999)
26954 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26955 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 26956 CALL flagerror(local_error,err,error,*999)
26959 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
26960 &
" is invalid. The variable type must be between 1 and "// &
26961 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 26962 CALL flagerror(local_error,err,error,*999)
26965 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
26966 &
" has not been finished." 26967 CALL flagerror(local_error,err,error,*999)
26970 CALL flagerror(
"Field is not associated.",err,error,*999)
26973 exits(
"FIELD_PARAMETER_SET_UPDATE_NODE_DP")
26975 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_NODE_DP",err,error)
26977 END SUBROUTINE field_parameter_set_update_node_dp
26984 SUBROUTINE field_parameter_set_update_node_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
26985 & user_node_number,component_number,
VALUE,err,error,*)
26988 TYPE(field_type),
POINTER :: field
26989 INTEGER(INTG),
INTENT(IN) :: variable_type
26990 INTEGER(INTG),
INTENT(IN) :: field_set_type
26991 INTEGER(INTG),
INTENT(IN) :: version_number
26992 INTEGER(INTG),
INTENT(IN) :: derivative_number
26993 INTEGER(INTG),
INTENT(IN) :: user_node_number
26994 INTEGER(INTG),
INTENT(IN) :: component_number
26995 LOGICAL,
INTENT(IN) ::
VALUE 26996 INTEGER(INTG),
INTENT(OUT) :: err
26997 TYPE(varying_string),
INTENT(OUT) :: error
26999 INTEGER(INTG) :: domain_local_node_number,dof_idx
27000 LOGICAL :: ghost_node,user_node_exists
27001 TYPE(domain_type),
POINTER :: domain
27002 TYPE(domain_nodes_type),
POINTER :: domain_nodes
27003 TYPE(domain_topology_type),
POINTER :: domain_topology
27004 TYPE(field_parameter_set_type),
POINTER :: parameter_set
27005 TYPE(field_variable_type),
POINTER :: field_variable
27006 TYPE(varying_string) :: local_error
27008 enters(
"FIELD_PARAMETER_SET_UPDATE_NODE_L",err,error,*999)
27010 IF(
ASSOCIATED(field))
THEN 27011 IF(field%FIELD_FINISHED)
THEN 27012 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 27013 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
27014 IF(
ASSOCIATED(field_variable))
THEN 27015 IF(field_variable%DATA_TYPE==field_l_type)
THEN 27016 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 27017 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
27018 IF(
ASSOCIATED(parameter_set))
THEN 27019 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 27020 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
27021 CASE(field_constant_interpolation)
27022 local_error=
"Can not update by node for component number "// &
27023 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27024 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27025 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 27026 CALL flagerror(local_error,err,error,*999)
27027 CASE(field_element_based_interpolation)
27028 local_error=
"Can not update by node for component number "// &
27029 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27030 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27031 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 27032 CALL flagerror(local_error,err,error,*999)
27033 CASE(field_node_based_interpolation)
27034 domain=>field_variable%COMPONENTS(component_number)%DOMAIN
27035 IF(
ASSOCIATED(domain))
THEN 27036 domain_topology=>domain%TOPOLOGY
27037 CALL domain_topology_node_check_exists(domain_topology,user_node_number,user_node_exists, &
27038 & domain_local_node_number,ghost_node,err,error,*999)
27039 IF(user_node_exists)
THEN 27040 IF(ghost_node)
THEN 27041 local_error=
"Cannot update by node for user node "// &
27042 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" as it is a ghost node." 27043 CALL flagerror(local_error,err,error,*999)
27045 domain_nodes=>domain_topology%NODES
27046 IF(
ASSOCIATED(domain_nodes))
THEN 27047 IF(derivative_number>0.AND.derivative_number<=domain_nodes%NODES(domain_local_node_number)% &
27048 & number_of_derivatives)
THEN 27049 IF(version_number>0.AND.version_number<= &
27050 & field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
27051 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
27052 & number_of_versions)
THEN 27053 dof_idx=field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP% &
27054 & node_param2dof_map%NODES(domain_local_node_number)%DERIVATIVES(derivative_number)% &
27055 & versions(version_number)
27056 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
27058 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
27059 &
" is invalid for derivative number "// &
27060 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
27061 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
27062 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27063 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27064 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
27065 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
27066 & derivatives(derivative_number)%numberOfVersions,
"*",err,error))//
" versions "// &
27067 &
"(note version numbers are indexed directly from the value the user specifies during "// &
27068 &
"element creation and no record is kept of the total number of versions the user sets."// &
27069 &
"The maximum version number the user sets defines the total number of versions allocated)." 27070 CALL flagerror(local_error,err,error,*999)
27073 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
27074 &
" is invalid for user node number "// &
27075 & trim(number_to_vstring(user_node_number,
"*",err,error))//
" of component number "// &
27076 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27077 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27078 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27079 & trim(number_to_vstring(domain_nodes%NODES(domain_local_node_number)% &
27080 & number_of_derivatives,
"*",err,error))//
" derivatives." 27081 CALL flagerror(local_error,err,error,*999)
27086 local_error=
"The specified user node number of "// &
27087 & trim(number_to_vstring(user_node_number,
"*",err,error))// &
27088 &
" does not exist in the domain for field component number "// &
27089 & trim(number_to_vstring(component_number,
"*",err,error))//
" of field variable type "// &
27090 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27091 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27092 CALL flagerror(local_error,err,error,*999)
27095 CALL flagerror(
"Domain is not associated.",err,error,*999)
27097 CASE(field_grid_point_based_interpolation)
27098 local_error=
"Can not update by node for component number "// &
27099 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27100 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27101 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 27102 CALL flagerror(local_error,err,error,*999)
27103 CASE(field_gauss_point_based_interpolation)
27104 local_error=
"Can not update by node for component number "// &
27105 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27106 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27107 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 27108 CALL flagerror(local_error,err,error,*999)
27109 CASE(field_data_point_based_interpolation)
27110 local_error=
"Can not add element for component number "// &
27111 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27112 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27113 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 27114 CALL flagerror(local_error,err,error,*999)
27116 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
27117 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
27118 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27119 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27120 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27121 CALL flagerror(local_error,err,error,*999)
27124 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27125 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27126 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27127 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
27129 CALL flagerror(local_error,err,error,*999)
27132 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27133 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27134 CALL flagerror(local_error,err,error,*999)
27137 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27138 &
" is invalid. The field parameter set type must be between 1 and "// &
27139 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 27140 CALL flagerror(local_error,err,error,*999)
27143 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
27144 &
" does not correspond to the double precision data type of the given value." 27145 CALL flagerror(local_error,err,error,*999)
27148 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27149 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27150 CALL flagerror(local_error,err,error,*999)
27153 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27154 &
" is invalid. The variable type must be between 1 and "// &
27155 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 27156 CALL flagerror(local_error,err,error,*999)
27159 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
27160 &
" has not been finished." 27161 CALL flagerror(local_error,err,error,*999)
27164 CALL flagerror(
"Field is not associated.",err,error,*999)
27167 exits(
"FIELD_PARAMETER_SET_UPDATE_NODE_L")
27169 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_NODE_L",err,error)
27171 END SUBROUTINE field_parameter_set_update_node_l
27178 SUBROUTINE field_parameter_set_update_local_node_intg(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
27179 & local_node_number,component_number,
VALUE,err,error,*)
27182 TYPE(field_type),
POINTER :: field
27183 INTEGER(INTG),
INTENT(IN) :: variable_type
27184 INTEGER(INTG),
INTENT(IN) :: field_set_type
27185 INTEGER(INTG),
INTENT(IN) :: version_number
27186 INTEGER(INTG),
INTENT(IN) :: derivative_number
27187 INTEGER(INTG),
INTENT(IN) :: local_node_number
27188 INTEGER(INTG),
INTENT(IN) :: component_number
27189 INTEGER(INTG),
INTENT(IN) ::
VALUE 27190 INTEGER(INTG),
INTENT(OUT) :: err
27191 TYPE(varying_string),
INTENT(OUT) :: error
27193 INTEGER(INTG) :: dof_idx
27194 TYPE(field_parameter_set_type),
POINTER :: parameter_set
27195 TYPE(field_variable_type),
POINTER :: field_variable
27196 TYPE(field_node_param_to_dof_map_type),
POINTER :: field_nodes
27197 TYPE(varying_string) :: local_error
27199 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_INTG",err,error,*999)
27201 IF(
ASSOCIATED(field))
THEN 27202 IF(field%FIELD_FINISHED)
THEN 27203 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 27204 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
27205 IF(
ASSOCIATED(field_variable))
THEN 27206 IF(field_variable%DATA_TYPE==field_intg_type)
THEN 27207 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 27208 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
27209 IF(
ASSOCIATED(parameter_set))
THEN 27210 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 27211 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
27212 CASE(field_constant_interpolation)
27213 local_error=
"Can not update by node for component number "// &
27214 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27215 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27216 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 27217 CALL flagerror(local_error,err,error,*999)
27218 CASE(field_element_based_interpolation)
27219 local_error=
"Can not update by node for component number "// &
27220 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27221 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27222 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 27223 CALL flagerror(local_error,err,error,*999)
27224 CASE(field_node_based_interpolation)
27225 field_nodes=>field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP
27226 IF(local_node_number>0.AND.local_node_number<=field_nodes%NUMBER_OF_NODE_PARAMETERS)
THEN 27227 IF(derivative_number>0.AND.derivative_number<=field_nodes%NODES(local_node_number)% &
27228 & number_of_derivatives)
THEN 27229 IF(version_number>0.AND.version_number<= &
27230 & field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)%NUMBER_OF_VERSIONS)
THEN 27231 dof_idx=field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)% &
27232 & versions(version_number)
27233 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
27235 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
27236 &
" is invalid for derivative number "// &
27237 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
27238 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
27239 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27240 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27241 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
27242 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
27243 & derivatives(derivative_number)%NUMBER_OF_VERSIONS,
"*",err,error))//
" versions "// &
27244 &
"(note version numbers are indexed directly from the value the user specifies during "// &
27245 &
"element creation and no record is kept of the total number of versions the user sets."// &
27246 &
"The maximum version number the user sets defines the total number of versions allocated)." 27247 CALL flagerror(local_error,err,error,*999)
27250 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
27251 &
" is invalid for user node number "// &
27252 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
27253 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27254 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27255 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27256 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
27257 & number_of_derivatives,
"*",err,error))//
" derivatives." 27258 CALL flagerror(local_error,err,error,*999)
27261 local_error=
"Local node number "//trim(number_to_vstring(local_node_number,
"*",err,error))// &
27262 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27263 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27264 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
27265 &
" which has "//trim(number_to_vstring(field_nodes%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" nodes." 27266 CALL flagerror(local_error,err,error,*999)
27268 CASE(field_grid_point_based_interpolation)
27269 local_error=
"Can not update by node for component number "// &
27270 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27271 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27272 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 27273 CALL flagerror(local_error,err,error,*999)
27274 CASE(field_gauss_point_based_interpolation)
27275 local_error=
"Can not update by node for component number "// &
27276 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27277 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27278 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 27279 CALL flagerror(local_error,err,error,*999)
27280 CASE(field_data_point_based_interpolation)
27281 local_error=
"Can not update by node for component number "// &
27282 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27283 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27284 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 27285 CALL flagerror(local_error,err,error,*999)
27287 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
27288 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
27289 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27290 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27291 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27292 CALL flagerror(local_error,err,error,*999)
27295 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27296 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27297 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27298 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
27300 CALL flagerror(local_error,err,error,*999)
27303 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27304 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27305 CALL flagerror(local_error,err,error,*999)
27308 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27309 &
" is invalid. The field parameter set type must be between 1 and "// &
27310 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 27311 CALL flagerror(local_error,err,error,*999)
27314 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
27315 &
" does not correspond to the integer data type of the given value." 27316 CALL flagerror(local_error,err,error,*999)
27319 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27320 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27321 CALL flagerror(local_error,err,error,*999)
27324 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27325 &
" is invalid. The variable type must be between 1 and "// &
27326 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 27327 CALL flagerror(local_error,err,error,*999)
27330 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
27331 &
" has not been finished." 27332 CALL flagerror(local_error,err,error,*999)
27335 CALL flagerror(
"Field is not associated.",err,error,*999)
27338 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_INTG")
27340 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_INTG",err,error)
27342 END SUBROUTINE field_parameter_set_update_local_node_intg
27349 SUBROUTINE field_parameter_set_update_local_node_sp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
27350 & local_node_number,component_number,
VALUE,err,error,*)
27353 TYPE(field_type),
POINTER :: field
27354 INTEGER(INTG),
INTENT(IN) :: variable_type
27355 INTEGER(INTG),
INTENT(IN) :: field_set_type
27356 INTEGER(INTG),
INTENT(IN) :: version_number
27357 INTEGER(INTG),
INTENT(IN) :: derivative_number
27358 INTEGER(INTG),
INTENT(IN) :: local_node_number
27359 INTEGER(INTG),
INTENT(IN) :: component_number
27360 REAL(SP),
INTENT(IN) ::
VALUE 27361 INTEGER(INTG),
INTENT(OUT) :: err
27362 TYPE(varying_string),
INTENT(OUT) :: error
27364 INTEGER(INTG) :: dof_idx
27365 TYPE(field_parameter_set_type),
POINTER :: parameter_set
27366 TYPE(field_variable_type),
POINTER :: field_variable
27367 TYPE(field_node_param_to_dof_map_type),
POINTER :: field_nodes
27368 TYPE(varying_string) :: local_error
27370 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_SP",err,error,*999)
27372 IF(
ASSOCIATED(field))
THEN 27373 IF(field%FIELD_FINISHED)
THEN 27374 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 27375 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
27376 IF(
ASSOCIATED(field_variable))
THEN 27377 IF(field_variable%DATA_TYPE==field_sp_type)
THEN 27378 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 27379 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
27380 IF(
ASSOCIATED(parameter_set))
THEN 27381 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 27382 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
27383 CASE(field_constant_interpolation)
27384 local_error=
"Can not update by node for component number "// &
27385 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27386 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27387 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 27388 CALL flagerror(local_error,err,error,*999)
27389 CASE(field_element_based_interpolation)
27390 local_error=
"Can not update by node for component number "// &
27391 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27392 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27393 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 27394 CALL flagerror(local_error,err,error,*999)
27395 CASE(field_node_based_interpolation)
27396 field_nodes=>field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP
27397 IF(local_node_number>0.AND.local_node_number<=field_nodes%NUMBER_OF_NODE_PARAMETERS)
THEN 27398 IF(derivative_number>0.AND.derivative_number<=field_nodes%NODES(local_node_number)% &
27399 & number_of_derivatives)
THEN 27400 IF(version_number>0.AND.version_number<= &
27401 & field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)%NUMBER_OF_VERSIONS)
THEN 27402 dof_idx=field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)% &
27403 & versions(version_number)
27404 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
27406 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
27407 &
" is invalid for derivative number "// &
27408 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
27409 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
27410 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27411 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27412 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
27413 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
27414 & derivatives(derivative_number)%NUMBER_OF_VERSIONS,
"*",err,error))//
" versions "// &
27415 &
"(note version numbers are indexed directly from the value the user specifies during "// &
27416 &
"element creation and no record is kept of the total number of versions the user sets."// &
27417 &
"The maximum version number the user sets defines the total number of versions allocated)." 27418 CALL flagerror(local_error,err,error,*999)
27421 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
27422 &
" is invalid for user node number "// &
27423 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
27424 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27425 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27426 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27427 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
27428 & number_of_derivatives,
"*",err,error))//
" derivatives." 27429 CALL flagerror(local_error,err,error,*999)
27432 local_error=
"Local node number "//trim(number_to_vstring(local_node_number,
"*",err,error))// &
27433 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27434 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27435 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
27436 &
" which has "//trim(number_to_vstring(field_nodes%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" nodes." 27437 CALL flagerror(local_error,err,error,*999)
27439 CASE(field_grid_point_based_interpolation)
27440 local_error=
"Can not update by node for component number "// &
27441 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27442 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27443 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 27444 CALL flagerror(local_error,err,error,*999)
27445 CASE(field_gauss_point_based_interpolation)
27446 local_error=
"Can not update by node for component number "// &
27447 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27448 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27449 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 27450 CALL flagerror(local_error,err,error,*999)
27451 CASE(field_data_point_based_interpolation)
27452 local_error=
"Can not update by node for component number "// &
27453 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27454 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27455 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 27456 CALL flagerror(local_error,err,error,*999)
27458 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
27459 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
27460 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27461 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27462 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27463 CALL flagerror(local_error,err,error,*999)
27466 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27467 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27468 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27469 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
27471 CALL flagerror(local_error,err,error,*999)
27474 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27475 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27476 CALL flagerror(local_error,err,error,*999)
27479 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27480 &
" is invalid. The field parameter set type must be between 1 and "// &
27481 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 27482 CALL flagerror(local_error,err,error,*999)
27485 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
27486 &
" does not correspond to the single precision data type of the given value." 27487 CALL flagerror(local_error,err,error,*999)
27490 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27491 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27492 CALL flagerror(local_error,err,error,*999)
27495 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27496 &
" is invalid. The variable type must be between 1 and "// &
27497 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 27498 CALL flagerror(local_error,err,error,*999)
27501 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
27502 &
" has not been finished." 27503 CALL flagerror(local_error,err,error,*999)
27506 CALL flagerror(
"Field is not associated.",err,error,*999)
27509 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_SP")
27511 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_SP",err,error)
27513 END SUBROUTINE field_parameter_set_update_local_node_sp
27520 SUBROUTINE field_parameter_set_update_local_node_dp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
27521 & local_node_number,component_number,
VALUE,err,error,*)
27524 TYPE(field_type),
POINTER :: field
27525 INTEGER(INTG),
INTENT(IN) :: variable_type
27526 INTEGER(INTG),
INTENT(IN) :: field_set_type
27527 INTEGER(INTG),
INTENT(IN) :: version_number
27528 INTEGER(INTG),
INTENT(IN) :: derivative_number
27529 INTEGER(INTG),
INTENT(IN) :: local_node_number
27530 INTEGER(INTG),
INTENT(IN) :: component_number
27531 REAL(DP),
INTENT(IN) ::
VALUE 27532 INTEGER(INTG),
INTENT(OUT) :: err
27533 TYPE(varying_string),
INTENT(OUT) :: error
27535 INTEGER(INTG) :: dof_idx
27536 TYPE(field_parameter_set_type),
POINTER :: parameter_set
27537 TYPE(field_variable_type),
POINTER :: field_variable
27538 TYPE(field_node_param_to_dof_map_type),
POINTER :: field_nodes
27539 TYPE(varying_string) :: local_error
27541 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_DP",err,error,*999)
27543 IF(
ASSOCIATED(field))
THEN 27544 IF(field%FIELD_FINISHED)
THEN 27545 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 27546 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
27547 IF(
ASSOCIATED(field_variable))
THEN 27548 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 27549 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 27550 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
27551 IF(
ASSOCIATED(parameter_set))
THEN 27552 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 27553 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
27554 CASE(field_constant_interpolation)
27555 local_error=
"Can not update by node for component number "// &
27556 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27557 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27558 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 27559 CALL flagerror(local_error,err,error,*999)
27560 CASE(field_element_based_interpolation)
27561 local_error=
"Can not update by node for component number "// &
27562 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27563 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27564 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 27565 CALL flagerror(local_error,err,error,*999)
27566 CASE(field_node_based_interpolation)
27567 field_nodes=>field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP
27568 IF(local_node_number>0.AND.local_node_number<=field_nodes%NUMBER_OF_NODE_PARAMETERS)
THEN 27569 IF(derivative_number>0.AND.derivative_number<=field_nodes%NODES(local_node_number)% &
27570 & number_of_derivatives)
THEN 27571 IF(version_number>0.AND.version_number<= &
27572 & field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)%NUMBER_OF_VERSIONS)
THEN 27573 dof_idx=field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)% &
27574 & versions(version_number)
27575 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
27577 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
27578 &
" is invalid for derivative number "// &
27579 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
27580 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
27581 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27582 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27583 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
27584 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
27585 & derivatives(derivative_number)%NUMBER_OF_VERSIONS,
"*",err,error))//
" versions "// &
27586 &
"(note version numbers are indexed directly from the value the user specifies during "// &
27587 &
"element creation and no record is kept of the total number of versions the user sets."// &
27588 &
"The maximum version number the user sets defines the total number of versions allocated)." 27589 CALL flagerror(local_error,err,error,*999)
27592 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
27593 &
" is invalid for user node number "// &
27594 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
27595 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27596 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27597 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27598 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
27599 & number_of_derivatives,
"*",err,error))//
" derivatives." 27600 CALL flagerror(local_error,err,error,*999)
27603 local_error=
"Local node number "//trim(number_to_vstring(local_node_number,
"*",err,error))// &
27604 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27605 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27606 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
27607 &
" which has "//trim(number_to_vstring(field_nodes%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" nodes." 27608 CALL flagerror(local_error,err,error,*999)
27610 CASE(field_grid_point_based_interpolation)
27611 local_error=
"Can not update by node for component number "// &
27612 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27613 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27614 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 27615 CALL flagerror(local_error,err,error,*999)
27616 CASE(field_gauss_point_based_interpolation)
27617 local_error=
"Can not update by node for component number "// &
27618 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27619 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27620 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 27621 CALL flagerror(local_error,err,error,*999)
27622 CASE(field_data_point_based_interpolation)
27623 local_error=
"Can not update by node for component number "// &
27624 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27625 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27626 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 27627 CALL flagerror(local_error,err,error,*999)
27629 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
27630 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
27631 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27632 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27633 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27634 CALL flagerror(local_error,err,error,*999)
27637 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27638 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27639 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27640 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
27642 CALL flagerror(local_error,err,error,*999)
27645 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27646 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27647 CALL flagerror(local_error,err,error,*999)
27650 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27651 &
" is invalid. The field parameter set type must be between 1 and "// &
27652 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 27653 CALL flagerror(local_error,err,error,*999)
27656 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
27657 &
" does not correspond to the double precision data type of the given value." 27658 CALL flagerror(local_error,err,error,*999)
27661 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27662 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27663 CALL flagerror(local_error,err,error,*999)
27666 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27667 &
" is invalid. The variable type must be between 1 and "// &
27668 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 27669 CALL flagerror(local_error,err,error,*999)
27672 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
27673 &
" has not been finished." 27674 CALL flagerror(local_error,err,error,*999)
27677 CALL flagerror(
"Field is not associated.",err,error,*999)
27680 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_DP")
27682 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_DP",err,error)
27684 END SUBROUTINE field_parameter_set_update_local_node_dp
27691 SUBROUTINE field_parameter_set_update_local_node_l(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,VERSION_NUMBER,DERIVATIVE_NUMBER, &
27692 & local_node_number,component_number,
VALUE,err,error,*)
27695 TYPE(field_type),
POINTER :: field
27696 INTEGER(INTG),
INTENT(IN) :: variable_type
27697 INTEGER(INTG),
INTENT(IN) :: field_set_type
27698 INTEGER(INTG),
INTENT(IN) :: version_number
27699 INTEGER(INTG),
INTENT(IN) :: derivative_number
27700 INTEGER(INTG),
INTENT(IN) :: local_node_number
27701 INTEGER(INTG),
INTENT(IN) :: component_number
27702 LOGICAL,
INTENT(IN) ::
VALUE 27703 INTEGER(INTG),
INTENT(OUT) :: err
27704 TYPE(varying_string),
INTENT(OUT) :: error
27706 INTEGER(INTG) :: dof_idx
27707 TYPE(field_parameter_set_type),
POINTER :: parameter_set
27708 TYPE(field_variable_type),
POINTER :: field_variable
27709 TYPE(field_node_param_to_dof_map_type),
POINTER :: field_nodes
27710 TYPE(varying_string) :: local_error
27712 enters(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_L",err,error,*999)
27714 IF(
ASSOCIATED(field))
THEN 27715 IF(field%FIELD_FINISHED)
THEN 27716 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 27717 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
27718 IF(
ASSOCIATED(field_variable))
THEN 27719 IF(field_variable%DATA_TYPE==field_l_type)
THEN 27720 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 27721 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
27722 IF(
ASSOCIATED(parameter_set))
THEN 27723 IF(component_number>=1.AND.component_number<=field_variable%NUMBER_OF_COMPONENTS)
THEN 27724 SELECT CASE(field_variable%COMPONENTS(component_number)%INTERPOLATION_TYPE)
27725 CASE(field_constant_interpolation)
27726 local_error=
"Can not update by node for component number "// &
27727 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27728 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27729 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 27730 CALL flagerror(local_error,err,error,*999)
27731 CASE(field_element_based_interpolation)
27732 local_error=
"Can not update by node for component number "// &
27733 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27734 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27735 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 27736 CALL flagerror(local_error,err,error,*999)
27737 CASE(field_node_based_interpolation)
27738 field_nodes=>field_variable%COMPONENTS(component_number)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP
27739 IF(local_node_number>0.AND.local_node_number<=field_nodes%NUMBER_OF_NODE_PARAMETERS)
THEN 27740 IF(derivative_number>0.AND.derivative_number<=field_nodes%NODES(local_node_number)% &
27741 & number_of_derivatives)
THEN 27742 IF(version_number>0.AND.version_number<= &
27743 & field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)%NUMBER_OF_VERSIONS)
THEN 27744 dof_idx=field_nodes%NODES(local_node_number)%DERIVATIVES(derivative_number)% &
27745 & versions(version_number)
27746 CALL distributed_vector_values_set(parameter_set%PARAMETERS,dof_idx,
VALUE,err,error,*999)
27748 local_error=
"Version number "//trim(number_to_vstring(version_number,
"*",err,error))// &
27749 &
" is invalid for derivative number "// &
27750 & trim(number_to_vstring(derivative_number,
"*",err,error))//
" of node number "// &
27751 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
27752 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27753 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27754 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has a maximum of "// &
27755 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
27756 & derivatives(derivative_number)%NUMBER_OF_VERSIONS,
"*",err,error))//
" versions "// &
27757 &
"(note version numbers are indexed directly from the value the user specifies during "// &
27758 &
"element creation and no record is kept of the total number of versions the user sets."// &
27759 &
"The maximum version number the user sets defines the total number of versions allocated)." 27760 CALL flagerror(local_error,err,error,*999)
27763 local_error=
"Derivative number "//trim(number_to_vstring(derivative_number,
"*",err,error))// &
27764 &
" is invalid for user node number "// &
27765 & trim(number_to_vstring(local_node_number,
"*",err,error))//
" of component number "// &
27766 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27767 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27768 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27769 & trim(number_to_vstring(field_nodes%NODES(local_node_number)% &
27770 & number_of_derivatives,
"*",err,error))//
" derivatives." 27771 CALL flagerror(local_error,err,error,*999)
27774 local_error=
"Local node number "//trim(number_to_vstring(local_node_number,
"*",err,error))// &
27775 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27776 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27777 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
27778 &
" which has "//trim(number_to_vstring(field_nodes%NUMBER_OF_NODE_PARAMETERS,
"*",err,error))//
" nodes." 27779 CALL flagerror(local_error,err,error,*999)
27781 CASE(field_grid_point_based_interpolation)
27782 local_error=
"Can not update by node for component number "// &
27783 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27784 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27785 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 27786 CALL flagerror(local_error,err,error,*999)
27787 CASE(field_gauss_point_based_interpolation)
27788 local_error=
"Can not update by node for component number "// &
27789 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27790 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27791 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has Gauss point based interpolation." 27792 CALL flagerror(local_error,err,error,*999)
27793 CASE(field_data_point_based_interpolation)
27794 local_error=
"Can not update by node for component number "// &
27795 & trim(number_to_vstring(component_number,
"*",err,error))//
" of variable type "// &
27796 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
27797 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 27798 CALL flagerror(local_error,err,error,*999)
27800 local_error=
"The field component interpolation type of "//trim(number_to_vstring(field_variable% &
27801 & components(component_number)%INTERPOLATION_TYPE,
"*",err,error))// &
27802 &
" is invalid for component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27803 &
" of variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27804 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27805 CALL flagerror(local_error,err,error,*999)
27808 local_error=
"Component number "//trim(number_to_vstring(component_number,
"*",err,error))// &
27809 &
" is invalid for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27810 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27811 & trim(number_to_vstring(field_variable%NUMBER_OF_COMPONENTS,
"*",err,error))// &
27813 CALL flagerror(local_error,err,error,*999)
27816 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27817 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27818 CALL flagerror(local_error,err,error,*999)
27821 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
27822 &
" is invalid. The field parameter set type must be between 1 and "// &
27823 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 27824 CALL flagerror(local_error,err,error,*999)
27827 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
27828 &
" does not correspond to the logical data type of the given value." 27829 CALL flagerror(local_error,err,error,*999)
27832 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27833 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 27834 CALL flagerror(local_error,err,error,*999)
27837 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
27838 &
" is invalid. The variable type must be between 1 and "// &
27839 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 27840 CALL flagerror(local_error,err,error,*999)
27843 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
27844 &
" has not been finished." 27845 CALL flagerror(local_error,err,error,*999)
27848 CALL flagerror(
"Field is not associated.",err,error,*999)
27851 exits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_L")
27853 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_LOCAL_NODE_L",err,error)
27855 END SUBROUTINE field_parameter_set_update_local_node_l
27864 SUBROUTINE field_parametersetupdategausspointintg(field,variableType,fieldSetType,gaussPointNumber,userElementNumber, &
27865 & componentnumber,
value,err,error,*)
27868 TYPE(field_type),
POINTER :: field
27869 INTEGER(INTG),
INTENT(IN) :: variabletype
27870 INTEGER(INTG),
INTENT(IN) :: fieldsettype
27871 INTEGER(INTG),
INTENT(IN) :: gausspointnumber
27872 INTEGER(INTG),
INTENT(IN) :: userelementnumber
27873 INTEGER(INTG),
INTENT(IN) :: componentnumber
27874 INTEGER,
INTENT(IN) ::
value 27875 INTEGER(INTG),
INTENT(OUT) :: err
27876 TYPE(varying_string),
INTENT(OUT) :: error
27878 INTEGER(INTG) :: dofidx,localelementnumber
27879 LOGICAL :: ghostelement,userelementexists
27880 TYPE(decomposition_type),
POINTER :: decomposition
27881 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
27882 TYPE(field_parameter_set_type),
POINTER :: parameterset
27883 TYPE(field_variable_type),
POINTER :: fieldvariable
27884 TYPE(varying_string) :: localerror
27886 enters(
"Field_ParameterSetUpdateGaussPointIntg",err,error,*999)
27888 IF(
ASSOCIATED(field))
THEN 27889 IF(field%FIELD_FINISHED)
THEN 27890 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 27891 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
27892 IF(
ASSOCIATED(fieldvariable))
THEN 27893 IF(fieldvariable%DATA_TYPE==field_intg_type)
THEN 27894 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 27895 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
27896 IF(
ASSOCIATED(parameterset))
THEN 27897 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 27898 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
27899 CASE(field_constant_interpolation)
27900 localerror=
"Can not update by Gauss point for component number "// &
27901 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
27902 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
27903 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 27904 CALL flagerror(localerror,err,error,*999)
27905 CASE(field_element_based_interpolation)
27906 localerror=
"Can not update by Gauss point for component number "// &
27907 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
27908 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
27909 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 27910 CALL flagerror(localerror,err,error,*999)
27911 CASE(field_node_based_interpolation)
27912 localerror=
"Can not update by Gauss point for component number "// &
27913 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
27914 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
27915 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 27916 CALL flagerror(localerror,err,error,*999)
27917 CASE(field_grid_point_based_interpolation)
27918 localerror=
"Can not update by Gauss point for component number "// &
27919 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
27920 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
27921 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 27922 CALL flagerror(localerror,err,error,*999)
27923 CASE(field_gauss_point_based_interpolation)
27924 decomposition=>field%decomposition
27925 IF(
ASSOCIATED(decomposition))
THEN 27926 decompositiontopology=>decomposition%topology
27927 CALL decomposition_topology_element_check_exists(decompositiontopology,userelementnumber, &
27928 & userelementexists,localelementnumber,ghostelement,err,error,*999)
27929 IF(userelementexists)
THEN 27930 IF(ghostelement)
THEN 27931 localerror=
"Cannot update by Gauss point for user element "// &
27932 & trim(numbertovstring(userelementnumber,
"*",err,error))//
" as it is a ghost element." 27933 CALL flagerror(localerror,err,error,*999)
27936 IF(gausspointnumber>=1.AND.gausspointnumber<=
SIZE(fieldvariable% &
27937 & components(componentnumber)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1))
THEN 27938 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
27939 & gauss_point_param2dof_map%GAUSS_POINTS(gausspointnumber,localelementnumber)
27940 CALL distributed_vector_values_set(parameterset%parameters,dofidx,
value,err,error,*999)
27942 localerror=
"The specified Gauss point number "// &
27943 & trim(numbertovstring(gausspointnumber,
"*",err,error))// &
27944 &
" is not within the expected range." 27945 CALL flagerror(localerror,err,error,*999)
27949 localerror=
"The specified user element number of "// &
27950 & trim(numbertovstring(userelementnumber,
"*",err,error))// &
27951 &
" does not exist in the decomposition for field component number "// &
27952 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of field variable type "// &
27953 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
27954 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 27955 CALL flagerror(localerror,err,error,*999)
27958 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
27960 CASE(field_data_point_based_interpolation)
27961 localerror=
"Can not update by Gauss point for component number "// &
27962 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
27963 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
27964 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 27965 CALL flagerror(localerror,err,error,*999)
27967 localerror=
"The field component interpolation type of "//trim(numbertovstring(fieldvariable% &
27968 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
27969 &
" is invalid for component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
27970 &
" of variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
27971 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 27972 CALL flagerror(localerror,err,error,*999)
27975 localerror=
"Component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
27976 &
" is invalid for variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
27977 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
27978 & trim(numbertovstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 27979 CALL flagerror(localerror,err,error,*999)
27982 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
27983 &
" has not been created on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))
27984 CALL flagerror(localerror,err,error,*999)
27987 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
27988 &
" is invalid. The field parameter set type must be between 1 and "// &
27989 & trim(numbertovstring(field_number_of_set_types,
"*",err,error))//
"." 27990 CALL flagerror(localerror,err,error,*999)
27993 localerror=
"The field variable data type of "//trim(numbertovstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
27994 &
" does not correspond to the integer data type of the given value." 27995 CALL flagerror(localerror,err,error,*999)
27998 localerror=
"The specified field variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
27999 &
" has not been defined on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28000 CALL flagerror(localerror,err,error,*999)
28003 localerror=
"The specified variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
28004 &
" is invalid. The variable type must be between 1 and "// &
28005 & trim(numbertovstring(field_number_of_variable_types,
"*",err,error))//
"." 28006 CALL flagerror(localerror,err,error,*999)
28009 localerror=
"Field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 28010 CALL flagerror(localerror,err,error,*999)
28013 CALL flagerror(
"Field is not associated.",err,error,*999)
28016 exits(
"Field_ParameterSetUpdateGaussPointIntg")
28018 999 errorsexits(
"Field_ParameterSetUpdateGaussPointIntg",err,error)
28021 END SUBROUTINE field_parametersetupdategausspointintg
28030 SUBROUTINE field_parametersetupdategausspointsp(field,variableType,fieldSetType,gaussPointNumber,userElementNumber, &
28031 & componentnumber,
value,err,error,*)
28034 TYPE(field_type),
POINTER :: field
28035 INTEGER(INTG),
INTENT(IN) :: variabletype
28036 INTEGER(INTG),
INTENT(IN) :: fieldsettype
28037 INTEGER(INTG),
INTENT(IN) :: gausspointnumber
28038 INTEGER(INTG),
INTENT(IN) :: userelementnumber
28039 INTEGER(INTG),
INTENT(IN) :: componentnumber
28040 REAL(SP),
INTENT(IN) ::
value 28041 INTEGER(INTG),
INTENT(OUT) :: err
28042 TYPE(varying_string),
INTENT(OUT) :: error
28044 INTEGER(INTG) :: dofidx,localelementnumber
28045 LOGICAL :: ghostelement,userelementexists
28046 TYPE(decomposition_type),
POINTER :: decomposition
28047 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
28048 TYPE(field_parameter_set_type),
POINTER :: parameterset
28049 TYPE(field_variable_type),
POINTER :: fieldvariable
28050 TYPE(varying_string) :: localerror
28052 enters(
"Field_ParameterSetUpdateGaussPointSP",err,error,*999)
28054 IF(
ASSOCIATED(field))
THEN 28055 IF(field%FIELD_FINISHED)
THEN 28056 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 28057 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
28058 IF(
ASSOCIATED(fieldvariable))
THEN 28059 IF(fieldvariable%DATA_TYPE==field_sp_type)
THEN 28060 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 28061 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
28062 IF(
ASSOCIATED(parameterset))
THEN 28063 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 28064 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
28065 CASE(field_constant_interpolation)
28066 localerror=
"Can not update by Gauss point for component number "// &
28067 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28068 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28069 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 28070 CALL flagerror(localerror,err,error,*999)
28071 CASE(field_element_based_interpolation)
28072 localerror=
"Can not update by Gauss point for component number "// &
28073 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28074 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28075 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 28076 CALL flagerror(localerror,err,error,*999)
28077 CASE(field_node_based_interpolation)
28078 localerror=
"Can not update by Gauss point for component number "// &
28079 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28080 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28081 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 28082 CALL flagerror(localerror,err,error,*999)
28083 CASE(field_grid_point_based_interpolation)
28084 localerror=
"Can not update by Gauss point for component number "// &
28085 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28086 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28087 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 28088 CALL flagerror(localerror,err,error,*999)
28089 CASE(field_gauss_point_based_interpolation)
28090 decomposition=>field%decomposition
28091 IF(
ASSOCIATED(decomposition))
THEN 28092 decompositiontopology=>decomposition%topology
28093 CALL decomposition_topology_element_check_exists(decompositiontopology,userelementnumber, &
28094 & userelementexists,localelementnumber,ghostelement,err,error,*999)
28095 IF(userelementexists)
THEN 28096 IF(ghostelement)
THEN 28097 localerror=
"Cannot update by Gauss point for user element "// &
28098 & trim(numbertovstring(userelementnumber,
"*",err,error))//
" as it is a ghost element." 28099 CALL flagerror(localerror,err,error,*999)
28102 IF(gausspointnumber>=1.AND.gausspointnumber<=
SIZE(fieldvariable% &
28103 & components(componentnumber)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1))
THEN 28104 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
28105 & gauss_point_param2dof_map%GAUSS_POINTS(gausspointnumber,localelementnumber)
28106 CALL distributed_vector_values_set(parameterset%parameters,dofidx,
value,err,error,*999)
28108 localerror=
"The specified Gauss point number "// &
28109 & trim(numbertovstring(gausspointnumber,
"*",err,error))// &
28110 &
" is not within the expected range." 28111 CALL flagerror(localerror,err,error,*999)
28115 localerror=
"The specified user element number of "// &
28116 & trim(numbertovstring(userelementnumber,
"*",err,error))// &
28117 &
" does not exist in the decomposition for field component number "// &
28118 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of field variable type "// &
28119 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28120 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28121 CALL flagerror(localerror,err,error,*999)
28124 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
28126 CASE(field_data_point_based_interpolation)
28127 localerror=
"Can not update by Gauss point for component number "// &
28128 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28129 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28130 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 28131 CALL flagerror(localerror,err,error,*999)
28133 localerror=
"The field component interpolation type of "//trim(numbertovstring(fieldvariable% &
28134 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
28135 &
" is invalid for component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
28136 &
" of variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
28137 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28138 CALL flagerror(localerror,err,error,*999)
28141 localerror=
"Component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
28142 &
" is invalid for variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
28143 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
28144 & trim(numbertovstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 28145 CALL flagerror(localerror,err,error,*999)
28148 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
28149 &
" has not been created on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))
28150 CALL flagerror(localerror,err,error,*999)
28153 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
28154 &
" is invalid. The field parameter set type must be between 1 and "// &
28155 & trim(numbertovstring(field_number_of_set_types,
"*",err,error))//
"." 28156 CALL flagerror(localerror,err,error,*999)
28159 localerror=
"The field variable data type of "//trim(numbertovstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
28160 &
" does not correspond to the single precision data type of the given value." 28161 CALL flagerror(localerror,err,error,*999)
28164 localerror=
"The specified field variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
28165 &
" has not been defined on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28166 CALL flagerror(localerror,err,error,*999)
28169 localerror=
"The specified variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
28170 &
" is invalid. The variable type must be between 1 and "// &
28171 & trim(numbertovstring(field_number_of_variable_types,
"*",err,error))//
"." 28172 CALL flagerror(localerror,err,error,*999)
28175 localerror=
"Field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 28176 CALL flagerror(localerror,err,error,*999)
28179 CALL flagerror(
"Field is not associated.",err,error,*999)
28182 exits(
"Field_ParameterSetUpdateGaussPointSP")
28184 999 errorsexits(
"Field_ParameterSetUpdateGaussPointSP",err,error)
28187 END SUBROUTINE field_parametersetupdategausspointsp
28196 SUBROUTINE field_parametersetupdategausspointdp(field,variableType,fieldSetType,gaussPointNumber,userElementNumber, &
28197 & componentnumber,
value,err,error,*)
28200 TYPE(field_type),
POINTER :: field
28201 INTEGER(INTG),
INTENT(IN) :: variabletype
28202 INTEGER(INTG),
INTENT(IN) :: fieldsettype
28203 INTEGER(INTG),
INTENT(IN) :: gausspointnumber
28204 INTEGER(INTG),
INTENT(IN) :: userelementnumber
28205 INTEGER(INTG),
INTENT(IN) :: componentnumber
28206 REAL(DP),
INTENT(IN) ::
value 28207 INTEGER(INTG),
INTENT(OUT) :: err
28208 TYPE(varying_string),
INTENT(OUT) :: error
28210 INTEGER(INTG) :: dofidx,localelementnumber
28211 LOGICAL :: ghostelement,userelementexists
28212 TYPE(decomposition_type),
POINTER :: decomposition
28213 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
28214 TYPE(field_parameter_set_type),
POINTER :: parameterset
28215 TYPE(field_variable_type),
POINTER :: fieldvariable
28216 TYPE(varying_string) :: localerror
28218 enters(
"Field_ParameterSetUpdateGaussPointDP",err,error,*999)
28220 IF(
ASSOCIATED(field))
THEN 28221 IF(field%FIELD_FINISHED)
THEN 28222 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 28223 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
28224 IF(
ASSOCIATED(fieldvariable))
THEN 28225 IF(fieldvariable%DATA_TYPE==field_dp_type)
THEN 28226 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 28227 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
28228 IF(
ASSOCIATED(parameterset))
THEN 28229 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 28230 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
28231 CASE(field_constant_interpolation)
28232 localerror=
"Can not update by Gauss point for component number "// &
28233 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28234 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28235 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 28236 CALL flagerror(localerror,err,error,*999)
28237 CASE(field_element_based_interpolation)
28238 localerror=
"Can not update by Gauss point for component number "// &
28239 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28240 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28241 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 28242 CALL flagerror(localerror,err,error,*999)
28243 CASE(field_node_based_interpolation)
28244 localerror=
"Can not update by Gauss point for component number "// &
28245 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28246 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28247 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 28248 CALL flagerror(localerror,err,error,*999)
28249 CASE(field_grid_point_based_interpolation)
28250 localerror=
"Can not update by Gauss point for component number "// &
28251 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28252 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28253 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 28254 CALL flagerror(localerror,err,error,*999)
28255 CASE(field_gauss_point_based_interpolation)
28256 decomposition=>field%decomposition
28257 IF(
ASSOCIATED(decomposition))
THEN 28258 decompositiontopology=>decomposition%topology
28259 CALL decomposition_topology_element_check_exists(decompositiontopology,userelementnumber, &
28260 & userelementexists,localelementnumber,ghostelement,err,error,*999)
28261 IF(userelementexists)
THEN 28262 IF(ghostelement)
THEN 28263 localerror=
"Cannot update by Gauss point for user element "// &
28264 & trim(numbertovstring(userelementnumber,
"*",err,error))//
" as it is a ghost element." 28265 CALL flagerror(localerror,err,error,*999)
28268 IF(gausspointnumber>=1.AND.gausspointnumber<=
SIZE(fieldvariable% &
28269 & components(componentnumber)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1))
THEN 28270 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
28271 & gauss_point_param2dof_map%GAUSS_POINTS(gausspointnumber,localelementnumber)
28272 CALL distributed_vector_values_set(parameterset%parameters,dofidx,
value,err,error,*999)
28274 localerror=
"The specified Gauss point number "// &
28275 & trim(numbertovstring(gausspointnumber,
"*",err,error))// &
28276 &
" is not within the expected range." 28277 CALL flagerror(localerror,err,error,*999)
28281 localerror=
"The specified user element number of "// &
28282 & trim(numbertovstring(userelementnumber,
"*",err,error))// &
28283 &
" does not exist in the decomposition for field component number "// &
28284 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of field variable type "// &
28285 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28286 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28287 CALL flagerror(localerror,err,error,*999)
28290 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
28292 CASE(field_data_point_based_interpolation)
28293 localerror=
"Can not update by Gauss point for component number "// &
28294 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28295 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28296 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 28297 CALL flagerror(localerror,err,error,*999)
28299 localerror=
"The field component interpolation type of "//trim(numbertovstring(fieldvariable% &
28300 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
28301 &
" is invalid for component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
28302 &
" of variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
28303 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28304 CALL flagerror(localerror,err,error,*999)
28307 localerror=
"Component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
28308 &
" is invalid for variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
28309 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
28310 & trim(numbertovstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 28311 CALL flagerror(localerror,err,error,*999)
28314 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
28315 &
" has not been created on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))
28316 CALL flagerror(localerror,err,error,*999)
28319 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
28320 &
" is invalid. The field parameter set type must be between 1 and "// &
28321 & trim(numbertovstring(field_number_of_set_types,
"*",err,error))//
"." 28322 CALL flagerror(localerror,err,error,*999)
28325 localerror=
"The field variable data type of "//trim(numbertovstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
28326 &
" does not correspond to the double precision data type of the given value." 28327 CALL flagerror(localerror,err,error,*999)
28330 localerror=
"The specified field variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
28331 &
" has not been defined on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28332 CALL flagerror(localerror,err,error,*999)
28335 localerror=
"The specified variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
28336 &
" is invalid. The variable type must be between 1 and "// &
28337 & trim(numbertovstring(field_number_of_variable_types,
"*",err,error))//
"." 28338 CALL flagerror(localerror,err,error,*999)
28341 localerror=
"Field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 28342 CALL flagerror(localerror,err,error,*999)
28345 CALL flagerror(
"Field is not associated.",err,error,*999)
28348 exits(
"Field_ParameterSetUpdateGaussPointDP")
28350 999 errorsexits(
"Field_ParameterSetUpdateGaussPointDP",err,error)
28353 END SUBROUTINE field_parametersetupdategausspointdp
28362 SUBROUTINE field_parametersetupdategausspointl(field,variableType,fieldSetType,gaussPointNumber,userElementNumber, &
28363 & componentnumber,
value,err,error,*)
28366 TYPE(field_type),
POINTER :: field
28367 INTEGER(INTG),
INTENT(IN) :: variabletype
28368 INTEGER(INTG),
INTENT(IN) :: fieldsettype
28369 INTEGER(INTG),
INTENT(IN) :: gausspointnumber
28370 INTEGER(INTG),
INTENT(IN) :: userelementnumber
28371 INTEGER(INTG),
INTENT(IN) :: componentnumber
28372 LOGICAL,
INTENT(IN) ::
value 28373 INTEGER(INTG),
INTENT(OUT) :: err
28374 TYPE(varying_string),
INTENT(OUT) :: error
28376 INTEGER(INTG) :: dofidx,localelementnumber
28377 LOGICAL :: ghostelement,userelementexists
28378 TYPE(decomposition_type),
POINTER :: decomposition
28379 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
28380 TYPE(field_parameter_set_type),
POINTER :: parameterset
28381 TYPE(field_variable_type),
POINTER :: fieldvariable
28382 TYPE(varying_string) :: localerror
28384 enters(
"Field_ParameterSetUpdateGaussPointDP",err,error,*999)
28386 IF(
ASSOCIATED(field))
THEN 28387 IF(field%FIELD_FINISHED)
THEN 28388 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 28389 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
28390 IF(
ASSOCIATED(fieldvariable))
THEN 28391 IF(fieldvariable%DATA_TYPE==field_l_type)
THEN 28392 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 28393 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
28394 IF(
ASSOCIATED(parameterset))
THEN 28395 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 28396 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
28397 CASE(field_constant_interpolation)
28398 localerror=
"Can not update by Gauss point for component number "// &
28399 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28400 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28401 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 28402 CALL flagerror(localerror,err,error,*999)
28403 CASE(field_element_based_interpolation)
28404 localerror=
"Can not update by Gauss point for component number "// &
28405 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28406 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28407 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 28408 CALL flagerror(localerror,err,error,*999)
28409 CASE(field_node_based_interpolation)
28410 localerror=
"Can not update by Gauss point for component number "// &
28411 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28412 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28413 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 28414 CALL flagerror(localerror,err,error,*999)
28415 CASE(field_grid_point_based_interpolation)
28416 localerror=
"Can not update by Gauss point for component number "// &
28417 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28418 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28419 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 28420 CALL flagerror(localerror,err,error,*999)
28421 CASE(field_gauss_point_based_interpolation)
28422 decomposition=>field%decomposition
28423 IF(
ASSOCIATED(decomposition))
THEN 28424 decompositiontopology=>decomposition%topology
28425 CALL decomposition_topology_element_check_exists(decompositiontopology,userelementnumber, &
28426 & userelementexists,localelementnumber,ghostelement,err,error,*999)
28427 IF(userelementexists)
THEN 28428 IF(ghostelement)
THEN 28429 localerror=
"Cannot update by Gauss point for user element "// &
28430 & trim(numbertovstring(userelementnumber,
"*",err,error))//
" as it is a ghost element." 28431 CALL flagerror(localerror,err,error,*999)
28434 IF(gausspointnumber>=1.AND.gausspointnumber<=
SIZE(fieldvariable% &
28435 & components(componentnumber)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1))
THEN 28436 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
28437 & gauss_point_param2dof_map%GAUSS_POINTS(gausspointnumber,localelementnumber)
28438 CALL distributed_vector_values_set(parameterset%parameters,dofidx,
value,err,error,*999)
28440 localerror=
"The specified Gauss point number "// &
28441 & trim(numbertovstring(gausspointnumber,
"*",err,error))// &
28442 &
" is not within the expected range." 28443 CALL flagerror(localerror,err,error,*999)
28447 localerror=
"The specified user element number of "// &
28448 & trim(numbertovstring(userelementnumber,
"*",err,error))// &
28449 &
" does not exist in the decomposition for field component number "// &
28450 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of field variable type "// &
28451 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28452 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28453 CALL flagerror(localerror,err,error,*999)
28456 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
28458 CASE(field_data_point_based_interpolation)
28459 localerror=
"Can not update by Gauss point for component number "// &
28460 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28461 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28462 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 28463 CALL flagerror(localerror,err,error,*999)
28465 localerror=
"The field component interpolation type of "//trim(numbertovstring(fieldvariable% &
28466 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
28467 &
" is invalid for component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
28468 &
" of variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
28469 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28470 CALL flagerror(localerror,err,error,*999)
28473 localerror=
"Component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
28474 &
" is invalid for variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
28475 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
28476 & trim(numbertovstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 28477 CALL flagerror(localerror,err,error,*999)
28480 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
28481 &
" has not been created on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))
28482 CALL flagerror(localerror,err,error,*999)
28485 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
28486 &
" is invalid. The field parameter set type must be between 1 and "// &
28487 & trim(numbertovstring(field_number_of_set_types,
"*",err,error))//
"." 28488 CALL flagerror(localerror,err,error,*999)
28491 localerror=
"The field variable data type of "//trim(numbertovstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
28492 &
" does not correspond to the logical data type of the given value." 28493 CALL flagerror(localerror,err,error,*999)
28496 localerror=
"The specified field variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
28497 &
" has not been defined on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28498 CALL flagerror(localerror,err,error,*999)
28501 localerror=
"The specified variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
28502 &
" is invalid. The variable type must be between 1 and "// &
28503 & trim(numbertovstring(field_number_of_variable_types,
"*",err,error))//
"." 28504 CALL flagerror(localerror,err,error,*999)
28507 localerror=
"Field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 28508 CALL flagerror(localerror,err,error,*999)
28511 CALL flagerror(
"Field is not associated.",err,error,*999)
28514 exits(
"Field_ParameterSetUpdateGaussPointL")
28516 999 errorsexits(
"Field_ParameterSetUpdateGaussPointL",err,error)
28519 END SUBROUTINE field_parametersetupdategausspointl
28526 SUBROUTINE field_parametersetupdatelocalgausspointdp(field,variableType,fieldSetType,gaussPointNumber,localElementNumber, &
28527 & componentnumber,
value,err,error,*)
28530 TYPE(field_type),
POINTER :: field
28531 INTEGER(INTG),
INTENT(IN) :: variabletype
28532 INTEGER(INTG),
INTENT(IN) :: fieldsettype
28533 INTEGER(INTG),
INTENT(IN) :: gausspointnumber
28534 INTEGER(INTG),
INTENT(IN) :: localelementnumber
28535 INTEGER(INTG),
INTENT(IN) :: componentnumber
28536 REAL(DP),
INTENT(IN) ::
value 28537 INTEGER(INTG),
INTENT(OUT) :: err
28538 TYPE(varying_string),
INTENT(OUT) :: error
28540 INTEGER(INTG) :: dofidx
28541 TYPE(decomposition_type),
POINTER :: decomposition
28542 TYPE(decomposition_topology_type),
POINTER :: decompositiontopology
28543 TYPE(field_parameter_set_type),
POINTER :: parameterset
28544 TYPE(field_variable_type),
POINTER :: fieldvariable
28545 TYPE(varying_string) :: localerror
28547 enters(
"Field_ParameterSetUpdateLocalGaussPointDP",err,error,*999)
28549 IF(
ASSOCIATED(field))
THEN 28550 IF(field%FIELD_FINISHED)
THEN 28551 IF(variabletype>=1.AND.variabletype<=field_number_of_variable_types)
THEN 28552 fieldvariable=>field%VARIABLE_TYPE_MAP(variabletype)%PTR
28553 IF(
ASSOCIATED(fieldvariable))
THEN 28554 IF(fieldvariable%DATA_TYPE==field_dp_type)
THEN 28555 IF(fieldsettype>0.AND.fieldsettype<=field_number_of_set_types)
THEN 28556 parameterset=>fieldvariable%PARAMETER_SETS%SET_TYPE(fieldsettype)%PTR
28557 IF(
ASSOCIATED(parameterset))
THEN 28558 IF(componentnumber>=1.AND.componentnumber<=fieldvariable%NUMBER_OF_COMPONENTS)
THEN 28559 SELECT CASE(fieldvariable%components(componentnumber)%INTERPOLATION_TYPE)
28560 CASE(field_constant_interpolation)
28561 localerror=
"Can not update by Gauss point for component number "// &
28562 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28563 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28564 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has constant interpolation." 28565 CALL flagerror(localerror,err,error,*999)
28566 CASE(field_element_based_interpolation)
28567 localerror=
"Can not update by Gauss point for component number "// &
28568 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28569 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28570 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has element based interpolation." 28571 CALL flagerror(localerror,err,error,*999)
28572 CASE(field_node_based_interpolation)
28573 localerror=
"Can not update by Gauss point for component number "// &
28574 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28575 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28576 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has node based interpolation." 28577 CALL flagerror(localerror,err,error,*999)
28578 CASE(field_grid_point_based_interpolation)
28579 localerror=
"Can not update by Gauss point for component number "// &
28580 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28581 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28582 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has grid point based interpolation." 28583 CALL flagerror(localerror,err,error,*999)
28584 CASE(field_gauss_point_based_interpolation)
28585 decomposition=>field%decomposition
28586 IF(
ASSOCIATED(decomposition))
THEN 28587 decompositiontopology=>decomposition%topology
28588 IF(
ASSOCIATED(decompositiontopology))
THEN 28589 IF(
ASSOCIATED(decompositiontopology%elements))
THEN 28590 IF(localelementnumber>=1.AND. &
28591 & localelementnumber<=decompositiontopology%elements%TOTAL_NUMBER_OF_ELEMENTS)
THEN 28593 IF(gausspointnumber >= 1 .AND. gausspointnumber <=
SIZE(fieldvariable% &
28594 & components(componentnumber)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS,1))
THEN 28595 dofidx=fieldvariable%components(componentnumber)%PARAM_TO_DOF_MAP% &
28596 & gauss_point_param2dof_map%GAUSS_POINTS(gausspointnumber,localelementnumber)
28597 CALL distributed_vector_values_set(parameterset%parameters,dofidx,
value,err,error,*999)
28599 localerror=
"The specified gauss point number "// &
28600 & trim(numbertovstring(gausspointnumber,
"*",err,error))// &
28601 &
" is not within the expected range." 28602 CALL flagerror(localerror,err,error,*999)
28605 localerror=
"Local element number "//trim(numbertovstring(localelementnumber,
"*",err,error))// &
28606 &
" is invalid. The local element number must be >=1 and <= "// &
28607 & trim(numbertovstring(decompositiontopology%elements%TOTAL_NUMBER_OF_ELEMENTS,
"*",err,error))//
"." 28608 CALL flagerror(localerror,err,error,*999)
28611 CALL flagerror(
"Decomposition topology elements is not associated.",err,error,*999)
28614 CALL flagerror(
"Decomposition topology is not associated.",err,error,*999)
28617 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
28619 CASE(field_data_point_based_interpolation)
28620 localerror=
"Can not update by local Gauss point for component number "// &
28621 & trim(numbertovstring(componentnumber,
"*",err,error))//
" of variable type "// &
28622 & trim(numbertovstring(variabletype,
"*",err,error))//
" of field number "// &
28623 & trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has data point based interpolation." 28624 CALL flagerror(localerror,err,error,*999)
28626 localerror=
"The field component interpolation type of "//trim(numbertovstring(fieldvariable% &
28627 & components(componentnumber)%INTERPOLATION_TYPE,
"*",err,error))// &
28628 &
" is invalid for component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
28629 &
" of variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
28630 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28631 CALL flagerror(localerror,err,error,*999)
28634 localerror=
"Component number "//trim(numbertovstring(componentnumber,
"*",err,error))// &
28635 &
" is invalid for variable type "//trim(numbertovstring(variabletype,
"*",err,error))// &
28636 &
" of field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
28637 & trim(numbertovstring(fieldvariable%NUMBER_OF_COMPONENTS,
"*",err,error))//
" components." 28638 CALL flagerror(localerror,err,error,*999)
28641 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
28642 &
" has not been created on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))
28643 CALL flagerror(localerror,err,error,*999)
28646 localerror=
"The field parameter set type of "//trim(numbertovstring(fieldsettype,
"*",err,error))// &
28647 &
" is invalid. The field parameter set type must be between 1 and "// &
28648 & trim(numbertovstring(field_number_of_set_types,
"*",err,error))//
"." 28649 CALL flagerror(localerror,err,error,*999)
28652 localerror=
"The field variable data type of "//trim(numbertovstring(fieldvariable%DATA_TYPE,
"*",err,error))// &
28653 &
" does not correspond to the double precision data type of the given value." 28654 CALL flagerror(localerror,err,error,*999)
28657 localerror=
"The specified field variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
28658 &
" has not been defined on field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
"." 28659 CALL flagerror(localerror,err,error,*999)
28662 localerror=
"The specified variable type of "//trim(numbertovstring(variabletype,
"*",err,error))// &
28663 &
" is invalid. The variable type must be between 1 and "// &
28664 & trim(numbertovstring(field_number_of_variable_types,
"*",err,error))//
"." 28665 CALL flagerror(localerror,err,error,*999)
28668 localerror=
"Field number "//trim(numbertovstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 28669 CALL flagerror(localerror,err,error,*999)
28672 CALL flagerror(
"Field is not associated.",err,error,*999)
28675 exits(
"Field_ParameterSetUpdateLocalGaussPointDP")
28677 999 errorsexits(
"Field_ParameterSetUpdateLocalGaussPointDP",err,error)
28680 END SUBROUTINE field_parametersetupdatelocalgausspointdp
28687 SUBROUTINE field_parametersetinterpolatesinglexidp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DERIVATIVE_NUMBER, &
28688 & user_element_number,xi,values,err,error,*)
28691 TYPE(field_type),
POINTER :: field
28692 INTEGER(INTG),
INTENT(IN) :: variable_type
28693 INTEGER(INTG),
INTENT(IN) :: field_set_type
28694 INTEGER(INTG),
INTENT(IN) :: derivative_number
28695 INTEGER(INTG),
INTENT(IN) :: user_element_number
28696 REAL(DP),
INTENT(IN) :: xi(:)
28697 REAL(DP),
INTENT(OUT) :: values(:)
28698 INTEGER(INTG),
INTENT(OUT) :: err
28699 TYPE(varying_string),
INTENT(OUT) :: error
28701 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolated_parameters(:)
28702 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_point(:)
28703 TYPE(decomposition_type),
POINTER :: decomposition
28704 TYPE(domain_elements_type),
POINTER :: domain_elements
28705 TYPE(field_variable_type),
POINTER :: field_variable
28706 INTEGER(INTG) :: numberofcomponents
28707 TYPE(varying_string) :: local_error
28709 enters(
"Field_ParameterSetInterpolateSingleXiDP",err,error,*999)
28711 NULLIFY(interpolated_parameters)
28712 NULLIFY(interpolated_point)
28714 IF(
ASSOCIATED(field))
THEN 28715 IF(field%FIELD_FINISHED)
THEN 28716 decomposition=>field%DECOMPOSITION
28717 IF(
ASSOCIATED(decomposition))
THEN 28718 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 28719 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
28720 IF(
ASSOCIATED(field_variable))
THEN 28721 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 28722 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 28723 domain_elements=>field_variable%COMPONENTS(decomposition%MESH_COMPONENT_NUMBER)%DOMAIN%TOPOLOGY%ELEMENTS
28724 IF(user_element_number>0.AND.user_element_number<=domain_elements%NUMBER_OF_ELEMENTS)
THEN 28725 CALL field_interpolation_parameters_initialise(field,interpolated_parameters,err,error,*999)
28726 CALL field_interpolated_points_initialise(interpolated_parameters,interpolated_point,err,error,*999)
28727 CALL field_interpolation_parameters_element_get(field_values_set_type,user_element_number, &
28728 & interpolated_parameters(variable_type)%PTR,err,error,*999)
28729 CALL field_number_of_components_get(field,variable_type,numberofcomponents,err,error,*999)
28730 IF(
SIZE(values)==numberofcomponents)
THEN 28731 IF(
SIZE(xi)==domain_elements%ELEMENTS(user_element_number)%BASIS%NUMBER_OF_XI)
THEN 28732 CALL field_interpolate_xi(derivative_number,xi(:),interpolated_point(variable_type)%PTR, &
28734 values(1:numberofcomponents)=interpolated_point(variable_type)%PTR% &
28735 & values(1:numberofcomponents,derivative_number)
28737 local_error=
"The specified xi to interpolate the field at are invalid. "// &
28738 &
"The supplied size is "// &
28739 & trim(number_to_vstring(
SIZE(xi),
"*",err,error))//
" and should be "// &
28740 & trim(number_to_vstring(domain_elements%ELEMENTS(user_element_number)%BASIS%NUMBER_OF_XI,
"*", &
28741 & err,error))//
" for this field." 28742 CALL flagerror(local_error,err,error,*999)
28745 local_error=
"The number of the coordinate values to return the interpolated field to is invalid. "// &
28746 &
"The supplied size is "//trim(number_to_vstring(
SIZE(values),
"*",err,error))//
" and should be "// &
28747 & trim(number_to_vstring(numberofcomponents,
"*", &
28748 & err,error))//
" for this field." 28749 CALL flagerror(local_error,err,error,*999)
28752 CALL field_interpolated_points_finalise(interpolated_point,err,error,*999)
28753 CALL field_interpolation_parameters_finalise(interpolated_parameters,err,error,*999)
28755 local_error=
"The specified element number of "//trim(number_to_vstring(user_element_number,
"*",err,error))// &
28756 &
" is invalid. The element number must be between 1 and "// &
28757 & trim(number_to_vstring(domain_elements%NUMBER_OF_ELEMENTS,
"*",err,error))//
"." 28758 CALL flagerror(local_error,err,error,*999)
28761 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
28762 &
" is invalid. The field parameter set type must be between 1 and "// &
28763 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 28764 CALL flagerror(local_error,err,error,*999)
28767 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
28768 &
" does not correspond to the double precision data type of the given value." 28769 CALL flagerror(local_error,err,error,*999)
28772 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
28773 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 28774 CALL flagerror(local_error,err,error,*999)
28777 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
28778 &
" is invalid. The variable type must be between 1 and "// &
28779 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 28780 CALL flagerror(local_error,err,error,*999)
28783 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
28786 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
28787 &
" has not been finished." 28788 CALL flagerror(local_error,err,error,*999)
28791 CALL flagerror(
"Field is not associated.",err,error,*999)
28794 exits(
"Field_ParameterSetInterpolateSingleXiDP")
28796 999 errorsexits(
"Field_ParameterSetInterpolateSingleXiDP",err,error)
28799 END SUBROUTINE field_parametersetinterpolatesinglexidp
28806 SUBROUTINE field_parametersetinterpolatemultiplexidp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DERIVATIVE_NUMBER, &
28807 & user_element_number,xi,values,err,error,*)
28810 TYPE(field_type),
POINTER :: field
28811 INTEGER(INTG),
INTENT(IN) :: variable_type
28812 INTEGER(INTG),
INTENT(IN) :: field_set_type
28813 INTEGER(INTG),
INTENT(IN) :: derivative_number
28814 INTEGER(INTG),
INTENT(IN) :: user_element_number
28815 REAL(DP),
INTENT(IN) :: xi(:,:)
28816 REAL(DP),
INTENT(OUT) :: values(:,:)
28817 INTEGER(INTG),
INTENT(OUT) :: err
28818 TYPE(varying_string),
INTENT(OUT) :: error
28820 INTEGER(INTG) :: xi_set
28821 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolated_parameters(:)
28822 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_point(:)
28823 TYPE(decomposition_type),
POINTER :: decomposition
28824 TYPE(domain_elements_type),
POINTER :: domain_elements
28825 TYPE(field_variable_type),
POINTER :: field_variable
28826 INTEGER(INTG) :: numberofcomponents
28827 TYPE(varying_string) :: local_error
28829 enters(
"Field_ParameterSetInterpolateMultipleXiDP",err,error,*999)
28831 NULLIFY(interpolated_parameters)
28832 NULLIFY(interpolated_point)
28834 IF(
ASSOCIATED(field))
THEN 28835 IF(field%FIELD_FINISHED)
THEN 28836 decomposition=>field%DECOMPOSITION
28837 IF(
ASSOCIATED(decomposition))
THEN 28838 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 28839 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
28840 IF(
ASSOCIATED(field_variable))
THEN 28841 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 28842 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 28843 domain_elements=>field_variable%COMPONENTS(decomposition%MESH_COMPONENT_NUMBER)%DOMAIN%TOPOLOGY%ELEMENTS
28844 IF(user_element_number>0.AND.user_element_number<=domain_elements%NUMBER_OF_ELEMENTS)
THEN 28845 CALL field_interpolation_parameters_initialise(field,interpolated_parameters,err,error,*999)
28846 CALL field_interpolated_points_initialise(interpolated_parameters,interpolated_point,err,error,*999)
28847 CALL field_interpolation_parameters_element_get(field_values_set_type,user_element_number, &
28848 & interpolated_parameters(variable_type)%PTR,err,error,*999)
28849 CALL field_number_of_components_get(field,variable_type,numberofcomponents,err,error,*999)
28850 IF(
SIZE(values,1)==numberofcomponents)
THEN 28851 IF(
SIZE(xi,1)==domain_elements%ELEMENTS(user_element_number)%BASIS%NUMBER_OF_XI)
THEN 28852 IF(
SIZE(values,2)==
SIZE(xi,2))
THEN 28853 DO xi_set=1,
SIZE(xi,2)
28854 CALL field_interpolate_xi(derivative_number,xi(:,xi_set),interpolated_point(variable_type)%PTR, &
28856 values(1:numberofcomponents,xi_set)=interpolated_point(variable_type)%PTR% &
28857 & values(1:numberofcomponents,derivative_number)
28860 local_error=
"The number of xi sets in the field interpolated values output array is "// &
28861 &
"not the same as the number to be interpolated." 28862 CALL flagerror(local_error,err,error,*999)
28865 local_error=
"The specified xi values to interpolate the field at are invalid. "// &
28866 &
"The supplied size is "// &
28867 & trim(number_to_vstring(
SIZE(xi,1),
"*",err,error))//
" and should be "// &
28868 & trim(number_to_vstring(domain_elements%ELEMENTS(user_element_number)%BASIS%NUMBER_OF_XI,
"*", &
28869 & err,error))//
" for this field." 28870 CALL flagerror(local_error,err,error,*999)
28873 local_error=
"The number of the coordinate values to return the interpolated field to is invalid. "// &
28874 &
"The supplied size is "//trim(number_to_vstring(
SIZE(values,1),
"*",err,error))//
" and should be "// &
28875 & trim(number_to_vstring(numberofcomponents,
"*",err,error))//
" for this field." 28876 CALL flagerror(local_error,err,error,*999)
28879 CALL field_interpolated_points_finalise(interpolated_point,err,error,*999)
28880 CALL field_interpolation_parameters_finalise(interpolated_parameters,err,error,*999)
28882 local_error=
"The specified element number of "//trim(number_to_vstring(user_element_number,
"*",err,error))// &
28883 &
" is invalid. The element number must be between 1 and "// &
28884 & trim(number_to_vstring(domain_elements%NUMBER_OF_ELEMENTS,
"*",err,error))//
"." 28885 CALL flagerror(local_error,err,error,*999)
28888 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
28889 &
" is invalid. The field parameter set type must be between 1 and "// &
28890 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 28891 CALL flagerror(local_error,err,error,*999)
28894 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
28895 &
" does not correspond to the double precision data type of the given value." 28896 CALL flagerror(local_error,err,error,*999)
28899 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
28900 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 28901 CALL flagerror(local_error,err,error,*999)
28904 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
28905 &
" is invalid. The variable type must be between 1 and "// &
28906 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 28907 CALL flagerror(local_error,err,error,*999)
28910 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
28913 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
28914 &
" has not been finished." 28915 CALL flagerror(local_error,err,error,*999)
28918 CALL flagerror(
"Field is not associated.",err,error,*999)
28921 exits(
"Field_ParameterSetInterpolateMultipleXiDP")
28923 999 errorsexits(
"Field_ParameterSetInterpolateMultipleXiDP",err,error)
28926 END SUBROUTINE field_parametersetinterpolatemultiplexidp
28933 SUBROUTINE field_parametersetinterpolatesinglegaussdp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DERIVATIVE_NUMBER, &
28934 & user_element_number,scheme,gauss_point,values,err,error,*)
28937 TYPE(field_type),
POINTER :: field
28938 INTEGER(INTG),
INTENT(IN) :: variable_type
28939 INTEGER(INTG),
INTENT(IN) :: field_set_type
28940 INTEGER(INTG),
INTENT(IN) :: derivative_number
28941 INTEGER(INTG),
INTENT(IN) :: user_element_number
28942 INTEGER(INTG),
INTENT(IN) :: scheme
28943 INTEGER(INTG),
INTENT(IN) :: gauss_point
28944 REAL(DP),
INTENT(OUT) :: values(:)
28945 INTEGER(INTG),
INTENT(OUT) :: err
28946 TYPE(varying_string),
INTENT(OUT) :: error
28948 TYPE(quadrature_scheme_type),
POINTER :: quadrature_scheme
28949 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolated_parameters(:)
28950 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_point(:)
28951 TYPE(decomposition_type),
POINTER :: decomposition
28952 TYPE(domain_elements_type),
POINTER :: domain_elements
28953 TYPE(field_variable_type),
POINTER :: field_variable
28954 INTEGER(INTG) :: numberofcomponents
28955 TYPE(varying_string) :: local_error
28957 enters(
"Field_ParameterSetInterpolateSingleGaussDP",err,error,*999)
28959 IF(
ASSOCIATED(field))
THEN 28960 IF(field%FIELD_FINISHED)
THEN 28961 decomposition=>field%DECOMPOSITION
28962 IF(
ASSOCIATED(decomposition))
THEN 28963 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 28964 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
28965 IF(
ASSOCIATED(field_variable))
THEN 28966 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 28967 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 28968 domain_elements=>field_variable%COMPONENTS(decomposition%MESH_COMPONENT_NUMBER)%DOMAIN%TOPOLOGY%ELEMENTS
28969 IF(user_element_number>0.AND.user_element_number<=domain_elements%NUMBER_OF_ELEMENTS)
THEN 28970 CALL field_interpolation_parameters_initialise(field,interpolated_parameters,err,error,*999)
28971 CALL field_interpolated_points_initialise(interpolated_parameters,interpolated_point,err,error,*999)
28972 CALL field_interpolation_parameters_element_get(field_values_set_type,user_element_number, &
28973 & interpolated_parameters(variable_type)%PTR,err,error,*999)
28974 CALL field_number_of_components_get(field,variable_type,numberofcomponents,err,error,*999)
28975 quadrature_scheme=>domain_elements%ELEMENTS(user_element_number)%BASIS%QUADRATURE% &
28976 & quadrature_scheme_map(scheme)%PTR
28977 IF(
ASSOCIATED(quadrature_scheme))
THEN 28978 IF(
SIZE(values)==numberofcomponents)
THEN 28979 IF(gauss_point>0.AND.gauss_point<=quadrature_scheme%NUMBER_OF_GAUSS)
THEN 28980 CALL field_interpolate_gauss(derivative_number,scheme,gauss_point, &
28981 & interpolated_point(variable_type)%PTR,err,error,*999)
28982 values(1:numberofcomponents)=interpolated_point(variable_type)%PTR% &
28983 & values(1:numberofcomponents,derivative_number)
28985 local_error=
"The specified Gauss point number of "// &
28986 & trim(number_to_vstring(gauss_point,
"*",err,error))//
"is invalid for "// &
28987 &
"the specified quadrature scheme of the specified element for this field which has "// &
28988 & trim(number_to_vstring(quadrature_scheme%NUMBER_OF_GAUSS,
"*",err,error))//
" Gauss points." 28989 CALL flagerror(local_error,err,error,*999)
28992 local_error=
"The number of the coordinate values to return the interpolated field to is invalid. "// &
28993 &
"The supplied size is "//trim(number_to_vstring(
SIZE(values),
"*",err,error))//
" and should be "// &
28994 & trim(number_to_vstring(numberofcomponents,
"*",err,error))//
" for this field." 28995 CALL flagerror(local_error,err,error,*999)
28998 CALL flagerror(
"The specified quadrature scheme is not associated the specified element's basis.", &
29002 CALL field_interpolated_points_finalise(interpolated_point,err,error,*999)
29003 CALL field_interpolation_parameters_finalise(interpolated_parameters,err,error,*999)
29005 local_error=
"The specified element number of "//trim(number_to_vstring(user_element_number,
"*",err,error))// &
29006 &
" is invalid. The element number must be between 1 and "// &
29007 & trim(number_to_vstring(domain_elements%NUMBER_OF_ELEMENTS,
"*",err,error))//
"." 29008 CALL flagerror(local_error,err,error,*999)
29011 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
29012 &
" is invalid. The field parameter set type must be between 1 and "// &
29013 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 29014 CALL flagerror(local_error,err,error,*999)
29017 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
29018 &
" does not correspond to the double precision data type of the given value." 29019 CALL flagerror(local_error,err,error,*999)
29022 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
29023 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 29024 CALL flagerror(local_error,err,error,*999)
29027 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
29028 &
" is invalid. The variable type must be between 1 and "// &
29029 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 29030 CALL flagerror(local_error,err,error,*999)
29033 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
29036 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
29037 &
" has not been finished." 29038 CALL flagerror(local_error,err,error,*999)
29041 CALL flagerror(
"Field is not associated.",err,error,*999)
29044 exits(
"Field_ParameterSetInterpolateSingleGaussDP")
29046 999 errorsexits(
"Field_ParameterSetInterpolateSingleGaussDP",err,error)
29049 END SUBROUTINE field_parametersetinterpolatesinglegaussdp
29056 SUBROUTINE field_parametersetinterpolatemultiplegaussdp(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DERIVATIVE_NUMBER, &
29057 & user_element_number,scheme,gauss_points,values,err,error,*)
29060 TYPE(field_type),
POINTER :: field
29061 INTEGER(INTG),
INTENT(IN) :: variable_type
29062 INTEGER(INTG),
INTENT(IN) :: field_set_type
29063 INTEGER(INTG),
INTENT(IN) :: derivative_number
29064 INTEGER(INTG),
INTENT(IN) :: user_element_number
29065 INTEGER(INTG),
INTENT(IN) :: scheme
29066 INTEGER(INTG),
INTENT(IN) :: gauss_points(:)
29067 REAL(DP),
INTENT(OUT) :: values(:,:)
29068 INTEGER(INTG),
INTENT(OUT) :: err
29069 TYPE(varying_string),
INTENT(OUT) :: error
29071 INTEGER(INTG) :: gauss_point
29072 INTEGER(INTG) :: decomposition_local_element_number
29073 LOGICAL :: ghost_element,user_element_exists
29074 TYPE(quadrature_scheme_type),
POINTER :: quadrature_scheme
29075 TYPE(field_interpolation_parameters_ptr_type),
POINTER :: interpolated_parameters(:)
29076 TYPE(field_interpolated_point_ptr_type),
POINTER :: interpolated_point(:)
29077 TYPE(decomposition_topology_type),
POINTER :: decomposition_topology
29078 TYPE(decomposition_type),
POINTER :: decomposition
29079 TYPE(domain_elements_type),
POINTER :: domain_elements
29080 TYPE(field_variable_type),
POINTER :: field_variable
29081 INTEGER(INTG) :: numberofcomponents
29082 TYPE(varying_string) :: local_error
29084 enters(
"Field_ParameterSetInterpolateMultipleGaussDP",err,error,*999)
29086 IF(
ASSOCIATED(field))
THEN 29087 IF(field%FIELD_FINISHED)
THEN 29088 decomposition=>field%DECOMPOSITION
29089 IF(
ASSOCIATED(decomposition))
THEN 29090 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 29091 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
29092 IF(
ASSOCIATED(field_variable))
THEN 29093 IF(field_variable%DATA_TYPE==field_dp_type)
THEN 29094 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 29095 domain_elements=>field_variable%COMPONENTS(decomposition%MESH_COMPONENT_NUMBER)%DOMAIN%TOPOLOGY%ELEMENTS
29096 decomposition_topology=>decomposition%TOPOLOGY
29097 CALL decomposition_topology_element_check_exists(decomposition_topology,user_element_number, &
29098 & user_element_exists,decomposition_local_element_number,ghost_element,err,error,*999)
29099 IF(user_element_exists)
THEN 29100 CALL field_interpolation_parameters_initialise(field,interpolated_parameters,err,error,*999)
29101 CALL field_interpolated_points_initialise(interpolated_parameters,interpolated_point,err,error,*999)
29102 CALL field_interpolation_parameters_element_get(field_values_set_type,decomposition_local_element_number, &
29103 & interpolated_parameters(variable_type)%PTR,err,error,*999)
29104 CALL field_number_of_components_get(field,variable_type,numberofcomponents,err,error,*999)
29105 quadrature_scheme=>domain_elements%ELEMENTS(decomposition_local_element_number)%BASIS%QUADRATURE% &
29106 & quadrature_scheme_map(scheme)%PTR
29107 IF(
ASSOCIATED(quadrature_scheme))
THEN 29108 IF(
SIZE(values,1)==numberofcomponents)
THEN 29109 IF(
SIZE(gauss_points)==0)
THEN 29110 IF(
SIZE(values,2)==quadrature_scheme%NUMBER_OF_GAUSS)
THEN 29111 DO gauss_point=1,quadrature_scheme%NUMBER_OF_GAUSS
29112 CALL field_interpolate_gauss(derivative_number,scheme,gauss_point, &
29113 & interpolated_point(variable_type)%PTR,err,error,*999)
29114 values(1:numberofcomponents,gauss_point)=interpolated_point(variable_type)%PTR% &
29115 & values(1:numberofcomponents,derivative_number)
29118 local_error=
"The number of Gauss points in the field interpolated values output array is "// &
29119 &
"invalid. For returning the interpolated field values at all element Gauss points, the "//&
29120 &
"output array is required to be allocated for "// &
29121 & trim(number_to_vstring(quadrature_scheme%NUMBER_OF_GAUSS,
"*",err,error))// &
29122 &
" Gauss points for the specified quadrature scheme." 29123 CALL flagerror(local_error,err,error,*999)
29126 IF(
SIZE(values,2)==
SIZE(gauss_points))
THEN 29127 DO gauss_point=1,
SIZE(gauss_points)
29128 IF(gauss_points(gauss_point)>0.AND.gauss_points(gauss_point)<=quadrature_scheme% &
29129 & number_of_gauss)
THEN 29130 CALL field_interpolate_gauss(derivative_number,scheme,gauss_points(gauss_point), &
29131 & interpolated_point(variable_type)%PTR,err,error,*999)
29132 values(:,gauss_point)=interpolated_point(variable_type)%PTR%VALUES(:,derivative_number)
29134 local_error=
"The specified Gauss point number of "// &
29135 & trim(number_to_vstring(gauss_points(gauss_point),
"*",err,error))//
"is invalid for "// &
29136 &
"the specified quadrature scheme of the specified element for this field which has "// &
29137 & trim(number_to_vstring(quadrature_scheme%NUMBER_OF_GAUSS,
"*",err,error))//
" Gauss points." 29138 CALL flagerror(local_error,err,error,*999)
29142 local_error=
"The number of Gauss points in the field interpolated values output array is "// &
29143 &
"not the same as the number to be interpolated." 29144 CALL flagerror(local_error,err,error,*999)
29148 local_error=
"The number of the coordinate values to return the interpolated field to is invalid. "// &
29149 &
"The supplied size is "//trim(number_to_vstring(
SIZE(values,1),
"*",err,error))//
" and should be "// &
29150 & trim(number_to_vstring(numberofcomponents,
"*",err,error))//
" for this field." 29151 CALL flagerror(local_error,err,error,*999)
29154 CALL flagerror(
"The specified quadrature scheme is not associated the specified element's basis.", &
29158 CALL field_interpolated_points_finalise(interpolated_point,err,error,*999)
29159 CALL field_interpolation_parameters_finalise(interpolated_parameters,err,error,*999)
29161 local_error=
"The specified user element number of "// &
29162 & trim(number_to_vstring(user_element_number,
"*",err,error))// &
29163 &
" does not exist in the decomposition for field variable type "// &
29164 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
29165 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 29166 CALL flagerror(local_error,err,error,*999)
29169 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
29170 &
" is invalid. The field parameter set type must be between 1 and "// &
29171 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 29172 CALL flagerror(local_error,err,error,*999)
29175 local_error=
"The field variable data type of "//trim(number_to_vstring(field_variable%DATA_TYPE,
"*",err,error))// &
29176 &
" does not correspond to the double precision data type of the given value." 29177 CALL flagerror(local_error,err,error,*999)
29180 local_error=
"The specified field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
29181 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 29182 CALL flagerror(local_error,err,error,*999)
29185 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
29186 &
" is invalid. The variable type must be between 1 and "// &
29187 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 29188 CALL flagerror(local_error,err,error,*999)
29191 CALL flagerror(
"Field decomposition is not associated.",err,error,*999)
29194 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
29195 &
" has not been finished." 29196 CALL flagerror(local_error,err,error,*999)
29199 CALL flagerror(
"Field is not associated.",err,error,*999)
29202 exits(
"Field_ParameterSetInterpolateMultipleGaussDP")
29204 999 errors(
"Field_ParameterSetInterpolateMultipleGaussDP",err,error)
29205 exits(
"Field_ParameterSetInterpolateMultipleGaussDP")
29208 END SUBROUTINE field_parametersetinterpolatemultiplegaussdp
29215 SUBROUTINE field_parameter_set_update_start(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,ERR,ERROR,*)
29218 TYPE(field_type),
POINTER :: field
29219 INTEGER(INTG),
INTENT(IN) :: variable_type
29220 INTEGER(INTG),
INTENT(IN) :: field_set_type
29221 INTEGER(INTG),
INTENT(OUT) :: err
29222 TYPE(varying_string),
INTENT(OUT) :: error
29224 TYPE(field_parameter_set_type),
POINTER :: parameter_set
29225 TYPE(field_variable_type),
POINTER :: field_variable
29226 TYPE(varying_string) :: local_error
29228 enters(
"FIELD_PARAMETER_SET_UPDATE_START",err,error,*999)
29230 IF(
ASSOCIATED(field))
THEN 29231 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 29232 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
29233 IF(
ASSOCIATED(field_variable))
THEN 29234 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 29235 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
29236 IF(
ASSOCIATED(parameter_set))
THEN 29237 CALL distributed_vector_update_start(parameter_set%PARAMETERS,err,error,*999)
29239 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
29240 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 29241 CALL flagerror(local_error,err,error,*999)
29244 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
29245 &
" is invalid. The field parameter set type must be between 1 and "// &
29246 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 29247 CALL flagerror(local_error,err,error,*999)
29250 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
29251 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 29252 CALL flagerror(local_error,err,error,*999)
29255 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
29256 &
" is invalid. The variable type must be between 1 and "// &
29257 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 29258 CALL flagerror(local_error,err,error,*999)
29261 CALL flagerror(
"Field is not associated.",err,error,*999)
29264 exits(
"FIELD_PARAMETER_SET_UPDATE_START")
29266 999 errorsexits(
"FIELD_PARAMETER_SET_UPDATE_START",err,error)
29268 END SUBROUTINE field_parameter_set_update_start
29275 SUBROUTINE field_parameter_set_vector_get(FIELD,VARIABLE_TYPE,FIELD_SET_TYPE,DISTRIBUTED_VECTOR,ERR,ERROR,*)
29278 TYPE(field_type),
POINTER :: field
29279 INTEGER(INTG),
INTENT(IN) :: variable_type
29280 INTEGER(INTG),
INTENT(IN) :: field_set_type
29281 TYPE(distributed_vector_type),
POINTER :: distributed_vector
29282 INTEGER(INTG),
INTENT(OUT) :: err
29283 TYPE(varying_string),
INTENT(OUT) :: error
29285 TYPE(field_parameter_set_type),
POINTER :: parameter_set
29286 TYPE(field_variable_type),
POINTER :: field_variable
29287 TYPE(varying_string) :: local_error
29289 enters(
"FIELD_PARAMETER_SET_VECTOR_GET",err,error,*999)
29291 IF(
ASSOCIATED(field))
THEN 29292 IF(
ASSOCIATED(distributed_vector))
THEN 29293 CALL flagerror(
"Distributed vector is already associated.",err,error,*999)
29295 NULLIFY(distributed_vector)
29296 IF(field%FIELD_FINISHED)
THEN 29297 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 29298 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
29299 IF(
ASSOCIATED(field_variable))
THEN 29300 IF(field_set_type>0.AND.field_set_type<=field_number_of_set_types)
THEN 29301 parameter_set=>field_variable%PARAMETER_SETS%SET_TYPE(field_set_type)%PTR
29302 IF(
ASSOCIATED(parameter_set))
THEN 29303 distributed_vector=>parameter_set%PARAMETERS
29304 IF(.NOT.
ASSOCIATED(distributed_vector)) &
29305 &
CALL flagerror(
"Call parameter set distributed vector is not associated.",err,error,*999)
29307 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
29308 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 29309 CALL flagerror(local_error,err,error,*999)
29312 local_error=
"The field parameter set type of "//trim(number_to_vstring(field_set_type,
"*",err,error))// &
29313 &
" is invalid. The field parameter set type must be between 1 and "// &
29314 & trim(number_to_vstring(field_number_of_set_types,
"*",err,error))//
"." 29315 CALL flagerror(local_error,err,error,*999)
29318 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
29319 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 29320 CALL flagerror(local_error,err,error,*999)
29323 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
29324 &
" is invalid. The variable type must be between 1 and "// &
29325 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 29326 CALL flagerror(local_error,err,error,*999)
29329 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
29330 &
" has not been finished." 29331 CALL flagerror(local_error,err,error,*999)
29335 CALL flagerror(
"Field is not associated.",err,error,*999)
29338 exits(
"FIELD_PARAMETER_SET_VECTOR_GET")
29340 999 errorsexits(
"FIELD_PARAMETER_SET_VECTOR_GET",err,error)
29342 END SUBROUTINE field_parameter_set_vector_get
29349 SUBROUTINE field_parameter_sets_finalise(FIELD_VARIABLE,ERR,ERROR,*)
29352 TYPE(field_variable_type) :: field_variable
29353 INTEGER(INTG),
INTENT(OUT) :: err
29354 TYPE(varying_string),
INTENT(OUT) :: error
29356 INTEGER(INTG) :: parameter_set_idx
29358 enters(
"FIELD_PARAMETER_SETS_FINALISE",err,error,*999)
29360 IF(
ASSOCIATED(field_variable%PARAMETER_SETS%SET_TYPE))
DEALLOCATE(field_variable%PARAMETER_SETS%SET_TYPE)
29361 IF(
ASSOCIATED(field_variable%PARAMETER_SETS%PARAMETER_SETS))
THEN 29362 DO parameter_set_idx=1,
SIZE(field_variable%PARAMETER_SETS%PARAMETER_SETS,1)
29363 CALL field_parameter_set_finalise(field_variable%PARAMETER_SETS%PARAMETER_SETS(parameter_set_idx)%PTR,err,error,*999)
29365 DEALLOCATE(field_variable%PARAMETER_SETS%PARAMETER_SETS)
29367 field_variable%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS=0
29369 exits(
"FIELD_PARAMETER_SETS_FINALISE")
29371 999 errorsexits(
"FIELD_PARAMETER_SETS_FINALISE",err,error)
29373 END SUBROUTINE field_parameter_sets_finalise
29380 SUBROUTINE field_parameter_sets_initialise(FIELD,ERR,ERROR,*)
29383 TYPE(field_type),
POINTER :: field
29384 INTEGER(INTG),
INTENT(OUT) :: err
29385 TYPE(varying_string),
INTENT(OUT) :: error
29387 INTEGER(INTG) :: dummy_err,parameter_set_idx,variable_idx
29388 TYPE(varying_string) :: dummy_error
29390 enters(
"FIELD_PARAMETER_SETS_INITIALISE",err,error,*998)
29392 IF(
ASSOCIATED(field))
THEN 29393 DO variable_idx=1,field%NUMBER_OF_VARIABLES
29394 field%VARIABLES(variable_idx)%PARAMETER_SETS%FIELD_VARIABLE=>field%VARIABLES(variable_idx)
29395 field%VARIABLES(variable_idx)%PARAMETER_SETS%NUMBER_OF_PARAMETER_SETS=0
29396 NULLIFY(field%VARIABLES(variable_idx)%PARAMETER_SETS%PARAMETER_SETS)
29397 ALLOCATE(field%VARIABLES(variable_idx)%PARAMETER_SETS%SET_TYPE(field_number_of_set_types),stat=err)
29398 IF(err/=0)
CALL flagerror(
"Could not allocate field parameter sets set types.",err,error,*999)
29399 DO parameter_set_idx=1,field_number_of_set_types
29400 NULLIFY(field%VARIABLES(variable_idx)%PARAMETER_SETS%SET_TYPE(parameter_set_idx)%PTR)
29403 CALL field_parameter_set_create(field,field%VARIABLES(variable_idx)%VARIABLE_TYPE,field_values_set_type,err,error,*999)
29406 CALL flagerror(
"Field is not associated.",err,error,*998)
29409 exits(
"FIELD_PARAMETER_SETS_INITIALISE")
29411 999
DO variable_idx=1,field_number_of_variable_types
29412 IF(
ASSOCIATED(field%VARIABLE_TYPE_MAP(variable_idx)%PTR)) &
29413 &
CALL field_parameter_sets_finalise(field%VARIABLE_TYPE_MAP(variable_idx)%PTR,dummy_err,dummy_error,*998)
29415 998 errorsexits(
"FIELD_PARAMETER_SETS_INITIALISE",err,error)
29417 END SUBROUTINE field_parameter_sets_initialise
29424 SUBROUTINE field_region_get(FIELD,REGION,ERR,ERROR,*)
29427 TYPE(field_type),
POINTER :: field
29428 TYPE(region_type),
POINTER :: region
29429 INTEGER(INTG),
INTENT(OUT) :: err
29430 TYPE(varying_string),
INTENT(OUT) :: error
29432 TYPE(interface_type),
POINTER :: interface
29433 TYPE(region_type),
POINTER :: parent_region
29434 TYPE(varying_string) :: local_error
29436 enters(
"FIELD_REGION_GET",err,error,*999)
29438 IF(
ASSOCIATED(field))
THEN 29439 IF(
ASSOCIATED(region))
THEN 29440 CALL flagerror(
"Region is already associated.",err,error,*999)
29444 region=>field%REGION
29445 IF(.NOT.
ASSOCIATED(region))
THEN 29446 interface=>field%INTERFACE
29447 IF(
ASSOCIATED(interface))
THEN 29448 parent_region=>interface%PARENT_REGION
29449 IF(
ASSOCIATED(parent_region))
THEN 29450 region=>parent_region
29452 local_error=
"The parent region not associated for field number "// &
29453 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" of interface number "// &
29454 & trim(number_to_vstring(interface%USER_NUMBER,
"*",err,error))//
"." 29455 CALL flagerror(local_error,err,error,*999)
29458 local_error=
"The region or interface is not associated for field number "// &
29459 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 29460 CALL flagerror(local_error,err,error,*999)
29465 CALL flagerror(
"Field is not associated.",err,error,*999)
29468 exits(
"FIELD_REGION_GET")
29470 999 errorsexits(
"FIELD_REGION_GET",err,error)
29472 END SUBROUTINE field_region_get
29479 SUBROUTINE field_scaling_finalise(FIELD,SCALING_INDEX,ERR,ERROR,*)
29482 TYPE(field_type),
POINTER :: field
29483 INTEGER(INTG),
INTENT(IN) :: scaling_index
29484 INTEGER(INTG),
INTENT(OUT) :: err
29485 TYPE(varying_string),
INTENT(OUT) :: error
29487 TYPE(varying_string) :: local_error
29489 enters(
"FIELD_SCALING_FINALISE",err,error,*999)
29491 IF(
ASSOCIATED(field))
THEN 29492 IF(scaling_index>0.AND.scaling_index<=field%SCALINGS%NUMBER_OF_SCALING_INDICES)
THEN 29495 IF(
ASSOCIATED(field%SCALINGS%SCALINGS(scaling_index)%SCALE_FACTORS)) &
29496 &
CALL distributed_vector_destroy(field%SCALINGS%SCALINGS(scaling_index)%SCALE_FACTORS,err,error,*999)
29498 local_error=
"The scaling index of "//trim(number_to_vstring(scaling_index,
"*",err,error))// &
29499 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
29500 &
" which has "//trim(number_to_vstring(field%SCALINGS%NUMBER_OF_SCALING_INDICES,
"*",err,error))// &
29501 &
" scaling indices." 29502 CALL flagerror(local_error,err,error,*999)
29505 CALL flagerror(
"Field is not associated.",err,error,*999)
29508 exits(
"FIELD_SCALING_FINALISE")
29510 999 errorsexits(
"FIELD_SCALING_FINALISE",err,error)
29512 END SUBROUTINE field_scaling_finalise
29519 SUBROUTINE field_scaling_initialise(FIELD,SCALING_INDEX,MESH_COMPONENT_NUMBER,ERR,ERROR,*)
29522 TYPE(field_type),
POINTER :: field
29523 INTEGER(INTG),
INTENT(IN) :: scaling_index
29524 INTEGER(INTG),
INTENT(IN) :: mesh_component_number
29525 INTEGER(INTG),
INTENT(OUT) :: err
29526 TYPE(varying_string),
INTENT(OUT) :: error
29528 TYPE(varying_string) :: local_error
29530 enters(
"FIELD_SCALING_INITIALISE",err,error,*999)
29532 IF(
ASSOCIATED(field))
THEN 29533 IF(scaling_index>0.AND.scaling_index<=field%SCALINGS%NUMBER_OF_SCALING_INDICES)
THEN 29534 IF(mesh_component_number>0.AND.mesh_component_number<=field%DECOMPOSITION%MESH%NUMBER_OF_COMPONENTS)
THEN 29535 field%SCALINGS%SCALINGS(scaling_index)%MESH_COMPONENT_NUMBER=mesh_component_number
29536 field%SCALINGS%SCALINGS(scaling_index)%MAX_NUMBER_OF_ELEMENT_PARAMETERS=field%DECOMPOSITION% &
29537 & domain(mesh_component_number)%PTR%TOPOLOGY%ELEMENTS%MAXIMUM_NUMBER_OF_ELEMENT_PARAMETERS
29538 field%SCALINGS%SCALINGS(scaling_index)%MAX_NUMBER_OF_DERIVATIVES=field%DECOMPOSITION% &
29539 & domain(mesh_component_number)%PTR%TOPOLOGY%NODES%MAXIMUM_NUMBER_OF_DERIVATIVES
29540 NULLIFY(field%SCALINGS%SCALINGS(scaling_index)%SCALE_FACTORS)
29541 SELECT CASE(field%SCALINGS%SCALING_TYPE)
29542 CASE(field_no_scaling)
29544 CASE(field_unit_scaling,field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
29550 CALL distributed_vector_create_start(field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR%MAPPINGS%DOFS, &
29551 & field%SCALINGS%SCALINGS(scaling_index)%SCALE_FACTORS,err,error,*999)
29552 CALL distributed_vector_data_type_set(field%SCALINGS%SCALINGS(scaling_index)%SCALE_FACTORS, &
29553 & distributed_matrix_vector_dp_type,err,error,*999)
29554 CALL distributed_vector_create_finish(field%SCALINGS%SCALINGS(scaling_index)%SCALE_FACTORS,err,error,*999)
29555 IF(field%TYPE==field_geometric_type)
THEN 29557 CALL distributed_vector_all_values_set(field%SCALINGS%SCALINGS(scaling_index)%SCALE_FACTORS,1.0_dp,err,error,*999)
29559 CASE(field_arc_length_scaling)
29560 CALL flagerror(
"Not implemented.",err,error,*999)
29562 local_error=
"The scaling type of "//trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
29563 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 29564 CALL flagerror(local_error,err,error,*999)
29567 local_error=
"The mesh component number of "//trim(number_to_vstring(scaling_index,
"*",err,error))// &
29568 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
29569 &
" which is associated with a mesh which has "//trim(number_to_vstring(field%DECOMPOSITION% &
29570 & mesh%NUMBER_OF_COMPONENTS,
"*",err,error))//
" mesh components." 29571 CALL flagerror(local_error,err,error,*999)
29574 local_error=
"The scaling index of "//trim(number_to_vstring(scaling_index,
"*",err,error))// &
29575 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
29576 &
" which has "//trim(number_to_vstring(field%SCALINGS%NUMBER_OF_SCALING_INDICES,
"*",err,error))// &
29577 &
" scaling indices." 29578 CALL flagerror(local_error,err,error,*999)
29581 CALL flagerror(
"Field is not associated.",err,error,*999)
29584 exits(
"FIELD_SCALING_INITIALISE")
29586 999 errorsexits(
"FIELD_SCALING_INITIALISE",err,error)
29588 END SUBROUTINE field_scaling_initialise
29595 SUBROUTINE field_scalings_calculate(FIELD,ERR,ERROR,*)
29598 TYPE(field_type),
POINTER :: field
29599 INTEGER(INTG),
INTENT(OUT) :: err
29600 TYPE(varying_string),
INTENT(OUT) :: error
29602 INTEGER(INTG) :: mesh_component_number,xi_direction,ni1,ni2,version_idx,derivative_idx,nk2,local_node_line_idx, &
29603 & adjacent_local_node_line_idx,node_line_idx,node_idx,partial_derivative_idx,nu1,nu2,dof_idx,ny1,ny2,ny3,scaling_idx
29604 REAL(DP) :: length1,length2,mean_length,temp,number_of_line_versions1,number_of_line_versions2,value
29605 REAL(DP),
POINTER :: scale_factors(:)
29607 TYPE(decomposition_lines_type),
POINTER :: decomposition_lines
29608 TYPE(domain_type),
POINTER :: domain
29609 TYPE(domain_lines_type),
POINTER :: domain_lines
29610 TYPE(domain_nodes_type),
POINTER :: domain_nodes
29611 TYPE(field_type),
POINTER :: geometric_field
29612 TYPE(field_scaling_type),
POINTER :: field_scaling
29613 TYPE(field_scalings_type),
POINTER :: field_scalings
29614 TYPE(varying_string) :: local_error
29616 enters(
"FIELD_SCALINGS_CALCULATE",err,error,*999)
29618 IF(
ASSOCIATED(field))
THEN 29619 field_scalings=>field%SCALINGS
29620 IF(
ASSOCIATED(field_scalings))
THEN 29621 geometric_field=>field%GEOMETRIC_FIELD
29622 IF(
ASSOCIATED(geometric_field))
THEN 29623 SELECT CASE(field_scalings%SCALING_TYPE)
29624 CASE(field_no_scaling)
29627 CASE(field_unit_scaling)
29628 DO scaling_idx=1,field_scalings%NUMBER_OF_SCALING_INDICES
29629 field_scaling=>field_scalings%SCALINGS(scaling_idx)
29630 mesh_component_number=field_scaling%MESH_COMPONENT_NUMBER
29631 domain=>field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR
29632 CALL distributed_vector_all_values_set(field_scaling%SCALE_FACTORS,1.0_dp,err,error,*999)
29633 CALL distributed_vector_update_start(field_scaling%SCALE_FACTORS,err,error,*999)
29634 CALL distributed_vector_update_finish(field_scaling%SCALE_FACTORS,err,error,*999)
29636 CASE(field_arc_length_scaling)
29637 CALL flagerror(
"Not implemented.",err,error,*999)
29639 CASE(field_arithmetic_mean_scaling,field_geometric_mean_scaling,field_harmonic_mean_scaling)
29640 DO scaling_idx=1,field_scalings%NUMBER_OF_SCALING_INDICES
29641 field_scaling=>field_scalings%SCALINGS(scaling_idx)
29642 mesh_component_number=field_scaling%MESH_COMPONENT_NUMBER
29643 domain=>field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR
29644 domain_nodes=>domain%TOPOLOGY%NODES
29645 IF(field%DECOMPOSITION%CALCULATE_LINES)
THEN 29646 domain_lines=>domain%TOPOLOGY%LINES
29647 decomposition_lines=>field%DECOMPOSITION%TOPOLOGY%LINES
29649 NULLIFY(scale_factors)
29650 CALL distributed_vector_data_get(field_scaling%SCALE_FACTORS,scale_factors,err,error,*999)
29651 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
29652 DO derivative_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
29653 partial_derivative_idx=domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%PARTIAL_DERIVATIVE_INDEX
29654 SELECT CASE(partial_derivative_idx)
29655 CASE(no_part_deriv)
29656 DO version_idx=1,domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
29657 dof_idx=domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%DOF_INDEX(version_idx)
29658 CALL distributed_vector_values_set(field_scaling%SCALE_FACTORS,dof_idx,1.0_dp,err,error,*999)
29660 CASE(part_deriv_s1,part_deriv_s2,part_deriv_s3)
29661 IF(field%DECOMPOSITION%CALCULATE_LINES)
THEN 29662 IF(partial_derivative_idx==part_deriv_s1)
THEN 29664 ELSE IF(partial_derivative_idx==part_deriv_s2)
THEN 29671 number_of_line_versions1 = 0.0_dp
29672 number_of_line_versions2 = 0.0_dp
29673 DO version_idx=1,domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
29676 DO node_line_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_NODE_LINES
29677 local_node_line_idx=domain_nodes%NODES(node_idx)%NODE_LINES(node_line_idx)
29678 IF(decomposition_lines%LINES(local_node_line_idx)%XI_DIRECTION==xi_direction)
THEN 29684 IF(domain_lines%LINES(local_node_line_idx)%NODES_IN_LINE(1)==node_idx)
THEN 29685 adjacent_local_node_line_idx=decomposition_lines%LINES(local_node_line_idx)%ADJACENT_LINES(0)
29687 adjacent_local_node_line_idx=decomposition_lines%LINES(local_node_line_idx)%ADJACENT_LINES(1)
29690 length1=length1+geometric_field%GEOMETRIC_FIELD_PARAMETERS%LENGTHS(local_node_line_idx)
29691 number_of_line_versions1=number_of_line_versions1+1
29692 IF(adjacent_local_node_line_idx/=0)
THEN 29693 length2=length2+geometric_field%GEOMETRIC_FIELD_PARAMETERS%LENGTHS(adjacent_local_node_line_idx)
29694 number_of_line_versions2=number_of_line_versions2+1
29697 local_error=
"Could not find a line in the Xi "//trim(number_to_vstring(xi_direction,
"*",err,error))// &
29698 &
" direction going through node number "//trim(number_to_vstring(node_idx,
"*",err,error))//
"." 29699 CALL flagerror(local_error,err,error,*999)
29703 length1 = length1/number_of_line_versions1
29704 IF(adjacent_local_node_line_idx==0)
THEN 29705 mean_length=length1
29707 length2 = length2/number_of_line_versions2
29708 SELECT CASE(field_scalings%SCALING_TYPE)
29709 CASE(field_arithmetic_mean_scaling)
29710 mean_length=(length1+length2)/2.0_dp
29711 CASE(field_geometric_mean_scaling)
29712 mean_length=sqrt(length1*length2)
29713 CASE(field_harmonic_mean_scaling)
29714 temp=length1*length2
29715 IF(abs(temp)>zero_tolerance)
THEN 29716 mean_length=2.0_dp*temp/(length1+length2)
29721 local_error=
"The scaling type of "// &
29722 & trim(number_to_vstring(field_scalings%SCALING_TYPE,
"*",err,error))//
" is invalid." 29723 CALL flagerror(local_error,err,error,*999)
29726 DO version_idx=1,domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
29727 dof_idx=domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%DOF_INDEX(version_idx)
29728 CALL distributed_vector_values_set(field_scaling%SCALE_FACTORS,dof_idx,mean_length,err,error,*999)
29731 CASE(part_deriv_s1_s2,part_deriv_s1_s3,part_deriv_s2_s3,part_deriv_s1_s2_s3)
29732 DO version_idx=1,domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
29733 dof_idx=domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%DOF_INDEX(version_idx)
29734 IF(partial_derivative_idx==part_deriv_s1_s2)
THEN 29739 ELSE IF(partial_derivative_idx==part_deriv_s1_s3)
THEN 29744 ELSE IF(partial_derivative_idx==part_deriv_s2_s3)
THEN 29758 DO nk2=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
29759 IF(domain_nodes%NODES(node_idx)%DERIVATIVES(nk2)%PARTIAL_DERIVATIVE_INDEX==nu1)
THEN 29760 ny1=domain_nodes%NODES(node_idx)%DERIVATIVES(nk2)%DOF_INDEX(version_idx)
29768 DO nk2=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
29769 IF(domain_nodes%NODES(node_idx)%DERIVATIVES(nk2)%PARTIAL_DERIVATIVE_INDEX==nu2)
THEN 29770 ny2=domain_nodes%NODES(node_idx)%DERIVATIVES(nk2)%DOF_INDEX(version_idx)
29776 IF(partial_derivative_idx==part_deriv_s1_s2_s3)
THEN 29779 DO nk2=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
29780 IF(domain_nodes%NODES(node_idx)%DERIVATIVES(nk2)%PARTIAL_DERIVATIVE_INDEX==part_deriv_s3)
THEN 29781 ny3=domain_nodes%NODES(node_idx)%DERIVATIVES(nk2)%DOF_INDEX(version_idx)
29787 CALL distributed_vector_values_set(field_scaling%SCALE_FACTORS,dof_idx, &
29788 scale_factors(ny1)*scale_factors(ny2)*scale_factors(ny3),err,error,*999)
29790 local_error=
"Could not find the first partial derivative in the s3 direction index for "//&
29791 &
"local node number "//trim(number_to_vstring(node_idx,
"*",err,error))//
"." 29792 CALL flagerror(local_error,err,error,*999)
29795 CALL distributed_vector_values_set(field_scaling%SCALE_FACTORS,dof_idx,scale_factors(ny1)* &
29796 & scale_factors(ny2),err,error,*999)
29799 local_error=
"Could not find the first partial derivative in the s"// &
29800 & trim(number_to_vstring(ni2,
"*",err,error))//
" direction index for "//&
29801 &
"local node number "//trim(number_to_vstring(node_idx,
"*",err,error))//
"." 29802 CALL flagerror(local_error,err,error,*999)
29805 local_error=
"Could not find the first partial derivative in the s"// &
29806 & trim(number_to_vstring(ni1,
"*",err,error))//
" direction index for "//&
29807 &
"local node number "//trim(number_to_vstring(node_idx,
"*",err,error))//
"." 29811 local_error=
"The partial derivative index of "//trim(number_to_vstring(partial_derivative_idx,
"*", &
29812 & err,error))//
" for derivative number "//trim(number_to_vstring(derivative_idx,
"*",err,error))// &
29813 &
" of local node number "//trim(number_to_vstring(node_idx,
"*",err,error))//
" is invalid." 29814 CALL flagerror(local_error,err,error,*999)
29818 CALL distributed_vector_update_start(field_scaling%SCALE_FACTORS,err,error,*999)
29819 CALL distributed_vector_update_finish(field_scaling%SCALE_FACTORS,err,error,*999)
29822 local_error=
"The scaling type of "//trim(number_to_vstring(field_scalings%SCALING_TYPE,
"*",err,error))// &
29824 CALL flagerror(local_error,err,error,*999)
29827 CALL flagerror(
"Field geometric field is not associated.",err,error,*999)
29830 CALL flagerror(
"Field scalings is not associated.",err,error,*999)
29833 CALL flagerror(
"Field is not associated.",err,error,*999)
29836 IF(diagnostics1)
THEN 29837 IF(field_scalings%SCALING_TYPE /= field_no_scaling)
THEN 29838 IF(
ASSOCIATED(domain))
THEN 29839 domain_nodes=>domain%TOPOLOGY%NODES
29840 CALL write_string(diagnostic_output_type,
"Scale Factors for nodes in the domain:",err,error,*999)
29841 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
29842 CALL write_string_value(diagnostic_output_type,
"Node : ",node_idx,err,error,*999)
29843 CALL write_string_value(diagnostic_output_type,
" Number of Derivatives = ", &
29844 & domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES,err,error,*999)
29845 DO derivative_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
29846 CALL write_string_value(diagnostic_output_type,
" Derivative : ",derivative_idx,err,error,*999)
29847 CALL write_string_value(diagnostic_output_type,
" Number of Versions = ", &
29848 & domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions,err,error,*999)
29849 DO version_idx=1,domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%numberOfVersions
29850 CALL write_string_value(diagnostic_output_type,
" Version : ",version_idx,err,error,*999)
29851 dof_idx=domain_nodes%NODES(node_idx)%DERIVATIVES(derivative_idx)%DOF_INDEX(version_idx)
29852 CALL distributed_vector_values_get(field_scaling%SCALE_FACTORS,dof_idx,
VALUE,err,error,*999)
29853 CALL write_string_value(diagnostic_output_type,
" Scale Factor : ",
VALUE,err,error,*999)
29861 exits(
"FIELD_SCALINGS_CALCULATE")
29863 999 errorsexits(
"FIELD_SCALINGS_CALCULATE",err,error)
29865 END SUBROUTINE field_scalings_calculate
29872 SUBROUTINE field_scalings_finalise(FIELD,ERR,ERROR,*)
29875 TYPE(field_type),
POINTER :: field
29876 INTEGER(INTG),
INTENT(OUT) :: err
29877 TYPE(varying_string),
INTENT(OUT) :: error
29879 INTEGER(INTG) :: scaling_idx
29881 enters(
"FIELD_SCALINGS_FINALISE",err,error,*999)
29883 IF(
ASSOCIATED(field))
THEN 29884 DO scaling_idx=1,field%SCALINGS%NUMBER_OF_SCALING_INDICES
29885 CALL field_scaling_finalise(field,scaling_idx,err,error,*999)
29887 IF(
ALLOCATED(field%SCALINGS%SCALINGS))
DEALLOCATE(field%SCALINGS%SCALINGS)
29889 CALL flagerror(
"Field is not associated.",err,error,*999)
29892 exits(
"FIELD_SCALINGS_FINALISE")
29894 999 errorsexits(
"FIELD_SCALINGS_FINALISE",err,error)
29896 END SUBROUTINE field_scalings_finalise
29903 SUBROUTINE field_scalings_initialise(FIELD,ERR,ERROR,*)
29906 TYPE(field_type),
POINTER :: field
29907 INTEGER(INTG),
INTENT(OUT) :: err
29908 TYPE(varying_string),
INTENT(OUT) :: error
29910 INTEGER(INTG) :: component_idx,dummy_err,number_of_mesh_components,scaling_idx,variable_idx
29911 INTEGER(INTG),
ALLOCATABLE :: mesh_components(:),mesh_components_map(:)
29912 TYPE(list_type),
POINTER :: mesh_components_list
29913 TYPE(varying_string) :: dummy_error
29915 NULLIFY(mesh_components_list)
29917 enters(
"FIELD_SCALINGS_INITIALISE",err,error,*997)
29919 IF(
ASSOCIATED(field))
THEN 29921 CALL list_create_start(mesh_components_list,err,error,*999)
29922 CALL list_data_type_set(mesh_components_list,list_intg_type,err,error,*999)
29923 CALL list_initial_size_set(mesh_components_list,field%DECOMPOSITION%MESH%NUMBER_OF_COMPONENTS,err,error,*999)
29924 CALL list_create_finish(mesh_components_list,err,error,*999)
29925 DO variable_idx=1,field%NUMBER_OF_VARIABLES
29926 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
29927 CALL list_item_add(mesh_components_list,field%VARIABLES(variable_idx)%COMPONENTS(component_idx)%MESH_COMPONENT_NUMBER, &
29931 CALL list_remove_duplicates(mesh_components_list,err,error,*999)
29932 CALL list_detach_and_destroy(mesh_components_list,number_of_mesh_components,mesh_components,err,error,*999)
29933 ALLOCATE(mesh_components_map(field%DECOMPOSITION%MESH%NUMBER_OF_COMPONENTS),stat=err)
29934 IF(err/=0)
CALL flagerror(
"Could not allocate mesh components map.",err,error,*999)
29935 mesh_components_map=0
29936 DO component_idx=1,number_of_mesh_components
29937 mesh_components_map(mesh_components(component_idx))=component_idx
29940 field%SCALINGS%NUMBER_OF_SCALING_INDICES=number_of_mesh_components
29941 ALLOCATE(field%SCALINGS%SCALINGS(field%SCALINGS%NUMBER_OF_SCALING_INDICES),stat=err)
29942 IF(err/=0)
CALL flagerror(
"Could not allocate field scalings.",err,error,*999)
29943 DO scaling_idx=1,field%SCALINGS%NUMBER_OF_SCALING_INDICES
29944 CALL field_scaling_initialise(field,scaling_idx,mesh_components(scaling_idx),err,error,*999)
29947 DO variable_idx=1,field%NUMBER_OF_VARIABLES
29948 DO component_idx=1,field%VARIABLES(variable_idx)%NUMBER_OF_COMPONENTS
29949 field%VARIABLES(variable_idx)%COMPONENTS(component_idx)%SCALING_INDEX= &
29950 & mesh_components_map(field%VARIABLES(variable_idx)%COMPONENTS(component_idx)%MESH_COMPONENT_NUMBER)
29953 DEALLOCATE(mesh_components)
29954 IF(field%TYPE/=field_geometric_type)
CALL field_scalings_calculate(field,err,error,*999)
29956 CALL flagerror(
"Field is not associated.",err,error,*997)
29959 exits(
"FIELD_SCALINGS_INITIALISE")
29961 999
IF(
ALLOCATED(mesh_components))
DEALLOCATE(mesh_components)
29962 IF(
ASSOCIATED(mesh_components_list))
CALL list_destroy(mesh_components_list,err,error,*998)
29963 998
CALL field_scalings_finalise(field,dummy_err,dummy_error,*997)
29964 997 errorsexits(
"FIELD_SCALINGS_INITIALISE",err,error)
29966 END SUBROUTINE field_scalings_initialise
29973 SUBROUTINE field_scaling_type_check(FIELD,SCALING_TYPE,ERR,ERROR,*)
29976 TYPE(field_type),
POINTER :: field
29977 INTEGER(INTG),
INTENT(IN) :: scaling_type
29978 INTEGER(INTG),
INTENT(OUT) :: err
29979 TYPE(varying_string),
INTENT(OUT) :: error
29981 TYPE(varying_string) :: local_error
29983 enters(
"FIELD_SCALING_TYPE_CHECK",err,error,*999)
29985 IF(
ASSOCIATED(field))
THEN 29986 IF(field%FIELD_FINISHED)
THEN 29987 SELECT CASE(scaling_type)
29988 CASE(field_no_scaling)
29989 IF(field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 29990 local_error=
"Invalid scaling type. The scaling type for field number "// &
29991 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
29992 & trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
29993 &
" which is not no scaling." 29994 CALL flagerror(local_error,err,error,*999)
29996 CASE(field_unit_scaling)
29997 IF(field%SCALINGS%SCALING_TYPE/=field_unit_scaling)
THEN 29998 local_error=
"Invalid scaling type. The scaling type for field number "// &
29999 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30000 & trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
30001 &
" which is not unit scaling." 30002 CALL flagerror(local_error,err,error,*999)
30004 CASE(field_arc_length_scaling)
30005 IF(field%SCALINGS%SCALING_TYPE/=field_arc_length_scaling)
THEN 30006 local_error=
"Invalid scaling type. The scaling type for field number "// &
30007 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30008 & trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
30009 &
" which is not arc length scaling." 30010 CALL flagerror(local_error,err,error,*999)
30012 CASE(field_arithmetic_mean_scaling)
30013 IF(field%SCALINGS%SCALING_TYPE/=field_arithmetic_mean_scaling)
THEN 30014 local_error=
"Invalid scaling type. The scaling type for field number "// &
30015 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30016 & trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
30018 &
" which is not arithmetic mean scaling." 30019 CALL flagerror(local_error,err,error,*999)
30021 CASE(field_geometric_mean_scaling)
30022 IF(field%SCALINGS%SCALING_TYPE/=field_geometric_mean_scaling)
THEN 30023 local_error=
"Invalid scaling type. The scaling type for field number "// &
30024 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30025 & trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
30027 &
" which is not geometric mean scaling." 30028 CALL flagerror(local_error,err,error,*999)
30030 CASE(field_harmonic_mean_scaling)
30031 IF(field%SCALINGS%SCALING_TYPE/=field_harmonic_mean_scaling)
THEN 30032 local_error=
"Invalid scaling type. The scaling type for field number "// &
30033 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30034 & trim(number_to_vstring(field%SCALINGS%SCALING_TYPE,
"*",err,error))// &
30035 &
" which is not harmonic mean scaling." 30036 CALL flagerror(local_error,err,error,*999)
30039 local_error=
"The specified scaling type of "//trim(number_to_vstring(scaling_type,
"*",err,error))// &
30041 CALL flagerror(local_error,err,error,*999)
30044 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
30045 &
" has not been finished." 30046 CALL flagerror(local_error,err,error,*999)
30049 CALL flagerror(
"Field is not associated.",err,error,*999)
30052 exits(
"FIELD_SCALING_TYPE_CHECK")
30054 999 errorsexits(
"FIELD_SCALING_TYPE_CHECK",err,error)
30056 END SUBROUTINE field_scaling_type_check
30063 SUBROUTINE field_scaling_type_get(FIELD,SCALING_TYPE,ERR,ERROR,*)
30066 TYPE(field_type),
POINTER :: field
30067 INTEGER(INTG),
INTENT(OUT) :: scaling_type
30068 INTEGER(INTG),
INTENT(OUT) :: err
30069 TYPE(varying_string),
INTENT(OUT) :: error
30071 TYPE(varying_string) :: local_error
30073 enters(
"FIELD_SCALING_TYPE_GET",err,error,*999)
30075 IF(
ASSOCIATED(field))
THEN 30076 IF(field%FIELD_FINISHED)
THEN 30077 scaling_type=field%SCALINGS%SCALING_TYPE
30079 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
30080 &
" has not been finished." 30081 CALL flagerror(local_error,err,error,*999)
30084 CALL flagerror(
"Field is not associated.",err,error,*999)
30087 exits(
"FIELD_SCALING_TYPE_GET")
30089 999 errorsexits(
"FIELD_SCALING_TYPE_GET",err,error)
30091 END SUBROUTINE field_scaling_type_get
30098 SUBROUTINE field_scaling_type_set(FIELD,SCALING_TYPE,ERR,ERROR,*)
30101 TYPE(field_type),
POINTER :: field
30102 INTEGER(INTG),
INTENT(IN) :: scaling_type
30103 INTEGER(INTG),
INTENT(OUT) :: err
30104 TYPE(varying_string),
INTENT(OUT) :: error
30106 TYPE(varying_string) :: local_error
30108 enters(
"FIELD_SCALING_TYPE_SET",err,error,*999)
30110 IF(
ASSOCIATED(field))
THEN 30111 IF(field%FIELD_FINISHED)
THEN 30112 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
30113 &
" has been finished." 30114 CALL flagerror(local_error,err,error,*999)
30116 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 30117 IF(field%CREATE_VALUES_CACHE%SCALING_TYPE_LOCKED)
THEN 30118 local_error=
"The field scaling type has been locked for field number "// &
30119 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 30120 CALL flagerror(local_error,err,error,*999)
30122 SELECT CASE(scaling_type)
30123 CASE(field_no_scaling)
30124 field%SCALINGS%SCALING_TYPE=field_no_scaling
30125 CASE(field_unit_scaling)
30126 field%SCALINGS%SCALING_TYPE=field_unit_scaling
30127 CASE(field_arc_length_scaling)
30128 field%SCALINGS%SCALING_TYPE=field_arc_length_scaling
30129 CASE(field_arithmetic_mean_scaling)
30130 field%SCALINGS%SCALING_TYPE=field_arithmetic_mean_scaling
30131 CASE(field_geometric_mean_scaling)
30132 field%SCALINGS%SCALING_TYPE=field_geometric_mean_scaling
30133 CASE(field_harmonic_mean_scaling)
30134 field%SCALINGS%SCALING_TYPE=field_harmonic_mean_scaling
30136 local_error=
"The specified scaling type of "//trim(number_to_vstring(scaling_type,
"*",err,error))// &
30138 CALL flagerror(local_error,err,error,*999)
30142 local_error=
"Field create values cache is not associated for field number "// &
30143 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30144 CALL flagerror(local_error,err,error,*999)
30148 CALL flagerror(
"Field is not associated.",err,error,*999)
30151 exits(
"FIELD_SCALING_TYPE_SET")
30153 999 errorsexits(
"FIELD_SCALING_TYPE_SET",err,error)
30155 END SUBROUTINE field_scaling_type_set
30162 SUBROUTINE field_scaling_type_set_and_lock(FIELD,SCALING_TYPE,ERR,ERROR,*)
30165 TYPE(field_type),
POINTER :: field
30166 INTEGER(INTG),
INTENT(IN) :: scaling_type
30167 INTEGER(INTG),
INTENT(OUT) :: err
30168 TYPE(varying_string),
INTENT(OUT) :: error
30170 TYPE(varying_string) :: local_error
30172 enters(
"FIELD_SCALING_TYPE_SET_AND_LOCK",err,error,*999)
30174 CALL field_scaling_type_set(field,scaling_type,err,error,*999)
30175 IF(
ASSOCIATED(field))
THEN 30176 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 30177 field%CREATE_VALUES_CACHE%SCALING_TYPE_LOCKED=.true.
30179 local_error=
"Field create values cache is not associated for field number "// &
30180 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30181 CALL flagerror(local_error,err,error,*999)
30184 CALL flagerror(
"Field is not associated.",err,error,*999)
30187 exits(
"FIELD_SCALING_TYPE_SET_AND_LOCK")
30189 999 errorsexits(
"FIELD_SCALING_TYPE_SET_AND_LOCK",err,error)
30191 END SUBROUTINE field_scaling_type_set_and_lock
30198 SUBROUTINE field_type_check(FIELD,TYPE,ERR,ERROR,*)
30201 TYPE(field_type),
POINTER :: field
30202 INTEGER(INTG),
INTENT(IN) ::
TYPE 30203 INTEGER(INTG),
INTENT(OUT) :: err
30204 TYPE(varying_string),
INTENT(OUT) :: error
30206 TYPE(varying_string) :: local_error
30208 enters(
"FIELD_TYPE_CHECK",err,error,*999)
30210 IF(
ASSOCIATED(field))
THEN 30211 IF(field%FIELD_FINISHED)
THEN 30213 CASE(field_geometric_type)
30214 IF(field%TYPE/=field_geometric_type)
THEN 30215 local_error=
"Invalid field type. The field type for field number "// &
30216 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30217 & trim(number_to_vstring(field%TYPE,
"*",err,error))// &
30218 &
" which is not a geometric field." 30219 CALL flagerror(local_error,err,error,*999)
30221 CASE(field_fibre_type)
30222 IF(field%TYPE/=field_fibre_type)
THEN 30223 local_error=
"Invalid field type. The field type for field number "// &
30224 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30225 & trim(number_to_vstring(field%TYPE,
"*",err,error))// &
30226 &
" which is not a fibre field." 30227 CALL flagerror(local_error,err,error,*999)
30229 CASE(field_general_type)
30230 IF(field%TYPE/=field_general_type)
THEN 30231 local_error=
"Invalid field type. The field type for field number "// &
30232 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30233 & trim(number_to_vstring(field%TYPE,
"*",err,error))// &
30234 &
" which is not a general field." 30235 CALL flagerror(local_error,err,error,*999)
30237 CASE(field_material_type)
30238 IF(field%TYPE/=field_material_type)
THEN 30239 local_error=
"Invalid field type. The field type for field number "// &
30240 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30241 & trim(number_to_vstring(field%TYPE,
"*",err,error))// &
30242 &
" which is not a material field." 30243 CALL flagerror(local_error,err,error,*999)
30245 CASE(field_geometric_general_type)
30246 IF(field%TYPE/=field_geometric_general_type)
THEN 30247 local_error=
"Invalid field type. The field type for field number "// &
30248 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
30249 & trim(number_to_vstring(field%TYPE,
"*",err,error))// &
30250 &
" which is not a geometric general field." 30251 CALL flagerror(local_error,err,error,*999)
30254 local_error=
"The specified field type of "//trim(number_to_vstring(
TYPE,
"*",err,error))//
" is invalid." 30255 CALL flagerror(local_error,err,error,*999)
30258 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
30259 &
" has not been finished." 30260 CALL flagerror(local_error,err,error,*999)
30263 CALL flagerror(
"Field is not associated.",err,error,*999)
30266 exits(
"FIELD_TYPE_CHECK")
30268 999 errorsexits(
"FIELD_TYPE_CHECK",err,error)
30270 END SUBROUTINE field_type_check
30277 SUBROUTINE field_type_get(FIELD,TYPE,ERR,ERROR,*)
30280 TYPE(field_type),
POINTER :: field
30281 INTEGER(INTG),
INTENT(OUT) ::
TYPE 30282 INTEGER(INTG),
INTENT(OUT) :: err
30283 TYPE(varying_string),
INTENT(OUT) :: error
30285 TYPE(varying_string) :: local_error
30287 enters(
"FIELD_TYPE_GET",err,error,*999)
30289 IF(
ASSOCIATED(field))
THEN 30290 IF(field%FIELD_FINISHED)
THEN 30293 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
30294 &
" has not been finished." 30295 CALL flagerror(local_error,err,error,*999)
30298 CALL flagerror(
"Field is not associated.",err,error,*999)
30301 exits(
"FIELD_TYPE_GET")
30303 999 errorsexits(
"FIELD_TYPE_GET",err,error)
30305 END SUBROUTINE field_type_get
30312 SUBROUTINE field_type_set(FIELD,TYPE,ERR,ERROR,*)
30315 TYPE(field_type),
POINTER :: field
30316 INTEGER(INTG),
INTENT(IN) ::
TYPE 30317 INTEGER(INTG),
INTENT(OUT) :: err
30318 TYPE(varying_string),
INTENT(OUT) :: error
30320 TYPE(varying_string) :: local_error
30322 enters(
"FIELD_TYPE_SET",err,error,*999)
30324 IF(
ASSOCIATED(field))
THEN 30325 IF(field%FIELD_FINISHED)
THEN 30326 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
30327 &
" has been finished." 30328 CALL flagerror(local_error,err,error,*999)
30330 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 30331 IF(field%CREATE_VALUES_CACHE%TYPE_LOCKED)
THEN 30332 local_error=
"The field type has been locked for field number "// &
30333 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 30334 CALL flagerror(local_error,err,error,*999)
30337 CASE(field_geometric_type)
30338 field%TYPE=field_geometric_type
30339 field%GEOMETRIC_FIELD=>field
30340 CASE(field_fibre_type)
30341 field%TYPE=field_fibre_type
30342 NULLIFY(field%GEOMETRIC_FIELD)
30343 CASE(field_general_type)
30344 field%TYPE=field_general_type
30345 NULLIFY(field%GEOMETRIC_FIELD)
30346 CASE(field_material_type)
30347 field%TYPE=field_material_type
30348 NULLIFY(field%GEOMETRIC_FIELD)
30349 CASE(field_geometric_general_type)
30350 field%TYPE=field_geometric_general_type
30351 NULLIFY(field%GEOMETRIC_FIELD)
30353 local_error=
"The specified field type of "//trim(number_to_vstring(
TYPE,
"*",err,error))//
" is invalid." 30354 CALL flagerror(local_error,err,error,*999)
30358 local_error=
"Field create values cache is not associated for field number "// &
30359 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30360 CALL flagerror(local_error,err,error,*999)
30364 CALL flagerror(
"Field is not associated.",err,error,*999)
30367 exits(
"FIELD_TYPE_SET")
30369 999 errorsexits(
"FIELD_TYPE_SET",err,error)
30371 END SUBROUTINE field_type_set
30378 SUBROUTINE field_type_set_and_lock(FIELD,TYPE,ERR,ERROR,*)
30381 TYPE(field_type),
POINTER :: field
30382 INTEGER(INTG),
INTENT(IN) ::
TYPE 30383 INTEGER(INTG),
INTENT(OUT) :: err
30384 TYPE(varying_string),
INTENT(OUT) :: error
30386 TYPE(varying_string) :: local_error
30388 enters(
"FIELD_TYPE_SET_AND_LOCK",err,error,*999)
30390 CALL field_type_set(field,
TYPE,err,error,*999)
30391 IF(
ASSOCIATED(field))
THEN 30392 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 30393 field%CREATE_VALUES_CACHE%TYPE_LOCKED=.true.
30395 local_error=
"Field create values cache is not associated for field number "// &
30396 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30397 CALL flagerror(local_error,err,error,*999)
30400 CALL flagerror(
"Field is not associated.",err,error,*999)
30403 exits(
"FIELD_TYPE_SET_AND_LOCK")
30405 999 errorsexits(
"FIELD_TYPE_SET_AND_LOCK",err,error)
30407 END SUBROUTINE field_type_set_and_lock
30414 SUBROUTINE field_user_number_find_generic(USER_NUMBER,FIELDS,FIELD,ERR,ERROR,*)
30417 INTEGER(INTG),
INTENT(IN) :: user_number
30418 TYPE(fields_type),
POINTER :: fields
30419 TYPE(field_type),
POINTER :: field
30420 INTEGER(INTG),
INTENT(OUT) :: err
30421 TYPE(varying_string),
INTENT(OUT) :: error
30423 INTEGER(INTG) :: field_idx
30425 enters(
"FIELD_USER_NUMBER_FIND_GENERIC",err,error,*999)
30427 IF(
ASSOCIATED(fields))
THEN 30428 IF(
ASSOCIATED(field))
THEN 30429 CALL flagerror(
"Field is already associated.",err,error,*999)
30433 DO WHILE(field_idx<=fields%NUMBER_OF_FIELDS.AND..NOT.
ASSOCIATED(field))
30434 IF(fields%FIELDS(field_idx)%PTR%USER_NUMBER==user_number)
THEN 30435 field=>fields%FIELDS(field_idx)%PTR
30437 field_idx=field_idx+1
30442 CALL flagerror(
"Fields is not associated.",err,error,*999)
30445 exits(
"FIELD_USER_NUMBER_FIND_GENERIC")
30447 999 errorsexits(
"FIELD_USER_NUMBER_FIND_GENERIC",err,error)
30449 END SUBROUTINE field_user_number_find_generic
30456 SUBROUTINE field_user_number_find_interface(USER_NUMBER,INTERFACE,FIELD,ERR,ERROR,*)
30459 INTEGER(INTG),
INTENT(IN) :: user_number
30460 TYPE(interface_type),
POINTER :: interface
30461 TYPE(field_type),
POINTER :: field
30462 INTEGER(INTG),
INTENT(OUT) :: err
30463 TYPE(varying_string),
INTENT(OUT) :: error
30466 enters(
"FIELD_USER_NUMBER_FIND_INTERFACE",err,error,*999)
30468 IF(
ASSOCIATED(interface))
THEN 30469 CALL field_user_number_find_generic(user_number,interface%FIELDS,field,err,error,*999)
30471 CALL flagerror(
"Interface is not associated.",err,error,*999)
30474 exits(
"FIELD_USER_NUMBER_FIND_INTERFACE")
30476 999 errorsexits(
"FIELD_USER_NUMBER_FIND_INTERFACE",err,error)
30478 END SUBROUTINE field_user_number_find_interface
30485 SUBROUTINE field_user_number_find_region(USER_NUMBER,REGION,FIELD,ERR,ERROR,*)
30488 INTEGER(INTG),
INTENT(IN) :: user_number
30489 TYPE(region_type),
POINTER :: region
30490 TYPE(field_type),
POINTER :: field
30491 INTEGER(INTG),
INTENT(OUT) :: err
30492 TYPE(varying_string),
INTENT(OUT) :: error
30495 enters(
"FIELD_USER_NUMBER_FIND_REGION",err,error,*999)
30497 IF(
ASSOCIATED(region))
THEN 30498 CALL field_user_number_find_generic(user_number,region%FIELDS,field,err,error,*999)
30500 CALL flagerror(
"Region is not associated.",err,error,*999)
30503 exits(
"FIELD_USER_NUMBER_FIND_REGION")
30505 999 errorsexits(
"FIELD_USER_NUMBER_FIND_REGION",err,error)
30507 END SUBROUTINE field_user_number_find_region
30514 SUBROUTINE field_variable_finalise(FIELD_VARIABLE,ERR,ERROR,*)
30517 TYPE(field_variable_type) :: field_variable
30518 INTEGER(INTG),
INTENT(OUT) :: err
30519 TYPE(varying_string),
INTENT(OUT) :: error
30522 enters(
"FIELD_VARIABLE_FINALISE",err,error,*999)
30524 field_variable%VARIABLE_LABEL=
"" 30525 CALL field_variable_components_finalise(field_variable,err,error,*999)
30526 IF(
ASSOCIATED(field_variable%DOMAIN_MAPPING))
THEN 30527 CALL domain_mappings_mapping_finalise(field_variable%DOMAIN_MAPPING,err,error,*999)
30529 CALL field_dof_to_param_map_finalise(field_variable%DOF_TO_PARAM_MAP,err,error,*999)
30530 CALL field_parameter_sets_finalise(field_variable,err,error,*999)
30533 exits(
"FIELD_VARIABLE_FINALISE")
30535 999 errorsexits(
"FIELD_VARIABLE_FINALISE",err,error)
30537 END SUBROUTINE field_variable_finalise
30544 SUBROUTINE field_variable_get(FIELD,VARIABLE_TYPE,FIELD_VARIABLE,ERR,ERROR,*)
30547 TYPE(field_type),
POINTER :: field
30548 INTEGER(INTG),
INTENT(IN) :: variable_type
30549 TYPE(field_variable_type),
POINTER :: field_variable
30550 INTEGER(INTG),
INTENT(OUT) :: err
30551 TYPE(varying_string),
INTENT(OUT) :: error
30553 TYPE(varying_string) :: local_error
30555 enters(
"FIELD_VARIABLE_GET",err,error,*999)
30557 IF(
ASSOCIATED(field))
THEN 30558 IF(field%FIELD_FINISHED)
THEN 30559 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 30560 IF(
ASSOCIATED(field_variable))
THEN 30561 CALL flagerror(
"Field variable is already associated.",err,error,*999)
30563 NULLIFY(field_variable)
30564 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
30565 IF(.NOT.
ASSOCIATED(field_variable))
THEN 30566 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30567 &
" has not been defined on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30568 CALL flagerror(local_error,err,error,*999)
30572 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30573 &
" is invalid. The field variable type must be between 1 and "// &
30574 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 30575 CALL flagerror(local_error,err,error,*999)
30578 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
30579 &
" has not been finished." 30580 CALL flagerror(local_error,err,error,*999)
30583 CALL flagerror(
"Field is not associated.",err,error,*999)
30586 exits(
"FIELD_VARIABLE_GET")
30588 999 errorsexits(
"FIELD_VARIABLE_GET",err,error)
30590 END SUBROUTINE field_variable_get
30597 SUBROUTINE field_variable_initialise(FIELD,VARIABLE_NUMBER,ERR,ERROR,*)
30600 TYPE(field_type),
POINTER :: field
30601 INTEGER(INTG),
INTENT(IN) :: variable_number
30602 INTEGER(INTG),
INTENT(OUT) :: err
30603 TYPE(varying_string),
INTENT(OUT) :: error
30605 INTEGER(INTG) :: component_idx,dummy_err,variable_type
30606 TYPE(field_variable_type),
POINTER :: field_variable
30607 TYPE(varying_string) :: dummy_error,local_error
30609 enters(
"FIELD_VARIABLE_INITIALISE",err,error,*998)
30611 IF(
ASSOCIATED(field))
THEN 30612 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 30613 IF(variable_number>=1.AND.variable_number<=field%NUMBER_OF_VARIABLES)
THEN 30614 NULLIFY(field%VARIABLES(variable_number)%FIELD)
30615 NULLIFY(field%VARIABLES(variable_number)%REGION)
30616 NULLIFY(field%VARIABLES(variable_number)%DOMAIN_MAPPING)
30618 NULLIFY(field%VARIABLES(variable_number)%PARAMETER_SETS%SET_TYPE)
30619 NULLIFY(field%VARIABLES(variable_number)%PARAMETER_SETS%PARAMETER_SETS)
30620 field%VARIABLES(variable_number)%VARIABLE_NUMBER=variable_number
30621 variable_type=field%CREATE_VALUES_CACHE%VARIABLE_TYPES(variable_number)
30622 IF(variable_type>=1.AND.variable_type<=field_number_of_variable_types)
THEN 30623 field%VARIABLES(variable_number)%VARIABLE_TYPE=field%CREATE_VALUES_CACHE%VARIABLE_TYPES(variable_number)
30625 local_error=
"A field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30626 &
" for variable number "//trim(number_to_vstring(variable_number,
"*",err,error))// &
30627 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
30628 &
" is invalid. The number must be between 1 and "// &
30629 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 30630 CALL flagerror(local_error,err,error,*998)
30632 field%VARIABLE_TYPE_MAP(field%VARIABLES(variable_number)%VARIABLE_TYPE)%PTR=>field%VARIABLES(variable_number)
30633 field_variable=>field%VARIABLE_TYPE_MAP(field%VARIABLES(variable_number)%VARIABLE_TYPE)%PTR
30634 field_variable%VARIABLE_LABEL=
"" 30635 field_variable%VARIABLE_LABEL=field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)
30636 field_variable%FIELD=>field
30637 field_variable%REGION=>field%REGION
30638 field_variable%DIMENSION=field%CREATE_VALUES_CACHE%DIMENSION(variable_type)
30639 field_variable%DATA_TYPE=field%CREATE_VALUES_CACHE%DATA_TYPES(variable_type)
30640 field_variable%DOF_ORDER_TYPE=field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES(variable_type)
30641 IF(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)>0)
THEN 30642 field_variable%NUMBER_OF_COMPONENTS=field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)
30643 CALL field_variable_components_initialise(field,variable_type,err,error,*999)
30645 local_error=
"The number of components of "// &
30646 & trim(number_to_vstring(field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type),
"*",err,error))// &
30647 &
" for variable type "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30648 &
" of field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
30649 &
" is invalid. The number must be > 0." 30650 CALL flagerror(local_error,err,error,*999)
30652 field_variable%maxNumberElementInterpolationParameters=-1
30653 field_variable%maxNumberNodeInterpolationParameters=-1
30654 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
30655 IF(field_variable%COMPONENTS(component_idx)%maxNumberElementInterpolationParameters> &
30656 & field_variable%maxNumberElementInterpolationParameters) field_variable% &
30657 & maxnumberelementinterpolationparameters=field_variable%COMPONENTS(component_idx)% &
30658 & maxnumberelementinterpolationparameters
30659 IF(field_variable%COMPONENTS(component_idx)%maxNumberNodeInterpolationParameters> &
30660 & field_variable%maxNumberNodeInterpolationParameters) field_variable% &
30661 & maxnumbernodeinterpolationparameters=field_variable%COMPONENTS(component_idx)% &
30662 & maxnumbernodeinterpolationparameters
30664 field_variable%NUMBER_OF_DOFS=0
30665 field_variable%TOTAL_NUMBER_OF_DOFS=0
30666 field_variable%NUMBER_OF_GLOBAL_DOFS=0
30667 ALLOCATE(field_variable%DOMAIN_MAPPING,stat=err)
30668 IF(err/=0)
CALL flagerror(
"Could not allocate field variable domain mapping.",err,error,*999)
30669 CALL domain_mappings_mapping_initialise(field_variable%DOMAIN_MAPPING, &
30670 & field%DECOMPOSITION%NUMBER_OF_DOMAINS,err,error,*999)
30671 CALL field_dof_to_param_map_initialise(field_variable%DOF_TO_PARAM_MAP,err,error,*999)
30673 local_error=
"Variable number "//trim(number_to_vstring(variable_number,
"*",err,error))// &
30674 &
" is invalid for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" which has "// &
30675 & trim(number_to_vstring(field%NUMBER_OF_VARIABLES,
"*",err,error))//
" variables." 30676 CALL flagerror(local_error,err,error,*998)
30679 CALL flagerror(
"Field create values cache is not associated.",err,error,*998)
30682 CALL flagerror(
"Field is not associated.",err,error,*998)
30685 exits(
"FIELD_VARIABLE_INITIALISE")
30687 999
CALL field_variable_finalise(field_variable,dummy_err,dummy_error,*998)
30688 998 errorsexits(
"FIELD_VARIABLE_INITIALISE",err,error)
30690 END SUBROUTINE field_variable_initialise
30697 SUBROUTINE field_variable_label_get_c(FIELD,VARIABLE_TYPE,LABEL,ERR,ERROR,*)
30700 TYPE(field_type),
POINTER :: field
30701 INTEGER(INTG),
INTENT(IN) :: variable_type
30702 CHARACTER(LEN=*),
INTENT(OUT) :: label
30703 INTEGER(INTG),
INTENT(OUT) :: err
30704 TYPE(varying_string),
INTENT(OUT) :: error
30706 INTEGER :: c_length,vs_length
30707 TYPE(field_variable_type),
POINTER :: field_variable
30708 TYPE(varying_string) :: local_error
30710 enters(
"FIELD_VARIABLE_LABEL_GET_C",err,error,*999)
30712 IF(
ASSOCIATED(field))
THEN 30713 IF(field%FIELD_FINISHED)
THEN 30714 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 30715 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
30716 IF(
ASSOCIATED(field_variable))
THEN 30717 c_length=len(label)
30718 vs_length=len_trim(field_variable%VARIABLE_LABEL)
30719 IF(c_length>vs_length)
THEN 30720 label=char(len_trim(field_variable%VARIABLE_LABEL))
30722 label=char(field_variable%VARIABLE_LABEL,c_length)
30725 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30726 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30727 CALL flagerror(local_error,err,error,*999)
30730 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30731 &
" is invalid. The variable type must be between 1 and "// &
30732 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 30733 CALL flagerror(local_error,err,error,*999)
30736 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 30737 CALL flagerror(local_error,err,error,*999)
30740 CALL flagerror(
"Field is not associated.",err,error,*999)
30743 exits(
"FIELD_VARIABLE_LABEL_GET_C")
30745 999 errorsexits(
"FIELD_VARIABLE_LABEL_GET_C",err,error)
30747 END SUBROUTINE field_variable_label_get_c
30754 SUBROUTINE field_variable_label_get_vs(FIELD,VARIABLE_TYPE,LABEL,ERR,ERROR,*)
30757 TYPE(field_type),
POINTER :: field
30758 INTEGER(INTG),
INTENT(IN) :: variable_type
30759 TYPE(varying_string),
INTENT(OUT) :: label
30760 INTEGER(INTG),
INTENT(OUT) :: err
30761 TYPE(varying_string),
INTENT(OUT) :: error
30763 TYPE(field_variable_type),
POINTER :: field_variable
30764 TYPE(varying_string) :: local_error
30766 enters(
"FIELD_VARIABLE_LABEL_GET_VS",err,error,*999)
30768 IF(
ASSOCIATED(field))
THEN 30769 IF(field%FIELD_FINISHED)
THEN 30770 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 30771 field_variable=>field%VARIABLE_TYPE_MAP(variable_type)%PTR
30772 IF(
ASSOCIATED(field_variable))
THEN 30773 label=field_variable%VARIABLE_LABEL
30775 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30776 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30777 CALL flagerror(local_error,err,error,*999)
30780 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30781 &
" is invalid. The variable type must be between 1 and "// &
30782 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 30783 CALL flagerror(local_error,err,error,*999)
30786 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has not been finished." 30787 CALL flagerror(local_error,err,error,*999)
30790 CALL flagerror(
"Field is not associated.",err,error,*999)
30793 exits(
"FIELD_VARIABLE_LABEL_GET_VS")
30795 999 errorsexits(
"FIELD_VARIABLE_LABEL_GET_VS",err,error)
30797 END SUBROUTINE field_variable_label_get_vs
30804 SUBROUTINE field_variable_label_set_c(FIELD,VARIABLE_TYPE,LABEL,ERR,ERROR,*)
30807 TYPE(field_type),
POINTER :: field
30808 INTEGER(INTG),
INTENT(IN) :: variable_type
30809 CHARACTER(LEN=*),
INTENT(IN) :: label
30810 INTEGER(INTG),
INTENT(OUT) :: err
30811 TYPE(varying_string),
INTENT(OUT) :: error
30813 TYPE(varying_string) :: local_error
30815 enters(
"FIELD_VARIABLE_LABEL_SET_C",err,error,*999)
30817 IF(
ASSOCIATED(field))
THEN 30818 IF(field%FIELD_FINISHED)
THEN 30819 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 30820 CALL flagerror(local_error,err,error,*999)
30822 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 30823 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 30824 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 30825 IF(field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED(variable_type))
THEN 30826 local_error=
"The field variable label has been locked for for variable type "// &
30827 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
30828 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 30829 CALL flagerror(local_error,err,error,*999)
30831 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=label
30834 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30835 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30836 CALL flagerror(local_error,err,error,*999)
30839 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30840 &
" is invalid. The variable type must be between 1 and "// &
30842 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 30843 CALL flagerror(local_error,err,error,*999)
30846 local_error=
"Field create values cache is not associated for field number "// &
30847 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30848 CALL flagerror(local_error,err,error,*999)
30852 CALL flagerror(
"Field is not associated.",err,error,*999)
30855 exits(
"FIELD_VARIABLE_LABEL_SET_C")
30857 999 errorsexits(
"FIELD_VARIABLE_LABEL_SET_C",err,error)
30859 END SUBROUTINE field_variable_label_set_c
30866 SUBROUTINE field_variable_label_set_vs(FIELD,VARIABLE_TYPE,LABEL,ERR,ERROR,*)
30869 TYPE(field_type),
POINTER :: field
30870 INTEGER(INTG),
INTENT(IN) :: variable_type
30871 TYPE(varying_string),
INTENT(IN) :: label
30872 INTEGER(INTG),
INTENT(OUT) :: err
30873 TYPE(varying_string),
INTENT(OUT) :: error
30875 TYPE(varying_string) :: local_error
30877 enters(
"FIELD_VARIABLE_LABEL_SET_VS",err,error,*999)
30879 IF(
ASSOCIATED(field))
THEN 30880 IF(field%FIELD_FINISHED)
THEN 30881 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" has been finished." 30882 CALL flagerror(local_error,err,error,*999)
30884 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 30885 IF(variable_type>0.AND.variable_type<=field_number_of_variable_types)
THEN 30886 IF(any(field%CREATE_VALUES_CACHE%VARIABLE_TYPES==variable_type))
THEN 30887 IF(field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED(variable_type))
THEN 30888 local_error=
"The field variable label has been locked for for variable type "// &
30889 & trim(number_to_vstring(variable_type,
"*",err,error))//
" of field number "// &
30890 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 30891 CALL flagerror(local_error,err,error,*999)
30893 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=label
30896 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30897 &
" has not been created on field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30898 CALL flagerror(local_error,err,error,*999)
30901 local_error=
"The field variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
30902 &
" is invalid. The variable type must be between 1 and "// &
30903 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 30904 CALL flagerror(local_error,err,error,*999)
30907 local_error=
"Field create values cache is not associated for field number "// &
30908 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30909 CALL flagerror(local_error,err,error,*999)
30913 CALL flagerror(
"Field is not associated.",err,error,*999)
30916 exits(
"FIELD_VARIABLE_LABEL_SET_VS")
30918 999 errorsexits(
"FIELD_VARIABLE_LABEL_SET_VS",err,error)
30920 END SUBROUTINE field_variable_label_set_vs
30927 SUBROUTINE field_variable_label_set_and_lock_c(FIELD,VARIABLE_TYPE,LABEL,ERR,ERROR,*)
30930 TYPE(field_type),
POINTER :: field
30931 INTEGER(INTG),
INTENT(IN) :: variable_type
30932 CHARACTER(LEN=*),
INTENT(IN) :: label
30933 INTEGER(INTG),
INTENT(OUT) :: err
30934 TYPE(varying_string),
INTENT(OUT) :: error
30936 TYPE(varying_string) :: local_error
30938 enters(
"FIELD_VARIABLE_LABEL_SET_AND_LOCK_C",err,error,*999)
30940 CALL field_variable_label_set(field,variable_type,label,err,error,*999)
30941 IF(
ASSOCIATED(field))
THEN 30942 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 30943 field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED(variable_type)=.true.
30945 local_error=
"Field create values cache is not associated for field number "// &
30946 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30947 CALL flagerror(local_error,err,error,*999)
30950 CALL flagerror(
"Field is not associated.",err,error,*999)
30953 exits(
"FIELD_VARIABLE_LABEL_SET_AND_LOCK_C")
30955 999 errorsexits(
"FIELD_VARIABLE_LABEL_SET_AND_LOCK_C",err,error)
30957 END SUBROUTINE field_variable_label_set_and_lock_c
30964 SUBROUTINE field_variable_label_set_and_lock_vs(FIELD,VARIABLE_TYPE,LABEL,ERR,ERROR,*)
30967 TYPE(field_type),
POINTER :: field
30968 INTEGER(INTG),
INTENT(IN) :: variable_type
30969 TYPE(varying_string),
INTENT(IN) :: label
30970 INTEGER(INTG),
INTENT(OUT) :: err
30971 TYPE(varying_string),
INTENT(OUT) :: error
30973 TYPE(varying_string) :: local_error
30975 enters(
"FIELD_VARIABLE_LABEL_SET_AND_LOCK_VS",err,error,*999)
30977 CALL field_variable_label_set(field,variable_type,label,err,error,*999)
30978 IF(
ASSOCIATED(field))
THEN 30979 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 30980 field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED(variable_type)=.true.
30982 local_error=
"Field create values cache is not associated for field number "// &
30983 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 30984 CALL flagerror(local_error,err,error,*999)
30987 CALL flagerror(
"Field is not associated.",err,error,*999)
30990 exits(
"FIELD_VARIABLE_LABEL_SET_AND_LOCK_VS")
30992 999 errorsexits(
"FIELD_VARIABLE_LABEL_SET_AND_LOCK_VS",err,error)
30994 END SUBROUTINE field_variable_label_set_and_lock_vs
31001 SUBROUTINE field_variable_types_check(FIELD,VARIABLE_TYPES,ERR,ERROR,*)
31004 TYPE(field_type),
POINTER :: field
31005 INTEGER(INTG),
INTENT(IN) :: variable_types(:)
31006 INTEGER(INTG),
INTENT(OUT) :: err
31007 TYPE(varying_string),
INTENT(OUT) :: error
31009 INTEGER(INTG) :: variable_idx
31010 TYPE(varying_string) :: local_error
31012 enters(
"FIELD_VARIABLE_TYPES_CHECK",err,error,*999)
31014 IF(
ASSOCIATED(field))
THEN 31015 IF(field%FIELD_FINISHED)
THEN 31016 IF(
SIZE(variable_types,1)>=field%NUMBER_OF_VARIABLES)
THEN 31017 DO variable_idx=1,field%NUMBER_OF_VARIABLES
31018 IF(variable_types(variable_idx)>=1.AND.variable_types(variable_idx)<=field_number_of_variable_types)
THEN 31019 IF(field%VARIABLES(variable_idx)%VARIABLE_TYPE/=variable_types(variable_idx))
THEN 31020 local_error=
"Invalid variable type. The variable type for variable index number "// &
31021 & trim(number_to_vstring(variable_idx,
"*",err,error))//
" of field number "// &
31022 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" is "// &
31023 & trim(number_to_vstring(field%VARIABLES(variable_idx)%VARIABLE_TYPE,
"*",err,error))// &
31024 &
" which is does correspond to the specified variable_type of "// &
31025 & trim(number_to_vstring(variable_types(variable_idx),
"*",err,error))//
"." 31026 CALL flagerror(local_error,err,error,*999)
31029 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_types(variable_idx),
"*",err,error))// &
31030 &
" at position number "//trim(number_to_vstring(variable_idx,
"*",err,error))// &
31031 &
" is invalid. The variable type must be between 1 and "// &
31032 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 31033 CALL flagerror(local_error,err,error,*999)
31037 local_error=
"Invalid variable types. The size of the specified variable types array is "// &
31038 & trim(number_to_vstring(
SIZE(variable_types,1),
"*",err,error))//
" and it must be >= "// &
31039 & trim(number_to_vstring(field%NUMBER_OF_VARIABLES,
"*",err,error))//
"." 31040 CALL flagerror(local_error,err,error,*999)
31043 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
31044 &
" has not been finished." 31045 CALL flagerror(local_error,err,error,*999)
31048 CALL flagerror(
"Field is not associated.",err,error,*999)
31051 exits(
"FIELD_VARIABLE_TYPES_CHECK")
31053 999 errorsexits(
"FIELD_VARIABLE_TYPES_CHECK",err,error)
31055 END SUBROUTINE field_variable_types_check
31062 SUBROUTINE field_variable_type_check(FIELD,VARIABLE_TYPE,ERR,ERROR,*)
31065 TYPE(field_type),
POINTER :: field
31066 INTEGER(INTG),
INTENT(IN) :: variable_type
31067 INTEGER(INTG),
INTENT(OUT) :: err
31068 TYPE(varying_string),
INTENT(OUT) :: error
31070 INTEGER(INTG) :: variable_idx
31071 LOGICAL :: variable_found
31072 TYPE(varying_string) :: local_error
31074 enters(
"FIELD_VARIABLE_TYPE_CHECK",err,error,*999)
31076 variable_found=.false.
31077 IF(
ASSOCIATED(field))
THEN 31078 IF(field%FIELD_FINISHED)
THEN 31079 DO variable_idx=1,field%NUMBER_OF_VARIABLES
31080 IF(field%VARIABLES(variable_idx)%VARIABLE_TYPE==variable_type)
THEN 31081 variable_found=.true.
31085 IF(.NOT.variable_found)
THEN 31086 CALL flagerror(
"Field does not have a variable type of "// &
31087 & trim(number_to_vstring(variable_type,
"*",err,error))//
".",err,error,*999)
31090 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
31091 &
" has not been finished." 31092 CALL flagerror(local_error,err,error,*999)
31095 CALL flagerror(
"Field is not associated.",err,error,*999)
31098 exits(
"FIELD_VARIABLE_TYPE_CHECK")
31100 999 errorsexits(
"FIELD_VARIABLE_TYPE_CHECK",err,error)
31102 END SUBROUTINE field_variable_type_check
31109 SUBROUTINE field_variable_types_get(FIELD,VARIABLE_TYPES,ERR,ERROR,*)
31112 TYPE(field_type),
POINTER :: field
31113 INTEGER(INTG),
INTENT(OUT) :: variable_types(:)
31114 INTEGER(INTG),
INTENT(OUT) :: err
31115 TYPE(varying_string),
INTENT(OUT) :: error
31117 INTEGER(INTG) :: variable_idx
31118 TYPE(varying_string) :: local_error
31120 enters(
"FIELD_VARIABLE_TYPES_GET",err,error,*999)
31122 IF(
ASSOCIATED(field))
THEN 31123 IF(field%FIELD_FINISHED)
THEN 31124 IF(
SIZE(variable_types,1)>=field%NUMBER_OF_VARIABLES)
THEN 31126 DO variable_idx=1,field%NUMBER_OF_VARIABLES
31127 variable_types(variable_idx)=field%VARIABLES(variable_idx)%VARIABLE_TYPE
31130 local_error=
"Invalid variable types. The size of the specified variable types array is "// &
31131 & trim(number_to_vstring(
SIZE(variable_types,1),
"*",err,error))//
" and it must be >= "// &
31132 & trim(number_to_vstring(field%NUMBER_OF_VARIABLES,
"*",err,error))//
"." 31133 CALL flagerror(local_error,err,error,*999)
31136 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
31137 &
" has not been finished." 31138 CALL flagerror(local_error,err,error,*999)
31141 CALL flagerror(
"Field is not associated.",err,error,*999)
31144 exits(
"FIELD_VARIABLE_TYPES_GET")
31146 999 errorsexits(
"FIELD_VARIABLE_TYPES_GET",err,error)
31148 END SUBROUTINE field_variable_types_get
31155 SUBROUTINE field_variable_types_set(FIELD,VARIABLE_TYPES,ERR,ERROR,*)
31158 TYPE(field_type),
POINTER :: field
31159 INTEGER(INTG),
INTENT(IN) :: variable_types(:)
31160 INTEGER(INTG),
INTENT(OUT) :: err
31161 TYPE(varying_string),
INTENT(OUT) :: error
31163 INTEGER(INTG) :: number_of_components,old_variable_type,variable_idx,variable_idx2,variable_type
31164 INTEGER(INTG) :: old_dimension(field_number_of_variable_types),old_data_types(field_number_of_variable_types), &
31165 & OLD_DOF_ORDER_TYPES(FIELD_NUMBER_OF_VARIABLE_TYPES),OLD_NUMBER_OF_COMPONENTS(FIELD_NUMBER_OF_VARIABLE_TYPES)
31166 INTEGER(INTG),
ALLOCATABLE :: old_variable_types(:),old_interpolation_type(:,:),old_mesh_component_number(:,:)
31167 LOGICAL :: old_dimension_locked(field_number_of_variable_types),old_data_types_locked(field_number_of_variable_types), &
31168 & OLD_DOF_ORDER_TYPES_LOCKED(FIELD_NUMBER_OF_VARIABLE_TYPES), &
31169 & OLD_NUMBER_OF_COMPONENTS_LOCKED(FIELD_NUMBER_OF_VARIABLE_TYPES),OLD_LABELS_LOCKED(FIELD_NUMBER_OF_VARIABLE_TYPES)
31170 LOGICAL,
ALLOCATABLE :: old_interpolation_type_locked(:,:),old_mesh_component_number_locked(:,:)
31171 TYPE(varying_string) :: local_error,old_labels(field_number_of_variable_types)
31173 enters(
"FIELD_VARIABLE_TYPES_SET",err,error,*999)
31175 IF(
ASSOCIATED(field))
THEN 31176 IF(field%FIELD_FINISHED)
THEN 31177 local_error=
"Field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
31178 &
" has been finished." 31179 CALL flagerror(local_error,err,error,*999)
31181 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 31182 IF(field%CREATE_VALUES_CACHE%VARIABLE_TYPES_LOCKED)
THEN 31183 local_error=
"The field variable types has been locked for field number "// &
31184 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
" and can not be changed." 31185 CALL flagerror(local_error,err,error,*999)
31187 IF(
SIZE(variable_types,1)==field%NUMBER_OF_VARIABLES)
THEN 31188 DO variable_idx=1,field%NUMBER_OF_VARIABLES
31189 variable_type=variable_types(variable_idx)
31191 IF(variable_type<1.OR.variable_type>field_number_of_variable_types)
THEN 31192 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
31193 &
" at position number "//trim(number_to_vstring(variable_idx,
"*",err,error))// &
31194 &
" is invalid. The variable type must be between 1 and "// &
31195 & trim(number_to_vstring(field_number_of_variable_types,
"*",err,error))//
"." 31196 CALL flagerror(local_error,err,error,*999)
31199 DO variable_idx2=variable_idx+1,field%NUMBER_OF_VARIABLES
31200 IF(variable_types(variable_idx2)==variable_type)
THEN 31201 local_error=
"The specified variable type of "//trim(number_to_vstring(variable_type,
"*",err,error))// &
31202 &
" occurs at position number "//trim(number_to_vstring(variable_idx,
"*",err,error))// &
31203 &
" and position number "//trim(number_to_vstring(variable_idx2,
"*",err,error))// &
31204 &
". The variable types must be unique." 31205 CALL flagerror(local_error,err,error,*999)
31209 number_of_components=
SIZE(field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE,1)
31210 ALLOCATE(old_variable_types(field%NUMBER_OF_VARIABLES),stat=err)
31211 IF(err/=0)
CALL flagerror(
"Could not allocate old variable types.",err,error,*999)
31212 ALLOCATE(old_interpolation_type(number_of_components,field_number_of_variable_types),stat=err)
31213 IF(err/=0)
CALL flagerror(
"Could not allocate old interpolation type.",err,error,*999)
31214 ALLOCATE(old_interpolation_type_locked(number_of_components,field_number_of_variable_types),stat=err)
31215 IF(err/=0)
CALL flagerror(
"Could not allocate old interpolation type locked.",err,error,*999)
31216 ALLOCATE(old_mesh_component_number(number_of_components,field_number_of_variable_types),stat=err)
31217 IF(err/=0)
CALL flagerror(
"Could not allocate old mesh component number.",err,error,*999)
31218 ALLOCATE(old_mesh_component_number_locked(number_of_components,field_number_of_variable_types),stat=err)
31219 IF(err/=0)
CALL flagerror(
"Could not allocate old mesh component number locked.",err,error,*999)
31220 old_variable_types(1:field%NUMBER_OF_VARIABLES)=field%CREATE_VALUES_CACHE%VARIABLE_TYPES(1:field%NUMBER_OF_VARIABLES)
31221 old_labels=field%CREATE_VALUES_CACHE%VARIABLE_LABELS
31222 old_labels_locked=field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED
31223 old_dimension=field%CREATE_VALUES_CACHE%DIMENSION
31224 old_dimension_locked=field%CREATE_VALUES_CACHE%DIMENSION_LOCKED
31225 old_data_types=field%CREATE_VALUES_CACHE%DATA_TYPES
31226 old_data_types_locked=field%CREATE_VALUES_CACHE%DATA_TYPES_LOCKED
31227 old_dof_order_types=field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES
31228 old_dof_order_types_locked=field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES_LOCKED
31229 old_number_of_components=field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS
31230 old_number_of_components_locked=field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS_LOCKED
31231 old_interpolation_type(1:number_of_components,1:field_number_of_variable_types)= &
31232 & field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(1:number_of_components,1:field_number_of_variable_types)
31233 old_interpolation_type_locked(1:number_of_components,1:field_number_of_variable_types)= &
31234 & field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED(1:number_of_components,1:field_number_of_variable_types)
31235 old_mesh_component_number(1:number_of_components,1:field_number_of_variable_types)= &
31236 & field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(1:number_of_components,1:field_number_of_variable_types)
31237 old_mesh_component_number_locked(1:number_of_components,1:field_number_of_variable_types)= &
31238 & field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED(1:number_of_components,1:field_number_of_variable_types)
31239 field%CREATE_VALUES_CACHE%VARIABLE_TYPES=0
31240 field%CREATE_VALUES_CACHE%VARIABLE_LABELS=
"" 31241 field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED=.false.
31242 field%CREATE_VALUES_CACHE%DIMENSION=0
31243 field%CREATE_VALUES_CACHE%DIMENSION_LOCKED=.false.
31244 field%CREATE_VALUES_CACHE%DATA_TYPES=0
31245 field%CREATE_VALUES_CACHE%DATA_TYPES_LOCKED=.false.
31246 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES=0
31247 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES_LOCKED=.false.
31248 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS=0
31249 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS_LOCKED=.false.
31250 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE=0
31251 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED=.false.
31252 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER=0
31253 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED=.false.
31254 DO variable_idx=1,field%NUMBER_OF_VARIABLES
31255 variable_type=variable_types(variable_idx)
31256 old_variable_type=old_variable_types(variable_idx)
31257 field%CREATE_VALUES_CACHE%VARIABLE_LABELS(variable_type)=old_labels(old_variable_type)
31258 field%CREATE_VALUES_CACHE%VARIABLE_LABELS_LOCKED(variable_type)=old_labels_locked(old_variable_type)
31259 field%CREATE_VALUES_CACHE%DIMENSION(variable_type)=old_dimension(old_variable_type)
31260 field%CREATE_VALUES_CACHE%DIMENSION_LOCKED(variable_type)=old_dimension_locked(old_variable_type)
31261 field%CREATE_VALUES_CACHE%DATA_TYPES(variable_type)=old_data_types(old_variable_type)
31262 field%CREATE_VALUES_CACHE%DATA_TYPES_LOCKED(variable_type)=old_data_types_locked(old_variable_type)
31263 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES(variable_type)=old_dof_order_types(old_variable_type)
31264 field%CREATE_VALUES_CACHE%DOF_ORDER_TYPES_LOCKED(variable_type)=old_dof_order_types_locked(old_variable_type)
31265 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS(variable_type)=old_number_of_components(old_variable_type)
31266 field%CREATE_VALUES_CACHE%NUMBER_OF_COMPONENTS_LOCKED(variable_type)=old_number_of_components_locked( &
31267 & old_variable_type)
31268 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE(:,variable_type)=old_interpolation_type(:,old_variable_type)
31269 field%CREATE_VALUES_CACHE%INTERPOLATION_TYPE_LOCKED(:,variable_type)=old_interpolation_type_locked(:, &
31270 & old_variable_type)
31271 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER(:,variable_type)=old_mesh_component_number(:,old_variable_type)
31272 field%CREATE_VALUES_CACHE%MESH_COMPONENT_NUMBER_LOCKED(:,variable_type)=old_mesh_component_number_locked(:, &
31273 & old_variable_type)
31275 field%CREATE_VALUES_CACHE%VARIABLE_TYPES(1:
SIZE(variable_types,1))=variable_types(1:
SIZE(variable_types,1))
31276 DEALLOCATE(old_variable_types)
31277 DEALLOCATE(old_interpolation_type)
31278 DEALLOCATE(old_interpolation_type_locked)
31279 DEALLOCATE(old_mesh_component_number)
31280 DEALLOCATE(old_mesh_component_number_locked)
31282 local_error=
"Invalid variable types. The size of the specified variable types array is "// &
31283 & trim(number_to_vstring(
SIZE(variable_types,1),
"*",err,error))// &
31284 &
" and the number of variables for field number "//trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))// &
31285 &
" is "//trim(number_to_vstring(field%NUMBER_OF_VARIABLES,
"*",err,error))//
"." 31286 CALL flagerror(local_error,err,error,*999)
31290 local_error=
"Field create values cache is not associated for field number "// &
31291 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 31292 CALL flagerror(local_error,err,error,*999)
31296 CALL flagerror(
"Field is not associated.",err,error,*999)
31299 exits(
"FIELD_VARIABLE_TYPES_SET")
31301 999
IF(
ALLOCATED(old_variable_types))
DEALLOCATE(old_variable_types)
31302 IF(
ALLOCATED(old_interpolation_type))
DEALLOCATE(old_interpolation_type)
31303 IF(
ALLOCATED(old_interpolation_type_locked))
DEALLOCATE(old_interpolation_type_locked)
31304 IF(
ALLOCATED(old_mesh_component_number))
DEALLOCATE(old_mesh_component_number)
31305 IF(
ALLOCATED(old_mesh_component_number_locked))
DEALLOCATE(old_mesh_component_number_locked)
31306 errorsexits(
"FIELD_VARIABLE_TYPES_SET",err,error)
31308 END SUBROUTINE field_variable_types_set
31315 SUBROUTINE field_variable_types_set_and_lock(FIELD,VARIABLE_TYPES,ERR,ERROR,*)
31318 TYPE(field_type),
POINTER :: field
31319 INTEGER(INTG),
INTENT(IN) :: variable_types(:)
31320 INTEGER(INTG),
INTENT(OUT) :: err
31321 TYPE(varying_string),
INTENT(OUT) :: error
31323 TYPE(varying_string) :: local_error
31325 enters(
"FIELD_VARIABLE_TYPES_SET_AND_LOCK",err,error,*999)
31327 CALL field_variable_types_set(field,variable_types,err,error,*999)
31328 IF(
ASSOCIATED(field))
THEN 31329 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 31330 field%CREATE_VALUES_CACHE%VARIABLE_TYPES_LOCKED=.true.
31332 local_error=
"Field create values cache is not associated for field number "// &
31333 & trim(number_to_vstring(field%USER_NUMBER,
"*",err,error))//
"." 31334 CALL flagerror(local_error,err,error,*999)
31337 CALL flagerror(
"Field is not associated.",err,error,*999)
31340 exits(
"FIELD_VARIABLE_TYPES_SET_AND_LOCK")
31342 999 errorsexits(
"FIELD_VARIABLE_TYPES_SET_AND_LOCK",err,error)
31344 END SUBROUTINE field_variable_types_set_and_lock
31351 SUBROUTINE fieldvariablescheck(field,err,error,*)
31354 TYPE(field_type),
POINTER :: field
31355 INTEGER(INTG),
INTENT(OUT) :: err
31356 TYPE(varying_string),
INTENT(OUT) :: error
31358 INTEGER(INTG) :: variableidx,variableidx2,variabletype,variabletype2
31359 LOGICAL :: duplicates
31360 TYPE(varying_string) :: localerror
31362 enters(
"FieldVariablesCheck",err,error,*999)
31364 IF(
ASSOCIATED(field))
THEN 31365 IF(
ASSOCIATED(field%CREATE_VALUES_CACHE))
THEN 31367 IF(field%NUMBER_OF_VARIABLES>0)
THEN 31370 firstvariable:
DO variableidx=1,field%NUMBER_OF_VARIABLES
31371 variabletype=field%CREATE_VALUES_CACHE%VARIABLE_TYPES(variableidx)
31372 secondvariable:
DO variableidx2=variableidx+1,field%NUMBER_OF_VARIABLES
31373 variabletype2=field%CREATE_VALUES_CACHE%VARIABLE_TYPES(variableidx2)
31374 IF(variabletype==variabletype2)
THEN 31378 ENDDO secondvariable
31379 ENDDO firstvariable
31380 IF(duplicates)
THEN 31381 localerror=
"Invalid variable types. Two or more variables have variable type "// &
31382 & trim(numbertovstring(variabletype,
"*",err,error))//
"." 31383 CALL flagerror(localerror,err,error,*999)
31386 localerror=
"Invalid field setup. The field has "//trim(numbertovstring(field%NUMBER_OF_VARIABLES,
"*",err,error))// &
31387 &
" variables and should have > 0 variables." 31388 CALL flagerror(localerror,err,error,*999)
31391 CALL flagerror(
"Field create values cache is not associated.",err,error,*999)
31394 CALL flagerror(
"Field is not associated.",err,error,*999)
31397 exits(
"FieldVariablesCheck")
31399 999 errorsexits(
"FieldVariablesCheck",err,error)
31402 END SUBROUTINE fieldvariablescheck
31409 SUBROUTINE field_variables_finalise(FIELD,ERR,ERROR,*)
31412 TYPE(field_type),
POINTER :: field
31413 INTEGER(INTG),
INTENT(OUT) :: err
31414 TYPE(varying_string),
INTENT(OUT) :: error
31416 INTEGER(INTG) :: variable_idx
31418 enters(
"FIELD_VARIABLES_FINALISE",err,error,*999)
31420 IF(
ASSOCIATED(field))
THEN 31421 IF(
ALLOCATED(field%VARIABLES))
THEN 31422 DO variable_idx=1,
SIZE(field%VARIABLES,1)
31423 CALL field_variable_finalise(field%VARIABLES(variable_idx),err,error,*999)
31425 DEALLOCATE(field%VARIABLES)
31427 field%NUMBER_OF_VARIABLES=0
31429 CALL flagerror(
"Field is not associated.",err,error,*999)
31432 exits(
"FIELD_VARIABLES_FINALISE")
31434 999 errorsexits(
"FIELD_VARIABLES_FINALISE",err,error)
31436 END SUBROUTINE field_variables_finalise
31443 SUBROUTINE field_variables_initialise(FIELD,ERR,ERROR,*)
31446 TYPE(field_type),
POINTER :: field
31447 INTEGER(INTG),
INTENT(OUT) :: err
31448 TYPE(varying_string),
INTENT(OUT) :: error
31450 INTEGER(INTG) :: variable_idx
31452 enters(
"FIELD_VARIABLES_INITIALISE",err,error,*999)
31454 IF(
ASSOCIATED(field))
THEN 31455 IF(
ALLOCATED(field%VARIABLES))
THEN 31456 CALL flagerror(
"Field already has associated variables.",err,error,*999)
31458 ALLOCATE(field%VARIABLES(field%NUMBER_OF_VARIABLES),stat=err)
31459 IF(err/=0)
CALL flagerror(
"Could not allocate new field variables.",err,error,*999)
31460 DO variable_idx=1,field%NUMBER_OF_VARIABLES
31461 CALL field_variable_initialise(field,variable_idx,err,error,*999)
31465 CALL flagerror(
"Field is not associated.",err,error,*999)
31468 exits(
"FIELD_VARIABLES_INITIALISE")
31470 999 errorsexits(
"FIELD_VARIABLES_INITIALISE",err,error)
31472 END SUBROUTINE field_variables_initialise
31479 SUBROUTINE fields_finalise(FIELDS,ERR,ERROR,*)
31482 TYPE(fields_type),
POINTER :: fields
31483 INTEGER(INTG),
INTENT(OUT) :: err
31484 TYPE(varying_string),
INTENT(OUT) :: error
31486 TYPE(field_type),
POINTER :: field
31488 enters(
"FIELDS_FINALISE",err,error,*999)
31490 IF(
ASSOCIATED(fields))
THEN 31491 DO WHILE(fields%NUMBER_OF_FIELDS>0)
31492 field=>fields%FIELDS(1)%PTR
31493 CALL field_destroy(field,err,error,*999)
31498 exits(
"FIELDS_FINALISE")
31500 999 errorsexits(
"FIELDS_FINALISE",err,error)
31502 END SUBROUTINE fields_finalise
31509 SUBROUTINE fields_initialise_generic(FIELDS,ERR,ERROR,*)
31512 TYPE(fields_type),
POINTER :: fields
31513 INTEGER(INTG),
INTENT(OUT) :: err
31514 TYPE(varying_string),
INTENT(OUT) :: error
31517 enters(
"FIELDS_INITIALISE_GENERIC",err,error,*999)
31519 IF(
ASSOCIATED(fields))
THEN 31520 NULLIFY(fields%REGION)
31521 NULLIFY(fields%INTERFACE)
31522 fields%NUMBER_OF_FIELDS=0
31523 NULLIFY(fields%FIELDS)
31525 CALL flagerror(
"Fields is not associated.",err,error,*999)
31528 exits(
"FIELDS_INITIALISE_GENERIC")
31530 999 errorsexits(
"FIELDS_INITIALISE_GENERIC",err,error)
31532 END SUBROUTINE fields_initialise_generic
31539 SUBROUTINE fields_initialise_interface(INTERFACE,ERR,ERROR,*)
31542 TYPE(interface_type),
POINTER :: interface
31543 INTEGER(INTG),
INTENT(OUT) :: err
31544 TYPE(varying_string),
INTENT(OUT) :: error
31547 enters(
"FIELDS_INITIALISE_INTERFACE",err,error,*999)
31549 IF(
ASSOCIATED(interface))
THEN 31550 IF(
ASSOCIATED(interface%FIELDS))
THEN 31551 CALL flagerror(
"Interface already has fields associated.",err,error,*999)
31553 ALLOCATE(interface%FIELDS,stat=err)
31554 IF(err/=0)
CALL flagerror(
"Interface fields could not be allocated.",err,error,*999)
31555 CALL fields_initialise_generic(interface%FIELDS,err,error,*999)
31556 interface%FIELDS%INTERFACE=>
INTERFACE 31559 CALL flagerror(
"Interface is not associated.",err,error,*999)
31562 exits(
"FIELDS_INITIALISE_INTERFACE")
31564 999 errorsexits(
"FIELDS_INITIALISE_INTERFACE",err,error)
31566 END SUBROUTINE fields_initialise_interface
31573 SUBROUTINE fields_initialise_region(REGION,ERR,ERROR,*)
31576 TYPE(region_type),
POINTER :: region
31577 INTEGER(INTG),
INTENT(OUT) :: err
31578 TYPE(varying_string),
INTENT(OUT) :: error
31581 enters(
"FIELDS_INITIALISE_REGION",err,error,*999)
31583 IF(
ASSOCIATED(region))
THEN 31584 IF(
ASSOCIATED(region%FIELDS))
THEN 31585 CALL flagerror(
"Region already has fields associated.",err,error,*999)
31587 ALLOCATE(region%FIELDS,stat=err)
31588 IF(err/=0)
CALL flagerror(
"Region fields could not be allocated.",err,error,*999)
31589 CALL fields_initialise_generic(region%FIELDS,err,error,*999)
31590 region%FIELDS%REGION=>region
31593 CALL flagerror(
"Region is not associated.",err,error,*999)
31596 exits(
"FIELDS_INITIALISE_REGION")
31598 999 errorsexits(
"FIELDS_INITIALISE_REGION",err,error)
31600 END SUBROUTINE fields_initialise_region
31607 SUBROUTINE mesh_embedding_push_data(MESH_EMBEDDING,PARENT_FIELD,PARENT_COMPONENT,CHILD_FIELD,CHILD_COMPONENT,ERR,ERROR,*)
31608 TYPE(mesh_embedding_type),
INTENT(INOUT) :: mesh_embedding
31609 INTEGER(INTG),
INTENT(OUT) :: err
31610 TYPE(varying_string),
INTENT(OUT) :: error
31611 TYPE(field_type),
POINTER :: parent_field
31612 TYPE(field_type),
POINTER :: child_field
31613 INTEGER(INTG),
INTENT(IN) :: parent_component
31614 INTEGER(INTG),
INTENT(IN) :: child_component
31617 TYPE(mesh_element_type),
POINTER :: element
31618 TYPE(basis_type),
POINTER :: basis
31619 INTEGER(INTG) :: e,i,b,version
31620 REAL(DP) :: interp_val, wt
31621 REAL(DP),
ALLOCATABLE :: parent_values(:)
31623 enters(
"MESH_EMBEDDING_PUSH_DATA",err,error,*999)
31625 DO e=1,mesh_embedding%PARENT_MESH%NUMBER_OF_ELEMENTS
31626 element=>mesh_embedding%PARENT_MESH%TOPOLOGY(1)%PTR%ELEMENTS%ELEMENTS(e)
31627 basis=>element%BASIS
31628 ALLOCATE(parent_values(basis%NUMBER_OF_NODES))
31630 DO b=1,basis%NUMBER_OF_NODES
31632 CALL field_parameter_set_get_node(parent_field,field_u_variable_type,field_values_set_type,version,1,&
31633 & element%GLOBAL_ELEMENT_NODES(b),parent_component,parent_values(b),err,error,*999)
31637 DO i=1,mesh_embedding%CHILD_NODE_XI_POSITION(e)%NUMBER_OF_NODES
31639 DO b=1,basis%NUMBER_OF_NODES
31640 wt = basis_evaluate_xi(basis,b,no_part_deriv,mesh_embedding%CHILD_NODE_XI_POSITION(e)%XI_COORDS(:,i),err,error)
31641 interp_val = interp_val + wt * parent_values(b)
31646 CALL field_parameter_set_update_node(child_field,field_u_variable_type,field_values_set_type,version,1,&
31647 & mesh_embedding%CHILD_NODE_XI_POSITION(e)%NODE_NUMBERS(i),child_component,interp_val,err,error,*999)
31649 DEALLOCATE(parent_values)
31653 999 errorsexits(
"MESH_EMBEDDING_PUSH_DATA",err,error)
31655 END SUBROUTINE mesh_embedding_push_data
31661 SUBROUTINE mesh_embedding_pull_gauss_point_data(MESH_EMBEDDING,PARENT_FIELD,PARENT_COMPONENT,CHILD_FIELD,CHILD_COMPONENT,&
31664 TYPE(mesh_embedding_type),
INTENT(INOUT) :: mesh_embedding
31665 INTEGER(INTG),
INTENT(OUT) :: err
31666 TYPE(varying_string),
INTENT(OUT) :: error
31667 TYPE(field_type),
POINTER :: parent_field
31668 TYPE(field_type),
POINTER :: child_field
31669 INTEGER(INTG),
INTENT(IN) :: parent_component
31670 INTEGER(INTG),
INTENT(IN) :: child_component
31673 TYPE(meshelementstype),
POINTER :: elements
31674 TYPE(mesh_element_type),
POINTER :: element
31675 TYPE(basis_type),
POINTER :: basis
31676 INTEGER(INTG) :: e,gp,b, ngp,version
31677 REAL(DP) :: interp_val, wt, val
31679 enters(
"MESH_EMBEDDING_PULL_GAUSS_POINT_DATA",err,error,*999)
31681 elements=>mesh_embedding%CHILD_MESH%TOPOLOGY(1)%PTR%ELEMENTS
31683 basis=>mesh_embedding%CHILD_MESH%TOPOLOGY(1)%PTR%ELEMENTS%ELEMENTS(1)%BASIS
31685 DO e=1,mesh_embedding%PARENT_MESH%NUMBER_OF_ELEMENTS
31686 ngp = basis%QUADRATURE%QUADRATURE_SCHEME_MAP(basis_default_quadrature_scheme)%PTR%NUMBER_OF_GAUSS
31688 element=>elements%ELEMENTS(mesh_embedding%GAUSS_POINT_XI_POSITION(gp,e)%ELEMENT_NUMBER)
31689 basis=>element%BASIS
31690 DO b=1,basis%NUMBER_OF_NODES
31692 CALL field_parameter_set_get_node(child_field,field_u_variable_type,field_values_set_type,version,1,&
31693 & element%GLOBAL_ELEMENT_NODES(b),child_component,val ,err,error,*999)
31694 wt = basis_evaluate_xi(basis,b,no_part_deriv,mesh_embedding%GAUSS_POINT_XI_POSITION(gp,e)%CHILD_XI_COORD,err,error)
31695 interp_val = interp_val + wt * val
31698 CALL field_parameter_set_update_gauss_point(parent_field,field_u_variable_type,field_values_set_type,gp,e,&
31699 & parent_component, interp_val,err,error,*999)
31704 999 errorsexits(
"MESH_EMBEDDING_PULL_GAUSS_POINT_DATA",err,error)
31706 END SUBROUTINE mesh_embedding_pull_gauss_point_data
31713 SUBROUTINE field_parameter_set_get_gauss_point_coord(MESH_EMBEDDING,COMPONENT_NUMBER,NGP,COORD_VALUE, &
31716 TYPE(mesh_embedding_type),
INTENT(INOUT) :: mesh_embedding
31717 INTEGER(INTG),
INTENT(IN) :: component_number
31718 INTEGER(INTG),
INTENT(OUT) :: ngp
31719 REAL(DP),
INTENT(OUT) :: coord_value(:)
31720 INTEGER(INTG),
INTENT(OUT) :: err
31721 TYPE(varying_string),
INTENT(OUT) :: error
31724 TYPE(meshelementstype),
POINTER :: elements
31725 TYPE(basis_type),
POINTER :: basis
31726 INTEGER(INTG) :: gp
31728 enters(
"FIELD_PARAMETER_SET_GET_GAUSS_POINT_COORD",err,error,*999)
31730 elements=>mesh_embedding%PARENT_MESH%TOPOLOGY(1)%PTR%ELEMENTS
31732 basis=>mesh_embedding%PARENT_MESH%TOPOLOGY(1)%PTR%ELEMENTS%ELEMENTS(1)%BASIS
31733 ngp = basis%QUADRATURE%QUADRATURE_SCHEME_MAP(basis_default_quadrature_scheme)%PTR%NUMBER_OF_GAUSS
31736 coord_value(gp) = basis%QUADRATURE%QUADRATURE_SCHEME_MAP(basis_default_quadrature_scheme)%PTR%&
31737 &gauss_positions(component_number,gp)
31740 999 errorsexits(
"FIELD_PARAMETER_SET_GET_GAUSS_POINT_COORD",err,error)
31742 END SUBROUTINE field_parameter_set_get_gauss_point_coord
31749 SUBROUTINE field_user_number_to_field_region( USER_NUMBER, REGION, FIELD, ERR, ERROR, * )
31751 INTEGER(INTG),
INTENT(IN) :: user_number
31752 TYPE(region_type),
POINTER :: region
31753 TYPE(field_type),
POINTER :: field
31754 INTEGER(INTG),
INTENT(OUT) :: err
31755 TYPE(varying_string),
INTENT(OUT) :: error
31758 TYPE(varying_string) :: local_error
31760 enters(
"FIELD_USER_NUMBER_TO_FIELD_REGION", err, error, *999 )
31763 CALL field_user_number_find( user_number, region, field, err, error, *999 )
31764 CALL field_user_number_find( user_number, region, field, err, error, *999 )
31765 IF( .NOT.
ASSOCIATED( field ) )
THEN 31766 local_error =
"A field with an user number of "//trim(number_to_vstring( user_number,
"*", err, error ))// &
31767 &
" does not exist on region number "//trim(number_to_vstring( region%USER_NUMBER,
"*", err, error ))//
"." 31768 CALL flagerror( local_error, err, error, *999 )
31771 exits(
"FIELD_USER_NUMBER_TO_FIELD_REGION" )
31773 999 errorsexits(
"FIELD_USER_NUMBER_TO_FIELD_REGION", err, error )
31776 END SUBROUTINE field_user_number_to_field_region
31783 SUBROUTINE field_user_number_to_field_interface( USER_NUMBER, INTERFACE, FIELD, ERR, ERROR, * )
31785 INTEGER(INTG),
INTENT(IN) :: user_number
31786 TYPE(interface_type),
POINTER :: interface
31787 TYPE(field_type),
POINTER :: field
31788 INTEGER(INTG),
INTENT(OUT) :: err
31789 TYPE(varying_string),
INTENT(OUT) :: error
31792 TYPE(varying_string) :: local_error
31794 enters(
"FIELD_USER_NUMBER_TO_FIELD_INTERFACE", err, error, *999 )
31797 CALL field_user_number_find( user_number, interface, field, err, error, *999 )
31798 CALL field_user_number_find( user_number, interface, field, err, error, *999 )
31799 IF( .NOT.
ASSOCIATED( field ) )
THEN 31800 local_error =
"A field with an user number of "//trim(number_to_vstring( user_number,
"*", err, error ))// &
31801 &
" does not exist on region number "//trim(number_to_vstring( interface%USER_NUMBER,
"*", err, error ))//
"." 31802 CALL flagerror( local_error, err, error, *999 )
31805 exits(
"FIELD_USER_NUMBER_TO_FIELD_INTERFACE" )
31807 999 errorsexits(
"FIELD_USER_NUMBER_TO_FIELD_INTERFACE", err, error )
31810 END SUBROUTINE field_user_number_to_field_interface
31816 END MODULE field_routines
This module contains all basis function routines.
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
integer, parameter ptr
Pointer integer kind.
Contains information for a component of a field variable.
This module contains all coordinate transformation and support routines.
Contains information for a region.
Converts a number to its equivalent varying string representation.
Contains information on the mesh decomposition.
A buffer type to allow for an array of pointers to a FIELD_TYPE.
Contains the topology information for a domain.
Contains information on the fields defined on a region.
This module contains all string manipulation and transformation routines.
This module contains all mathematics support routines.
Contains information for a field defined on a region.
logical, save, public diagnostics2
.TRUE. if level 2 diagnostic output is active in the current routine
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
A type to temporarily hold (cache) the user modifiable values which are used to create a field...
integer(intg), parameter, public basis_default_quadrature_scheme
Identifier for the default quadrature scheme.
Contains information on a coordinate system.
Contains the topology information for the elements of a domain.
logical, save, public diagnostics3
.TRUE. if level 3 diagnostic output is active in the current routine
Contains the topology information for a decomposition.
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.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
Contains data point decompostion topology.
This module contains all computational environment variables.
This module contains CMISS MPI routines.
This module handles all domain mappings routines.
Contains information on a mesh defined on a region.
Contains the topology information for the nodes of a domain.
logical, save, public diagnostics1
.TRUE. if level 1 diagnostic output is active in the current routine
This module handles all distributed matrix vector routines.
Contains the interpolated value (and the derivatives wrt xi) of a field at a point. Old CMISS name XG.
A type to hold the parameter sets for a field.
integer(intg), parameter, public diagnostic_output_type
Diagnostic output type.
Contains information for a field variable defined on a field.
Contains the parameters required to interpolate a field variable within an element. Old CMISS name XE.
A pointer to the domain decomposition for this domain.
subroutine, public errors(NAME, ERR, ERROR)
Records the exiting error of the subroutine.
Contains information for the interface data.
Implements lists of base types.
Contains all information about a basis .
Flags an error condition.
Flags an error condition.
This module contains all kind definitions.