111 INTEGER(INTG),
INTENT(IN) :: SOLUTION_METHOD
112 INTEGER(INTG),
INTENT(OUT) :: ERR
117 enters(
"Stokes_EquationsSetSolutionMethodSet",err,error,*999)
119 IF(
ASSOCIATED(equations_set))
THEN 120 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 121 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
122 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 123 CALL flagerror(
"Equations set specification must have 3 entries for a Stokes equations set.", &
126 SELECT CASE(equations_set%SPECIFICATION(3))
132 SELECT CASE(solution_method)
136 CALL flagerror(
"Not implemented.",err,error,*999)
138 CALL flagerror(
"Not implemented.",err,error,*999)
140 CALL flagerror(
"Not implemented.",err,error,*999)
142 CALL flagerror(
"Not implemented.",err,error,*999)
144 CALL flagerror(
"Not implemented.",err,error,*999)
146 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 147 CALL flagerror(local_error,err,error,*999)
150 local_error=
"The third equations set specification of "// &
152 &
" is not valid for a Stokes flow equation of a fluid mechanics equations set." 153 CALL flagerror(local_error,err,error,*999)
156 CALL flagerror(
"Equations set is not associated.",err,error,*999)
159 exits(
"Stokes_EquationsSetSolutionMethodSet")
161 999 errorsexits(
"Stokes_EquationsSetSolutionMethodSet",err,error)
175 INTEGER(INTG),
INTENT(IN) :: specification(:)
176 INTEGER(INTG),
INTENT(OUT) :: err
180 INTEGER(INTG) :: subtype
182 enters(
"Stokes_EquationsSetSpecificationSet",err,error,*999)
184 IF(
ASSOCIATED(equationsset))
THEN 185 IF(
SIZE(specification,1)/=3)
THEN 186 CALL flagerror(
"Equations set specification must have three entries for a Stokes type equations set.", &
189 subtype=specification(3)
198 CALL flagerror(
"Not implemented yet.",err,error,*999)
200 localerror=
"The third equations set specification of "//
trim(
numbertovstring(specification(3),
"*",err,error))// &
201 &
" is not valid for Stokes flow of a fluid mechanics equations set." 202 CALL flagerror(localerror,err,error,*999)
205 IF(
ALLOCATED(equationsset%specification))
THEN 206 CALL flagerror(
"Equations set specification is already allocated.",err,error,*999)
208 ALLOCATE(equationsset%specification(3),stat=err)
209 IF(err/=0)
CALL flagerror(
"Could not allocate equations set specification.",err,error,*999)
213 CALL flagerror(
"Equations set is not associated.",err,error,*999)
216 exits(
"Stokes_EquationsSetSpecificationSet")
218 999
errors(
"Stokes_EquationsSetSpecificationSet",err,error)
219 exits(
"Stokes_EquationsSetSpecificationSet")
234 INTEGER(INTG),
INTENT(OUT) :: ERR
237 INTEGER(INTG) :: GEOMETRIC_SCALING_TYPE,GEOMETRIC_MESH_COMPONENT
244 INTEGER(INTG):: DEPENDENT_FIELD_NUMBER_OF_VARIABLES,DEPENDENT_FIELD_NUMBER_OF_COMPONENTS
245 INTEGER(INTG):: INDEPENDENT_FIELD_NUMBER_OF_VARIABLES,INDEPENDENT_FIELD_NUMBER_OF_COMPONENTS
246 INTEGER(INTG):: NUMBER_OF_DIMENSIONS,GEOMETRIC_COMPONENT_NUMBER
247 INTEGER(INTG):: MATERIAL_FIELD_NUMBER_OF_VARIABLES,MATERIAL_FIELD_NUMBER_OF_COMPONENTS,I
249 enters(
"STOKES_EQUATION_SET_SETUP",err,error,*999)
252 NULLIFY(equations_mapping)
253 NULLIFY(equations_matrices)
254 NULLIFY(geometric_decomposition)
256 IF(
ASSOCIATED(equations_set))
THEN 257 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 258 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
259 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<3)
THEN 260 CALL flagerror(
"Equations set specification must have >= 3 entries for a Stokes flow equations set.", &
263 SELECT CASE(equations_set%SPECIFICATION(3))
270 SELECT CASE(equations_set_setup%SETUP_TYPE)
273 SELECT CASE(equations_set%SPECIFICATION(3))
277 SELECT CASE(equations_set_setup%ACTION_TYPE)
287 & setup_type,
"*",err,error))//
" is invalid for a standard Stokes fluid." 288 CALL flagerror(local_error,err,error,*999)
291 local_error=
"The third equations set specification of "// &
293 & err,error))//
" is invalid for a Stokes flow equations set." 294 CALL flagerror(local_error,err,error,*999)
298 SELECT CASE(equations_set%SPECIFICATION(3))
304 local_error=
"The third equations set specification of "// &
306 & err,error))//
" is invalid for a Stokes flow equations set." 307 CALL flagerror(local_error,err,error,*999)
311 SELECT CASE(equations_set%SPECIFICATION(3))
315 SELECT CASE(equations_set_setup%ACTION_TYPE)
318 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 321 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION, &
322 & equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
324 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
326 CALL field_label_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
328 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
329 & field_dependent_type,err,error,*999)
331 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
334 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
335 & geometric_decomposition,err,error,*999)
337 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
338 & geometric_field,err,error,*999)
340 dependent_field_number_of_variables=2
341 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
342 & dependent_field_number_of_variables,err,error,*999)
343 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
344 & field_deludeln_variable_type],err,error,*999)
345 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
346 & field_vector_dimension_type,err,error,*999)
347 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
348 & field_vector_dimension_type,err,error,*999)
349 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
350 & field_dp_type,err,error,*999)
351 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
352 & field_dp_type,err,error,*999)
353 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
354 & number_of_dimensions,err,error,*999)
356 dependent_field_number_of_components=number_of_dimensions+1
357 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
358 & field_u_variable_type,dependent_field_number_of_components,err,error,*999)
359 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
360 & field_deludeln_variable_type,dependent_field_number_of_components,err,error,*999)
361 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
362 & 1,geometric_mesh_component,err,error,*999)
364 DO i=1,dependent_field_number_of_components
365 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD, &
366 & field_u_variable_type,i,geometric_mesh_component,err,error,*999)
367 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD, &
368 & field_deludeln_variable_type,i,geometric_mesh_component,err,error,*999)
370 SELECT CASE(equations_set%SOLUTION_METHOD)
373 DO i=1,dependent_field_number_of_components
374 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
375 & field_u_variable_type,i,field_node_based_interpolation,err,error,*999)
376 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
377 & field_deludeln_variable_type,i,field_node_based_interpolation,err,error,*999)
379 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type, &
381 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type, &
385 local_error=
"The solution method of " &
387 CALL flagerror(local_error,err,error,*999)
391 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
392 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
393 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
394 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type, &
395 & field_deludeln_variable_type],err,error,*999)
396 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
398 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
399 & field_vector_dimension_type,err,error,*999)
400 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
401 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type, &
403 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
404 & number_of_dimensions,err,error,*999)
406 dependent_field_number_of_components=number_of_dimensions+1
407 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
408 & dependent_field_number_of_components,err,error,*999)
409 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
410 & dependent_field_number_of_components,err,error,*999)
411 SELECT CASE(equations_set%SOLUTION_METHOD)
413 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
414 & field_node_based_interpolation,err,error,*999)
415 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
416 & field_node_based_interpolation,err,error,*999)
419 &
"*",err,error))//
" is invalid." 420 CALL flagerror(local_error,err,error,*999)
425 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 426 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
429 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
431 &
" is invalid for a standard Stokes fluid" 432 CALL flagerror(local_error,err,error,*999)
435 local_error=
"The third equations set specification of "// &
437 & err,error))//
" is invalid for a Stokes flow equations set." 442 SELECT CASE(equations_set%SPECIFICATION(3))
444 SELECT CASE(equations_set_setup%ACTION_TYPE)
447 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 450 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION, &
451 & equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
453 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
455 CALL field_label_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,
"Independent Field",err,error,*999)
457 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
458 & field_independent_type,err,error,*999)
460 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
463 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
464 & geometric_decomposition,err,error,*999)
466 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set% &
467 & geometry%GEOMETRIC_FIELD,err,error,*999)
469 independent_field_number_of_variables=1
470 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
471 & independent_field_number_of_variables,err,error,*999)
472 CALL field_variable_types_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
473 & [field_u_variable_type],err,error,*999)
474 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
475 & field_vector_dimension_type,err,error,*999)
476 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
477 & field_dp_type,err,error,*999)
478 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
479 & number_of_dimensions,err,error,*999)
481 independent_field_number_of_components=number_of_dimensions
482 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
483 & field_u_variable_type,independent_field_number_of_components,err,error,*999)
484 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
485 & 1,geometric_mesh_component,err,error,*999)
487 DO i=1,independent_field_number_of_components
488 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
489 & field_u_variable_type,i,geometric_mesh_component,err,error,*999)
491 SELECT CASE(equations_set%SOLUTION_METHOD)
494 DO i=1,independent_field_number_of_components
495 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
496 & field_u_variable_type,i,field_node_based_interpolation,err,error,*999)
498 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type, &
500 CALL field_scaling_type_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_scaling_type, &
504 local_error=
"The solution method of " &
506 CALL flagerror(local_error,err,error,*999)
510 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
511 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
512 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
513 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
514 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
516 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
517 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
518 & number_of_dimensions,err,error,*999)
520 independent_field_number_of_components=number_of_dimensions
521 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
522 & independent_field_number_of_components,err,error,*999)
523 SELECT CASE(equations_set%SOLUTION_METHOD)
525 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
526 & field_node_based_interpolation,err,error,*999)
527 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
528 & field_node_based_interpolation,err,error,*999)
531 &
"*",err,error))//
" is invalid." 532 CALL flagerror(local_error,err,error,*999)
537 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 538 CALL field_create_finish(equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
539 CALL field_parameter_set_create(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
540 & field_mesh_displacement_set_type,err,error,*999)
541 CALL field_parameter_set_create(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
542 & field_mesh_velocity_set_type,err,error,*999)
543 CALL field_parameter_set_create(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
544 & field_boundary_set_type,err,error,*999)
547 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
549 &
" is invalid for a standard Stokes fluid" 550 CALL flagerror(local_error,err,error,*999)
553 local_error=
"The third equations set specification of "// &
555 & err,error))//
" is invalid for a Stokes flow equations set." 556 CALL flagerror(local_error,err,error,*999)
560 SELECT CASE(equations_set%SPECIFICATION(3))
563 SELECT CASE(equations_set_setup%ACTION_TYPE)
566 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 567 IF(
ASSOCIATED(equations_set%DEPENDENT%DEPENDENT_FIELD))
THEN 568 IF(
ASSOCIATED(equations_set%GEOMETRY%GEOMETRIC_FIELD))
THEN 569 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
570 & number_of_dimensions,err,error,*999)
571 SELECT CASE(equations_set_setup%ANALYTIC_FUNCTION_TYPE)
603 local_error=
"The specified analytic function type of "// &
605 &
" is invalid for an analytic Stokes problem." 606 CALL flagerror(local_error,err,error,*999)
609 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
612 CALL flagerror(
"Equations set dependent field is not associated.",err,error,*999)
615 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
618 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 619 IF(
ASSOCIATED(equations_set%ANALYTIC%ANALYTIC_FIELD))
THEN 620 IF(equations_set%ANALYTIC%ANALYTIC_FIELD_AUTO_CREATED)
THEN 621 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
625 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
628 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
630 &
" is invalid for an analytic Stokes problem." 631 CALL flagerror(local_error,err,error,*999)
634 local_error=
"The third equations set specification of "// &
636 " is invalid for a Stokes flow equations set." 641 SELECT CASE(equations_set%SPECIFICATION(3))
646 material_field_number_of_variables=1
647 material_field_number_of_components=2
648 SELECT CASE(equations_set_setup%ACTION_TYPE)
651 equations_materials=>equations_set%MATERIALS
652 IF(
ASSOCIATED(equations_materials))
THEN 653 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 656 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set% &
657 & materials%MATERIALS_FIELD,err,error,*999)
658 CALL field_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_material_type,err,error,*999)
660 CALL field_label_set_and_lock(equations_materials%MATERIALS_FIELD,
"Materials Field",err,error,*999)
661 CALL field_dependent_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_independent_type, &
663 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
666 CALL field_mesh_decomposition_set_and_lock(equations_set%MATERIALS%MATERIALS_FIELD, &
667 & geometric_decomposition,err,error,*999)
669 CALL field_geometric_field_set_and_lock(equations_materials%MATERIALS_FIELD,equations_set%GEOMETRY% &
670 & geometric_field,err,error,*999)
671 CALL field_number_of_variables_set(equations_materials%MATERIALS_FIELD, &
672 & material_field_number_of_variables,err,error,*999)
673 CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,[field_u_variable_type], &
675 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
676 & field_vector_dimension_type,err,error,*999)
677 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
678 & field_dp_type,err,error,*999)
679 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
680 & material_field_number_of_components,err,error,*999)
681 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
682 & 1,geometric_component_number,err,error,*999)
683 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
684 & 1,geometric_component_number,err,error,*999)
685 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
686 & 1,field_constant_interpolation,err,error,*999)
688 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
689 CALL field_scaling_type_set(equations_materials%MATERIALS_FIELD,geometric_scaling_type,err,error,*999)
692 CALL field_type_check(equations_set_setup%FIELD,field_material_type,err,error,*999)
693 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
694 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
695 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
696 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
698 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
699 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
700 & number_of_dimensions,err,error,*999)
701 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
704 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
708 equations_materials=>equations_set%MATERIALS
709 IF(
ASSOCIATED(equations_materials))
THEN 710 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 712 CALL field_create_finish(equations_materials%MATERIALS_FIELD,err,error,*999)
717 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
718 & field_values_set_type,1,1.0_dp,err,error,*999)
725 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
728 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
730 &
" is invalid for Stokes equation." 731 CALL flagerror(local_error,err,error,*999)
734 local_error=
"The third equations set specification of "// &
736 &
" is invalid for a Stokes flow equations set." 737 CALL flagerror(local_error,err,error,*999)
741 SELECT CASE(equations_set%SPECIFICATION(3))
746 SELECT CASE(equations_set_setup%ACTION_TYPE)
753 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
755 &
" is invalid for a standard Stokes fluid." 756 CALL flagerror(local_error,err,error,*999)
759 local_error=
"The third equations set specification of "// &
761 &
" is invalid for a Stokes flow equations set." 766 SELECT CASE(equations_set%SPECIFICATION(3))
768 SELECT CASE(equations_set_setup%ACTION_TYPE)
770 equations_materials=>equations_set%MATERIALS
771 IF(
ASSOCIATED(equations_materials))
THEN 772 IF(equations_materials%MATERIALS_FINISHED)
THEN 777 CALL flagerror(
"Equations set materials has not been finished.",err,error,*999)
780 CALL flagerror(
"Equations materials is not associated.",err,error,*999)
783 SELECT CASE(equations_set%SOLUTION_METHOD)
798 SELECT CASE(equations%SPARSITY_TYPE)
808 local_error=
"The equations matrices sparsity type of "// &
810 CALL flagerror(local_error,err,error,*999)
815 &
"*",err,error))//
" is invalid." 816 CALL flagerror(local_error,err,error,*999)
819 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
821 &
" is invalid for a steady Laplace equation." 822 CALL flagerror(local_error,err,error,*999)
825 SELECT CASE(equations_set_setup%ACTION_TYPE)
827 equations_materials=>equations_set%MATERIALS
828 IF(
ASSOCIATED(equations_materials))
THEN 829 IF(equations_materials%MATERIALS_FINISHED)
THEN 834 CALL flagerror(
"Equations set materials has not been finished.",err,error,*999)
837 CALL flagerror(
"Equations materials is not associated.",err,error,*999)
840 SELECT CASE(equations_set%SOLUTION_METHOD)
865 SELECT CASE(equations%SPARSITY_TYPE)
876 local_error=
"The equations matrices sparsity type of "// &
878 CALL flagerror(local_error,err,error,*999)
884 & err,error))//
" is invalid." 885 CALL flagerror(local_error,err,error,*999)
888 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
890 &
" is invalid for a Stokes equation." 891 CALL flagerror(local_error,err,error,*999)
894 local_error=
"The third equations set specification of "// &
896 &
" is invalid for a Stokes flow equations set." 897 CALL flagerror(local_error,err,error,*999)
900 local_error=
"The setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
901 &
" is invalid for a standard Stokes fluid." 902 CALL flagerror(local_error,err,error,*999)
905 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
906 &
" does not equal a standard Stokes fluid subtype." 907 CALL flagerror(local_error,err,error,*999)
910 CALL flagerror(
"Equations set is not associated.",err,error,*999)
913 exits(
"STOKES_EQUATIONS_SET_SETUP")
915 999 errorsexits(
"STOKES_EQUATIONS_SET_SETUP",err,error)
928 INTEGER(INTG),
INTENT(IN) :: problemSpecification(:)
929 INTEGER(INTG),
INTENT(OUT) :: err
933 INTEGER(INTG) :: problemSubtype
935 enters(
"Stokes_ProblemSpecificationSet",err,error,*999)
937 IF(
ASSOCIATED(problem))
THEN 938 IF(
SIZE(problemspecification,1)==3)
THEN 939 problemsubtype=problemspecification(3)
940 SELECT CASE(problemsubtype)
948 CALL flagerror(
"Not implemented yet.",err,error,*999)
950 localerror=
"The third problem specification of "//
trim(
numbertovstring(problemsubtype,
"*",err,error))// &
951 &
" is not valid for a Stokes flow fluid mechanics problem." 952 CALL flagerror(localerror,err,error,*999)
954 IF(
ALLOCATED(problem%specification))
THEN 955 CALL flagerror(
"Problem specification is already allocated.",err,error,*999)
957 ALLOCATE(problem%specification(3),stat=err)
958 IF(err/=0)
CALL flagerror(
"Could not allocate problem specification.",err,error,*999)
962 CALL flagerror(
"Stokes flow problem specification must have >= 3 entries.",err,error,*999)
965 CALL flagerror(
"Problem is not associated.",err,error,*999)
968 exits(
"Stokes_ProblemSpecificationSet")
970 999 errorsexits(
"Stokes_ProblemSpecificationSet",err,error)
985 INTEGER(INTG),
INTENT(OUT) :: ERR
994 enters(
"STOKES_PROBLEM_SETUP",err,error,*999)
996 NULLIFY(control_loop)
999 NULLIFY(solver_equations)
1000 NULLIFY(mesh_solver_equations)
1002 IF(
ASSOCIATED(problem))
THEN 1003 IF(.NOT.
ALLOCATED(problem%specification))
THEN 1004 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
1005 ELSE IF(
SIZE(problem%specification,1)<3)
THEN 1006 CALL flagerror(
"Problem specification must have three entries for a Stokes problem.",err,error,*999)
1008 SELECT CASE(problem%SPECIFICATION(3))
1011 SELECT CASE(problem_setup%SETUP_TYPE)
1013 SELECT CASE(problem_setup%ACTION_TYPE)
1019 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1021 &
" is invalid for a standard Stokes fluid." 1022 CALL flagerror(local_error,err,error,*999)
1025 SELECT CASE(problem_setup%ACTION_TYPE)
1031 control_loop_root=>problem%CONTROL_LOOP
1035 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1037 &
" is invalid for a standard Stokes fluid." 1038 CALL flagerror(local_error,err,error,*999)
1042 control_loop_root=>problem%CONTROL_LOOP
1044 SELECT CASE(problem_setup%ACTION_TYPE)
1060 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1062 &
" is invalid for a standard Stokes fluid." 1063 CALL flagerror(local_error,err,error,*999)
1066 SELECT CASE(problem_setup%ACTION_TYPE)
1069 control_loop_root=>problem%CONTROL_LOOP
1081 control_loop_root=>problem%CONTROL_LOOP
1090 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1092 &
" is invalid for a standard Stokes fluid." 1093 CALL flagerror(local_error,err,error,*999)
1096 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
1097 &
" is invalid for a standard Stokes fluid." 1098 CALL flagerror(local_error,err,error,*999)
1102 SELECT CASE(problem_setup%SETUP_TYPE)
1104 SELECT CASE(problem_setup%ACTION_TYPE)
1110 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1112 &
" is invalid for a transient Stokes fluid." 1113 CALL flagerror(local_error,err,error,*999)
1116 SELECT CASE(problem_setup%ACTION_TYPE)
1123 control_loop_root=>problem%CONTROL_LOOP
1127 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1129 &
" is invalid for a transient Stokes fluid." 1130 CALL flagerror(local_error,err,error,*999)
1134 control_loop_root=>problem%CONTROL_LOOP
1136 SELECT CASE(problem_setup%ACTION_TYPE)
1155 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1157 &
" is invalid for a transient Stokes fluid." 1158 CALL flagerror(local_error,err,error,*999)
1161 SELECT CASE(problem_setup%ACTION_TYPE)
1164 control_loop_root=>problem%CONTROL_LOOP
1177 control_loop_root=>problem%CONTROL_LOOP
1186 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1188 &
" is invalid for a transient Stokes fluid." 1189 CALL flagerror(local_error,err,error,*999)
1192 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
1193 &
" is invalid for a transient Stokes fluid." 1194 CALL flagerror(local_error,err,error,*999)
1198 SELECT CASE(problem_setup%SETUP_TYPE)
1200 SELECT CASE(problem_setup%ACTION_TYPE)
1206 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1208 &
" is invalid for a ALE Stokes fluid." 1209 CALL flagerror(local_error,err,error,*999)
1212 SELECT CASE(problem_setup%ACTION_TYPE)
1219 control_loop_root=>problem%CONTROL_LOOP
1223 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1225 &
" is invalid for a ALE Stokes fluid." 1226 CALL flagerror(local_error,err,error,*999)
1230 control_loop_root=>problem%CONTROL_LOOP
1232 SELECT CASE(problem_setup%ACTION_TYPE)
1256 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1258 &
" is invalid for a ALE Stokes fluid." 1259 CALL flagerror(local_error,err,error,*999)
1262 SELECT CASE(problem_setup%ACTION_TYPE)
1265 control_loop_root=>problem%CONTROL_LOOP
1284 control_loop_root=>problem%CONTROL_LOOP
1297 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
1299 &
" is invalid for a ALE Stokes fluid." 1300 CALL flagerror(local_error,err,error,*999)
1303 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
1304 &
" is invalid for a ALE Stokes fluid." 1305 CALL flagerror(local_error,err,error,*999)
1309 &
" is not valid for a Stokes fluid type of a fluid mechanics problem class." 1310 CALL flagerror(local_error,err,error,*999)
1313 CALL flagerror(
"Problem is not associated.",err,error,*999)
1316 exits(
"STOKES_PROBLEM_SETUP")
1318 999 errorsexits(
"STOKES_PROBLEM_SETUP",err,error)
1331 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
1332 INTEGER(INTG),
INTENT(OUT) :: ERR
1335 INTEGER(INTG) FIELD_VAR_TYPE,ng,mh,mhs,mi,ms,nh,nhs,ni,ns,MESH_COMPONENT1,MESH_COMPONENT2, nhs_max, mhs_max, nhs_min, mhs_min
1336 REAL(DP) :: JGW,SUM,DXI_DX(3,3),PHIMS,PHINS,MU_PARAM,RHO_PARAM,DPHIMS_DXI(3),DPHINS_DXI(3)
1337 LOGICAL :: UPDATE_STIFFNESS_MATRIX, UPDATE_DAMPING_MATRIX,UPDATE_RHS_VECTOR
1338 TYPE(
basis_type),
POINTER :: DEPENDENT_BASIS,DEPENDENT_BASIS1,DEPENDENT_BASIS2,GEOMETRIC_BASIS,INDEPENDENT_BASIS
1348 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,MATERIALS_FIELD,INDEPENDENT_FIELD
1353 REAL(DP) :: AG_MATRIX(256,256)
1354 REAL(DP) :: AL_MATRIX(256,256)
1355 REAL(DP) :: BT_MATRIX(256,256)
1356 REAL(DP) :: MT_MATRIX(256,256)
1357 REAL(DP) :: CT_MATRIX(256,256)
1358 REAL(DP) :: ALE_MATRIX(256,256)
1359 REAL(DP) :: RH_VECTOR(256)
1360 REAL(DP) :: W_VALUE(3)
1364 CHARACTER(26) :: CVAR
1365 INTEGER :: GAUSS_POINT_LOOP_PHASE(2) = [ 0, 0 ]
1366 SAVE gauss_point_loop_phase
1367 INTEGER :: FIELD_COMPONENT_LOOP_PHASE(2) = [ 0, 0 ]
1368 SAVE field_component_loop_phase
1373 enters(
"STOKES_FINITE_ELEMENT_CALCULATE",err,error,*999)
1386 update_stiffness_matrix=.false.
1387 update_damping_matrix=.false.
1388 update_rhs_vector=.false.
1390 IF(
ASSOCIATED(equations_set))
THEN 1391 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 1392 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
1393 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 1394 CALL flagerror(
"Equations set specification must have three entries for a Stokes type equations set.", &
1397 equations=>equations_set%EQUATIONS
1398 IF(
ASSOCIATED(equations))
THEN 1399 SELECT CASE(equations_set%SPECIFICATION(3))
1404 CALL tau_static_phase_start(
"SET POINTERS")
1406 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
1407 independent_field=>equations%INTERPOLATION%INDEPENDENT_FIELD
1408 geometric_field=>equations%INTERPOLATION%GEOMETRIC_FIELD
1409 materials_field=>equations%INTERPOLATION%MATERIALS_FIELD
1410 equations_matrices=>equations%EQUATIONS_MATRICES
1411 geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
1412 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1413 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(dependent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
1414 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1416 rhs_vector=>equations_matrices%RHS_VECTOR
1417 equations_mapping=>equations%EQUATIONS_MAPPING
1418 SELECT CASE(equations_set%SPECIFICATION(3))
1420 linear_matrices=>equations_matrices%LINEAR_MATRICES
1421 stiffness_matrix=>linear_matrices%MATRICES(1)%PTR
1422 linear_mapping=>equations_mapping%LINEAR_MAPPING
1423 field_variable=>linear_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
1424 stiffness_matrix%ELEMENT_MATRIX%MATRIX=0.0_dp
1425 IF(
ASSOCIATED(stiffness_matrix)) update_stiffness_matrix=stiffness_matrix%UPDATE_MATRIX
1426 IF(
ASSOCIATED(rhs_vector)) update_rhs_vector=rhs_vector%UPDATE_VECTOR
1428 dynamic_matrices=>equations_matrices%DYNAMIC_MATRICES
1429 stiffness_matrix=>dynamic_matrices%MATRICES(1)%PTR
1430 damping_matrix=>dynamic_matrices%MATRICES(2)%PTR
1431 dynamic_mapping=>equations_mapping%DYNAMIC_MAPPING
1432 field_variable=>dynamic_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
1433 field_var_type=field_variable%VARIABLE_TYPE
1434 stiffness_matrix%ELEMENT_MATRIX%MATRIX=0.0_dp
1435 damping_matrix%ELEMENT_MATRIX%MATRIX=0.0_dp
1436 IF(
ASSOCIATED(stiffness_matrix)) update_stiffness_matrix=stiffness_matrix%UPDATE_MATRIX
1437 IF(
ASSOCIATED(damping_matrix)) update_damping_matrix=damping_matrix%UPDATE_MATRIX
1438 IF(
ASSOCIATED(rhs_vector)) update_rhs_vector=rhs_vector%UPDATE_VECTOR
1440 independent_field=>equations%INTERPOLATION%INDEPENDENT_FIELD
1441 independent_basis=>independent_field%DECOMPOSITION%DOMAIN(independent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)% &
1442 &
ptr%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)%BASIS
1443 dynamic_matrices=>equations_matrices%DYNAMIC_MATRICES
1444 stiffness_matrix=>dynamic_matrices%MATRICES(1)%PTR
1445 damping_matrix=>dynamic_matrices%MATRICES(2)%PTR
1446 dynamic_mapping=>equations_mapping%DYNAMIC_MAPPING
1447 field_variable=>dynamic_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
1448 field_var_type=field_variable%VARIABLE_TYPE
1449 stiffness_matrix%ELEMENT_MATRIX%MATRIX=0.0_dp
1450 damping_matrix%ELEMENT_MATRIX%MATRIX=0.0_dp
1451 IF(
ASSOCIATED(stiffness_matrix)) update_stiffness_matrix=stiffness_matrix%UPDATE_MATRIX
1452 IF(
ASSOCIATED(damping_matrix)) update_damping_matrix=damping_matrix%UPDATE_MATRIX
1453 IF(
ASSOCIATED(rhs_vector)) update_rhs_vector=rhs_vector%UPDATE_VECTOR
1454 CALL field_interpolation_parameters_element_get(field_mesh_velocity_set_type,element_number, &
1455 & equations%INTERPOLATION%INDEPENDENT_INTERP_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
1457 local_error=
"Equations set subtype "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
1458 &
" is not valid for a Stokes fluid type of a fluid mechanics equations set class." 1459 CALL flagerror(local_error,err,error,*999)
1461 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
1462 & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
1463 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
1464 & materials_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
1466 CALL tau_static_phase_stop(
"SET POINTERS")
1469 DO ng=1,quadrature_scheme%NUMBER_OF_GAUSS
1471 WRITE (cvar,
'(a17,i2)')
'Gauss Point Loop ',ng
1472 CALL tau_phase_create_dynamic(gauss_point_loop_phase,cvar)
1473 CALL tau_phase_start(gauss_point_loop_phase)
1474 CALL tau_static_phase_start(
"INTERPOLATE")
1477 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
1478 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
1479 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
1481 & materials_interp_point(field_u_variable_type)%PTR,err,error,*999)
1485 & independent_interp_point(field_u_variable_type)%PTR,err,error,*999)
1486 w_value(1)=equations%INTERPOLATION%INDEPENDENT_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,
no_part_deriv)
1487 w_value(2)=equations%INTERPOLATION%INDEPENDENT_INTERP_POINT(field_u_variable_type)%PTR%VALUES(2,
no_part_deriv)
1488 IF(field_variable%NUMBER_OF_COMPONENTS==4)
THEN 1489 w_value(3)=equations%INTERPOLATION%INDEPENDENT_INTERP_POINT(field_u_variable_type)%PTR%VALUES(3,
no_part_deriv)
1495 mu_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,
no_part_deriv)
1497 rho_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(2,
no_part_deriv)
1499 CALL tau_static_phase_stop(
"INTERPOLATE")
1510 DO mh=1,(field_variable%NUMBER_OF_COMPONENTS-1)
1512 WRITE (cvar,
'(a22,i2)')
'Field Components Loop ',mh
1513 CALL tau_phase_create_dynamic(field_component_loop_phase,cvar)
1514 CALL tau_phase_start(field_component_loop_phase)
1516 CALL tau_static_phase_start(
"Field Set Variables")
1518 mesh_component1=field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1519 dependent_basis1=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component1)%PTR% &
1520 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1522 jgw=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
1523 & quadrature_scheme1%GAUSS_WEIGHTS(ng)
1525 CALL tau_static_phase_stop(
"Field Set Variables")
1526 CALL tau_static_phase_start(
"Main Loop")
1528 DO ms=1,dependent_basis1%NUMBER_OF_ELEMENT_PARAMETERS
1531 IF(update_stiffness_matrix.OR.update_damping_matrix)
THEN 1533 DO nh=1,(field_variable%NUMBER_OF_COMPONENTS)
1537 mesh_component2=field_variable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
1538 dependent_basis2=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component2)%PTR% &
1539 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1540 quadrature_scheme2=>dependent_basis2%QUADRATURE%QUADRATURE_SCHEME_MAP &
1547 DO ns=1,dependent_basis2%NUMBER_OF_ELEMENT_PARAMETERS
1555 DO ni=1,dependent_basis2%NUMBER_OF_XI
1556 DO mi=1,dependent_basis1%NUMBER_OF_XI
1557 dxi_dx(mi,ni)=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR% &
1563 phims=quadrature_scheme1%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)
1564 phins=quadrature_scheme2%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)
1576 IF(update_stiffness_matrix)
THEN 1584 DO xv=1,dependent_basis1%NUMBER_OF_XI
1585 DO mi=1,dependent_basis1%NUMBER_OF_XI
1586 DO ni=1,dependent_basis2%NUMBER_OF_XI
1587 sum=sum+mu_param*dphins_dxi(ni)*dxi_dx(ni,xv)*dphims_dxi(mi)*dxi_dx(mi,xv)
1592 al_matrix(mhs,nhs)=al_matrix(mhs,nhs)+sum*jgw
1600 IF(update_stiffness_matrix)
THEN 1605 IF(nh<field_variable%NUMBER_OF_COMPONENTS)
THEN 1608 DO mi=1,dependent_basis1%NUMBER_OF_XI
1609 DO ni=1,dependent_basis2%NUMBER_OF_XI
1611 sum=sum+mu_param*dphins_dxi(mi)*dxi_dx(mi,mh)*dphims_dxi(ni)*dxi_dx(ni,nh)
1615 ag_matrix(mhs,nhs)=ag_matrix(mhs,nhs)+sum*jgw
1624 IF(update_stiffness_matrix)
THEN 1633 DO mi=1,dependent_basis1%NUMBER_OF_XI
1634 DO ni=1,dependent_basis1%NUMBER_OF_XI
1635 sum=sum-rho_param*w_value(mi)*dphins_dxi(ni)*dxi_dx(ni,mi)*phims
1639 ale_matrix(mhs,nhs)=ale_matrix(mhs,nhs)+sum*jgw
1648 IF(update_stiffness_matrix)
THEN 1653 IF(nh==field_variable%NUMBER_OF_COMPONENTS)
THEN 1656 DO ni=1,dependent_basis1%NUMBER_OF_XI
1657 sum=sum-phins*dphims_dxi(ni)*dxi_dx(ni,mh)
1660 bt_matrix(mhs,nhs)=bt_matrix(mhs,nhs)+sum*jgw
1674 IF(update_damping_matrix)
THEN 1678 sum=phims*phins*rho_param
1680 mt_matrix(mhs,nhs)=mt_matrix(mhs,nhs)+sum*jgw
1692 CALL tau_static_phase_stop(
"Main Loop")
1694 CALL tau_phase_stop(field_component_loop_phase)
1704 CALL tau_static_phase_start(
"RIGHT HAND SIDE FOR ANALYTIC SOLUTION")
1706 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 1719 DO mh=1,(field_variable%NUMBER_OF_COMPONENTS-1)
1720 mesh_component1=field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1721 dependent_basis1=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component1)%PTR% &
1722 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1724 jgw=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
1725 & quadrature_scheme1%GAUSS_WEIGHTS(ng)
1726 DO ms=1,dependent_basis1%NUMBER_OF_ELEMENT_PARAMETERS
1728 phims=quadrature_scheme1%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)
1731 x(1) = equations%INTERPOLATION%GEOMETRIC_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,1)
1732 x(2) = equations%INTERPOLATION%GEOMETRIC_INTERP_POINT(field_u_variable_type)%PTR%VALUES(2,1)
1733 IF(dependent_basis1%NUMBER_OF_XI==3)
THEN 1734 x(3) = equations%INTERPOLATION%GEOMETRIC_INTERP_POINT(field_u_variable_type)%PTR%VALUES(3,1)
1742 sum=phims*(-2.0_dp*mu_param/10.0_dp**2)
1750 sum=phims*(-4.0_dp*mu_param/100.0_dp*exp((x(1)-x(2))/10.0_dp))
1758 sum=phims*(16.0_dp*mu_param*
pi*
pi/100.0_dp*cos(2.0_dp*
pi*x(2)/10.0_dp)*cos(2.0_dp*
pi*x(1)/10.0_dp))
1774 sum=phims*(-4.0_dp*mu_param/100.0_dp)
1777 sum=phims*(-4.0_dp*mu_param/100.0_dp)
1785 sum=phims*(-2.0_dp*mu_param/100.0_dp*(2.0_dp*exp((x(1)-x(2))/10.0_dp)+exp((x(2)-x(3))/10.0_dp)))
1788 sum=phims*(-2.0_dp*mu_param/100.0_dp*(2.0_dp*exp((x(3)-x(1))/10.0_dp)+exp((x(2)-x(3))/10.0_dp)))
1796 sum=phims*(36*mu_param*
pi**2/100.0_dp*cos(2.0_dp*
pi*x(2)/10.0_dp)*sin(2.0_dp*
pi*x(3)/10.0_dp)* &
1797 & cos(2.0_dp*
pi*x(1)/10.0_dp))
1804 rh_vector(mhs)=rh_vector(mhs)+sum*jgw
1808 rh_vector(mhs)=0.0_dp
1813 CALL tau_static_phase_stop(
"RIGHT HAND SIDE FOR ANALYTIC SOLUTION")
1817 CALL tau_phase_stop(gauss_point_loop_phase)
1823 CALL tau_static_phase_start(
"ASSEMBLE STIFFNESS")
1834 IF(update_stiffness_matrix)
THEN 1835 stiffness_matrix%ELEMENT_MATRIX%MATRIX(1:mhs_min,1:nhs_min)=al_matrix(1:mhs_min,1:nhs_min)+ag_matrix(1:mhs_min, &
1836 & 1:nhs_min)+ale_matrix(1:mhs_min,1:nhs_min)
1837 stiffness_matrix%ELEMENT_MATRIX%MATRIX(1:mhs_min,nhs_min+1:nhs_max)=bt_matrix(1:mhs_min,nhs_min+1:nhs_max)
1838 DO mhs=mhs_min+1,mhs_max
1841 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(nhs,mhs)
1849 IF(update_damping_matrix)
THEN 1850 damping_matrix%ELEMENT_MATRIX%MATRIX(1:mhs_min,1:nhs_min)=mt_matrix(1:mhs_min,1:nhs_min)
1854 CALL tau_static_phase_stop(
"ASSEMBLE STIFFNESS")
1855 CALL tau_static_phase_start(
"RIGHT HAND SIDE VECTOR")
1858 IF(rhs_vector%FIRST_ASSEMBLY)
THEN 1859 IF(update_rhs_vector)
THEN 1860 rhs_vector%ELEMENT_VECTOR%VECTOR(1:mhs_max)=rh_vector(1:mhs_max)
1864 CALL tau_static_phase_stop(
"RIGHT HAND SIDE VECTOR")
1865 CALL tau_static_phase_start(
"DEFINE SCALING")
1869 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 1870 CALL field_interpolationparametersscalefactorselementget(element_number,equations%INTERPOLATION% &
1871 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
1873 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
1875 mesh_component1=field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1876 dependent_basis1=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component1)%PTR% &
1877 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1878 DO ms=1,dependent_basis1%NUMBER_OF_ELEMENT_PARAMETERS
1881 IF(update_stiffness_matrix.OR.update_damping_matrix)
THEN 1883 DO nh=1,field_variable%NUMBER_OF_COMPONENTS
1884 mesh_component2=field_variable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
1885 dependent_basis2=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component2)%PTR% &
1886 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1887 DO ns=1,dependent_basis2%NUMBER_OF_ELEMENT_PARAMETERS
1889 IF(update_stiffness_matrix)
THEN 1890 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
1891 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
1892 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
1894 IF(update_damping_matrix)
THEN 1895 damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
1896 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
1897 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
1902 IF(update_rhs_vector) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
1903 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
1908 CALL tau_static_phase_stop(
"DEFINE SCALING")
1911 local_error=
"Equations set subtype "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
1912 &
" is not valid for a Stokes fluid type of a fluid mechanics equations set class." 1913 CALL flagerror(local_error,err,error,*999)
1916 CALL flagerror(
"Equations set equations is not associated.",err,error,*999)
1919 CALL flagerror(
"Equations set is not associated.",err,error,*999)
1922 exits(
"STOKES_FINITE_ELEMENT_CALCULATE")
1924 999 errorsexits(
"STOKES_FINITE_ELEMENT_CALCULATE",err,error)
1938 INTEGER(INTG),
INTENT(OUT) :: ERR
1944 enters(
"STOKES_POST_SOLVE",err,error,*999)
1947 IF(
ASSOCIATED(control_loop))
THEN 1948 IF(
ASSOCIATED(solver))
THEN 1949 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 1950 IF(.NOT.
ALLOCATED(control_loop%problem%specification))
THEN 1951 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
1952 ELSE IF(
SIZE(control_loop%problem%specification,1)<3)
THEN 1953 CALL flagerror(
"Problem specification must have three entries for a Stokes problem.",err,error,*999)
1955 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
1967 IF(
ASSOCIATED(solver2%DYNAMIC_SOLVER))
THEN 1968 solver2%DYNAMIC_SOLVER%ALE=.true.
1970 CALL flagerror(
"Dynamic solver is not associated for ALE problem.",err,error,*999)
1978 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
1979 &
" is not valid for a Stokes fluid type of a fluid mechanics problem class." 1980 CALL flagerror(local_error,err,error,*999)
1983 CALL flagerror(
"Problem is not associated.",err,error,*999)
1986 CALL flagerror(
"Solver is not associated.",err,error,*999)
1989 CALL flagerror(
"Control loop is not associated.",err,error,*999)
1992 exits(
"STOKES_POST_SOLVE")
1994 999 errorsexits(
"STOKES_POST_SOLVE",err,error)
2008 INTEGER(INTG),
INTENT(OUT) :: ERR
2014 enters(
"STOKES_PRE_SOLVE",err,error,*999)
2017 IF(
ASSOCIATED(control_loop))
THEN 2018 IF(
ASSOCIATED(solver))
THEN 2019 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 2020 IF(.NOT.
ALLOCATED(control_loop%problem%specification))
THEN 2021 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
2022 ELSE IF(
SIZE(control_loop%problem%specification,1)<3)
THEN 2023 CALL flagerror(
"Problem specification must have three entries for a Stokes problem.",err,error,*999)
2025 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
2044 IF(
ASSOCIATED(solver2%DYNAMIC_SOLVER))
THEN 2046 solver2%DYNAMIC_SOLVER%ALE=.false.
2048 CALL flagerror(
"Dynamic solver is not associated for ALE problem.",err,error,*999)
2055 IF(solver%DYNAMIC_SOLVER%ALE)
THEN 2061 CALL flagerror(
"Mesh motion calculation not successful for ALE problem.",err,error,*999)
2064 CALL flagerror(
"Solver type is not associated for ALE problem.",err,error,*999)
2067 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
2068 &
" is not valid for a Stokes fluid type of a fluid mechanics problem class." 2069 CALL flagerror(local_error,err,error,*999)
2072 CALL flagerror(
"Problem is not associated.",err,error,*999)
2075 CALL flagerror(
"Solver is not associated.",err,error,*999)
2078 CALL flagerror(
"Control loop is not associated.",err,error,*999)
2081 exits(
"STOKES_PRE_SOLVE")
2083 999 errorsexits(
"STOKES_PRE_SOLVE",err,error)
2096 INTEGER(INTG),
INTENT(OUT) :: ERR
2106 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,MATERIALS_FIELD
2112 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT,DISPLACEMENT_VALUE,
VALUE,XI_COORDINATES(3)
2113 REAL(DP) :: T_COORDINATES(20,3)
2114 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS,BOUNDARY_CONDITION_CHECK_VARIABLE,GLOBAL_DERIV_INDEX,node_idx,variable_type
2115 INTEGER(INTG) :: variable_idx,local_ny,ANALYTIC_FUNCTION_TYPE,component_idx,deriv_idx,dim_idx
2116 INTEGER(INTG) :: element_idx,en_idx,I,J,K,number_of_nodes_xic(3)
2117 REAL(DP) :: X(3),MU_PARAM,RHO_PARAM
2118 REAL(DP),
POINTER :: MESH_VELOCITY_VALUES(:), GEOMETRIC_PARAMETERS(:)
2119 REAL(DP),
POINTER :: BOUNDARY_VALUES(:)
2122 enters(
"STOKES_PRE_SOLVE_UPDATE_BOUNDARY_CONDITIONS",err,error,*999)
2124 IF(
ASSOCIATED(control_loop))
THEN 2128 IF(
ASSOCIATED(solver))
THEN 2129 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 2130 IF(.NOT.
ALLOCATED(control_loop%problem%specification))
THEN 2131 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
2132 ELSE IF(
SIZE(control_loop%problem%specification,1)<3)
THEN 2133 CALL flagerror(
"Problem specification must have three entries for a Stokes problem.",err,error,*999)
2135 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
2139 solver_equations=>solver%SOLVER_EQUATIONS
2140 IF(
ASSOCIATED(solver_equations))
THEN 2141 solver_mapping=>solver_equations%SOLVER_MAPPING
2142 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
2143 IF(
ASSOCIATED(equations))
THEN 2144 equations_set=>equations%EQUATIONS_SET
2145 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 2151 IF(
ASSOCIATED(equations_set))
THEN 2152 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 2153 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
2154 IF(
ASSOCIATED(dependent_field))
THEN 2155 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
2156 IF(
ASSOCIATED(geometric_field))
THEN 2157 CALL field_number_of_components_get(geometric_field,field_u_variable_type,&
2158 & number_of_dimensions,err,error,*999)
2159 NULLIFY(interpolation_parameters)
2160 NULLIFY(interpolated_point)
2161 CALL field_interpolation_parameters_initialise(geometric_field,interpolation_parameters,err,error, &
2163 CALL field_interpolated_points_initialise(interpolation_parameters,interpolated_point,err,error,*999)
2164 NULLIFY(geometric_variable)
2165 CALL field_variable_get(geometric_field,field_u_variable_type,geometric_variable,err,error,*999)
2166 NULLIFY(geometric_parameters)
2167 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type,field_values_set_type,&
2168 & geometric_parameters,err,error,*999)
2169 DO variable_idx=1,dependent_field%NUMBER_OF_VARIABLES
2170 variable_type=dependent_field%VARIABLES(variable_idx)%VARIABLE_TYPE
2171 field_variable=>dependent_field%VARIABLE_TYPE_MAP(variable_type)%PTR
2172 IF(
ASSOCIATED(field_variable))
THEN 2173 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
2174 IF(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE== &
2175 & field_node_based_interpolation)
THEN 2176 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
2177 IF(
ASSOCIATED(domain))
THEN 2178 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 2179 domain_nodes=>domain%TOPOLOGY%NODES
2180 IF(
ASSOCIATED(domain_nodes))
THEN 2182 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
2183 element_idx=domain%topology%nodes%nodes(node_idx)%surrounding_elements(1)
2184 CALL field_interpolation_parameters_element_get(field_values_set_type,element_idx, &
2185 & interpolation_parameters(field_u_variable_type)%PTR,err,error,*999)
2187 xi_coordinates=0.0_dp
2188 number_of_nodes_xic(1)=domain%topology%elements%elements(element_idx)% &
2189 & basis%number_of_nodes_xic(1)
2190 number_of_nodes_xic(2)=domain%topology%elements%elements(element_idx)% &
2191 & basis%number_of_nodes_xic(2)
2192 IF(number_of_dimensions==3)
THEN 2193 number_of_nodes_xic(3)=domain%topology%elements%elements(element_idx)%basis% &
2194 & number_of_nodes_xic(3)
2196 number_of_nodes_xic(3)=1
2199 IF(domain%topology%elements%maximum_number_of_element_parameters==4.OR. &
2200 & domain%topology%elements%maximum_number_of_element_parameters==9.OR. &
2201 & domain%topology%elements%maximum_number_of_element_parameters==16.OR. &
2202 & domain%topology%elements%maximum_number_of_element_parameters==8.OR. &
2203 & domain%topology%elements%maximum_number_of_element_parameters==27.OR. &
2204 & domain%topology%elements%maximum_number_of_element_parameters==64)
THEN 2205 DO k=1,number_of_nodes_xic(3)
2206 DO j=1,number_of_nodes_xic(2)
2207 DO i=1,number_of_nodes_xic(1)
2209 IF(domain%topology%elements%elements(element_idx)% &
2210 & element_nodes(en_idx)==node_idx)
EXIT 2211 xi_coordinates(1)=xi_coordinates(1)+(1.0_dp/(number_of_nodes_xic(1)-1))
2213 IF(domain%topology%elements%elements(element_idx)% &
2214 & element_nodes(en_idx)==node_idx)
EXIT 2215 xi_coordinates(1)=0.0_dp
2216 xi_coordinates(2)=xi_coordinates(2)+(1.0_dp/(number_of_nodes_xic(2)-1))
2218 IF(domain%topology%elements%elements(element_idx)% &
2219 & element_nodes(en_idx)==node_idx)
EXIT 2220 xi_coordinates(1)=0.0_dp
2221 xi_coordinates(2)=0.0_dp
2222 IF(number_of_nodes_xic(3)/=1)
THEN 2223 xi_coordinates(3)=xi_coordinates(3)+(1.0_dp/(number_of_nodes_xic(3)-1))
2227 & interpolated_point(field_u_variable_type)%PTR,err,error,*999)
2230 IF(domain%topology%elements%maximum_number_of_element_parameters==3)
THEN 2231 t_coordinates(1,1:2)=[0.0_dp,1.0_dp]
2232 t_coordinates(2,1:2)=[1.0_dp,0.0_dp]
2233 t_coordinates(3,1:2)=[1.0_dp,1.0_dp]
2234 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==6)
THEN 2235 t_coordinates(1,1:2)=[0.0_dp,1.0_dp]
2236 t_coordinates(2,1:2)=[1.0_dp,0.0_dp]
2237 t_coordinates(3,1:2)=[1.0_dp,1.0_dp]
2238 t_coordinates(4,1:2)=[0.5_dp,0.5_dp]
2239 t_coordinates(5,1:2)=[1.0_dp,0.5_dp]
2240 t_coordinates(6,1:2)=[0.5_dp,1.0_dp]
2241 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==10.AND. &
2242 & number_of_dimensions==2)
THEN 2243 t_coordinates(1,1:2)=[0.0_dp,1.0_dp]
2244 t_coordinates(2,1:2)=[1.0_dp,0.0_dp]
2245 t_coordinates(3,1:2)=[1.0_dp,1.0_dp]
2246 t_coordinates(4,1:2)=[1.0_dp/3.0_dp,2.0_dp/3.0_dp]
2247 t_coordinates(5,1:2)=[2.0_dp/3.0_dp,1.0_dp/3.0_dp]
2248 t_coordinates(6,1:2)=[1.0_dp,1.0_dp/3.0_dp]
2249 t_coordinates(7,1:2)=[1.0_dp,2.0_dp/3.0_dp]
2250 t_coordinates(8,1:2)=[2.0_dp/3.0_dp,1.0_dp]
2251 t_coordinates(9,1:2)=[1.0_dp/3.0_dp,1.0_dp]
2252 t_coordinates(10,1:2)=[2.0_dp/3.0_dp,2.0_dp/3.0_dp]
2253 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==4)
THEN 2254 t_coordinates(1,1:3)=[0.0_dp,1.0_dp,1.0_dp]
2255 t_coordinates(2,1:3)=[1.0_dp,0.0_dp,1.0_dp]
2256 t_coordinates(3,1:3)=[1.0_dp,1.0_dp,0.0_dp]
2257 t_coordinates(4,1:3)=[1.0_dp,1.0_dp,1.0_dp]
2258 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==10.AND. &
2259 & number_of_dimensions==3)
THEN 2260 t_coordinates(1,1:3)=[0.0_dp,1.0_dp,1.0_dp]
2261 t_coordinates(2,1:3)=[1.0_dp,0.0_dp,1.0_dp]
2262 t_coordinates(3,1:3)=[1.0_dp,1.0_dp,0.0_dp]
2263 t_coordinates(4,1:3)=[1.0_dp,1.0_dp,1.0_dp]
2264 t_coordinates(5,1:3)=[0.5_dp,0.5_dp,1.0_dp]
2265 t_coordinates(6,1:3)=[0.5_dp,1.0_dp,0.5_dp]
2266 t_coordinates(7,1:3)=[0.5_dp,1.0_dp,1.0_dp]
2267 t_coordinates(8,1:3)=[1.0_dp,0.5_dp,0.5_dp]
2268 t_coordinates(9,1:3)=[1.0_dp,1.0_dp,0.5_dp]
2269 t_coordinates(10,1:3)=[1.0_dp,0.5_dp,1.0_dp]
2270 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==20)
THEN 2271 t_coordinates(1,1:3)=[0.0_dp,1.0_dp,1.0_dp]
2272 t_coordinates(2,1:3)=[1.0_dp,0.0_dp,1.0_dp]
2273 t_coordinates(3,1:3)=[1.0_dp,1.0_dp,0.0_dp]
2274 t_coordinates(4,1:3)=[1.0_dp,1.0_dp,1.0_dp]
2275 t_coordinates(5,1:3)=[1.0_dp/3.0_dp,2.0_dp/3.0_dp,1.0_dp]
2276 t_coordinates(6,1:3)=[2.0_dp/3.0_dp,1.0_dp/3.0_dp,1.0_dp]
2277 t_coordinates(7,1:3)=[1.0_dp/3.0_dp,1.0_dp,2.0_dp/3.0_dp]
2278 t_coordinates(8,1:3)=[2.0_dp/3.0_dp,1.0_dp,1.0_dp/3.0_dp]
2279 t_coordinates(9,1:3)=[1.0_dp/3.0_dp,1.0_dp,1.0_dp]
2280 t_coordinates(10,1:3)=[2.0_dp/3.0_dp,1.0_dp,1.0_dp]
2281 t_coordinates(11,1:3)=[1.0_dp,1.0_dp/3.0_dp,2.0_dp/3.0_dp]
2282 t_coordinates(12,1:3)=[1.0_dp,2.0_dp/3.0_dp,1.0_dp/3.0_dp]
2283 t_coordinates(13,1:3)=[1.0_dp,1.0_dp,1.0_dp/3.0_dp]
2284 t_coordinates(14,1:3)=[1.0_dp,1.0_dp,2.0_dp/3.0_dp]
2285 t_coordinates(15,1:3)=[1.0_dp,1.0_dp/3.0_dp,1.0_dp]
2286 t_coordinates(16,1:3)=[1.0_dp,2.0_dp/3.0_dp,1.0_dp]
2287 t_coordinates(17,1:3)=[2.0_dp/3.0_dp,2.0_dp/3.0_dp,2.0_dp/3.0_dp]
2288 t_coordinates(18,1:3)=[2.0_dp/3.0_dp,2.0_dp/3.0_dp,1.0_dp]
2289 t_coordinates(19,1:3)=[2.0_dp/3.0_dp,1.0_dp,2.0_dp/3.0_dp]
2290 t_coordinates(20,1:3)=[1.0_dp,2.0_dp/3.0_dp,2.0_dp/3.0_dp]
2292 DO k=1,domain%topology%elements%maximum_number_of_element_parameters
2293 IF(domain%topology%elements%elements(element_idx)%element_nodes(k)==node_idx)
EXIT 2295 IF(number_of_dimensions==2)
THEN 2296 CALL field_interpolate_xi(
no_part_deriv,t_coordinates(k,1:2), &
2297 & interpolated_point(field_u_variable_type)%PTR,err,error,*999)
2298 ELSE IF(number_of_dimensions==3)
THEN 2299 CALL field_interpolate_xi(
no_part_deriv,t_coordinates(k,1:3), &
2300 & interpolated_point(field_u_variable_type)%PTR,err,error,*999)
2304 DO dim_idx=1,number_of_dimensions
2305 x(dim_idx)=interpolated_point(field_u_variable_type)%PTR%VALUES(dim_idx,1)
2309 & dependent_field%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR, &
2310 & boundary_conditions_variable,err,error,*999)
2311 IF(
ASSOCIATED(boundary_conditions_variable))
THEN 2312 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
2313 analytic_function_type=equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE
2314 global_deriv_index=domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)% &
2315 & global_derivative_index
2316 materials_field=>equations_set%MATERIALS%MATERIALS_FIELD
2318 mu_param=materials_field%variables(1)%parameter_sets%parameter_sets(1)%ptr% &
2319 & parameters%cmiss%data_dp(1)
2325 rho_param=materials_field%variables(1)%parameter_sets%parameter_sets(1)%ptr% &
2326 & parameters%cmiss%data_dp(2)
2332 & global_deriv_index,analytic_function_type,number_of_dimensions, &
2333 & field_variable%NUMBER_OF_COMPONENTS,component_idx,err,error,*999)
2335 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
2336 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
2337 CALL field_parameter_set_update_local_dof(dependent_field,variable_type, &
2338 & field_analytic_values_set_type,local_ny,
VALUE,err,error,*999)
2339 boundary_condition_check_variable=boundary_conditions_variable% &
2340 & condition_types(local_ny)
2342 CALL field_parameter_set_update_local_dof(dependent_field, &
2343 & variable_type,field_values_set_type,local_ny, &
2344 &
VALUE,err,error,*999)
2348 CALL flagerror(
"Boundary conditions U variable is not associated",err,error,*999)
2352 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
2355 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
2358 CALL flagerror(
"Domain is not associated.",err,error,*999)
2361 CALL flagerror(
"Only node based interpolation is implemented.",err,error,*999)
2364 CALL field_parameter_set_update_start(dependent_field,variable_type, &
2365 & field_analytic_values_set_type,err,error,*999)
2366 CALL field_parameter_set_update_finish(dependent_field,variable_type, &
2367 & field_analytic_values_set_type,err,error,*999)
2368 CALL field_parameter_set_update_start(dependent_field,variable_type, &
2369 & field_values_set_type,err,error,*999)
2370 CALL field_parameter_set_update_finish(dependent_field,variable_type, &
2371 & field_values_set_type,err,error,*999)
2373 CALL flagerror(
"Field variable is not associated.",err,error,*999)
2376 CALL field_parameter_set_data_restore(geometric_field,field_u_variable_type,&
2377 & field_values_set_type,geometric_parameters,err,error,*999)
2379 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
2382 CALL flagerror(
"Equations set dependent field is not associated.",err,error,*999)
2385 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
2388 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2393 CALL flagerror(
"Equations are not associated.",err,error,*999)
2396 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
2398 CALL field_parameter_set_update_start(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2399 & field_values_set_type,err,error,*999)
2400 CALL field_parameter_set_update_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2401 & field_values_set_type,err,error,*999)
2406 solver_equations=>solver%SOLVER_EQUATIONS
2407 IF(
ASSOCIATED(solver_equations))
THEN 2408 solver_mapping=>solver_equations%SOLVER_MAPPING
2409 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
2410 IF(
ASSOCIATED(equations))
THEN 2411 equations_set=>equations%EQUATIONS_SET
2412 IF(
ASSOCIATED(equations_set))
THEN 2413 boundary_conditions=>solver_equations%BOUNDARY_CONDITIONS
2414 IF(
ASSOCIATED(boundary_conditions))
THEN 2416 & variable_type_map(field_u_variable_type)%PTR,boundary_conditions_variable,err,error,*999)
2417 IF(
ASSOCIATED(boundary_conditions_variable))
THEN 2418 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2419 & number_of_dimensions,err,error,*999)
2420 NULLIFY(mesh_velocity_values)
2421 CALL field_parameter_set_data_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
2422 & field_mesh_velocity_set_type,mesh_velocity_values,err,error,*999)
2423 NULLIFY(boundary_values)
2424 CALL field_parameter_set_data_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
2425 & field_boundary_set_type,boundary_values,err,error,*999)
2428 & control_loop%TIME_LOOP%ITERATION_NUMBER,current_time,1.0_dp)
2431 DO variable_idx=1,equations_set%DEPENDENT%DEPENDENT_FIELD%NUMBER_OF_VARIABLES
2432 variable_type=equations_set%DEPENDENT%DEPENDENT_FIELD%VARIABLES(variable_idx)%VARIABLE_TYPE
2433 field_variable=>equations_set%DEPENDENT%DEPENDENT_FIELD%VARIABLE_TYPE_MAP(variable_type)%PTR
2434 IF(
ASSOCIATED(field_variable))
THEN 2435 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
2436 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
2437 IF(
ASSOCIATED(domain))
THEN 2438 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 2439 domain_nodes=>domain%TOPOLOGY%NODES
2440 IF(
ASSOCIATED(domain_nodes))
THEN 2442 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
2443 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
2445 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
2446 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
2448 displacement_value=0.0_dp
2449 boundary_condition_check_variable=boundary_conditions_variable% &
2450 & condition_types(local_ny)
2452 CALL field_parameter_set_update_local_dof(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2453 & field_u_variable_type,field_values_set_type,local_ny, &
2454 & mesh_velocity_values(local_ny),err,error,*999)
2456 CALL field_parameter_set_update_local_dof(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2457 & field_u_variable_type,field_values_set_type,local_ny, &
2458 & boundary_values(local_ny),err,error,*999)
2469 CALL flagerror(
"Boundary condition variable is not associated.",err,error,*999)
2472 CALL flagerror(
"Boundary conditions are not associated.",err,error,*999)
2475 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2478 CALL flagerror(
"Equations are not associated.",err,error,*999)
2481 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
2483 CALL field_parameter_set_update_start(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2484 & field_values_set_type,err,error,*999)
2485 CALL field_parameter_set_update_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2486 & field_values_set_type,err,error,*999)
2492 solver_equations=>solver%SOLVER_EQUATIONS
2493 IF(
ASSOCIATED(solver_equations))
THEN 2494 solver_mapping=>solver_equations%SOLVER_MAPPING
2495 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
2496 IF(
ASSOCIATED(equations))
THEN 2497 equations_set=>equations%EQUATIONS_SET
2498 IF(
ASSOCIATED(equations_set))
THEN 2499 boundary_conditions=>solver_equations%BOUNDARY_CONDITIONS
2500 IF(
ASSOCIATED(boundary_conditions))
THEN 2502 & variable_type_map(field_u_variable_type)%PTR,boundary_conditions_variable,err,error,*999)
2503 IF(
ASSOCIATED(boundary_conditions_variable))
THEN 2504 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2505 & number_of_dimensions,err,error,*999)
2506 NULLIFY(boundary_values)
2507 CALL field_parameter_set_data_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
2508 & field_boundary_set_type,boundary_values,err,error,*999)
2511 & control_loop%TIME_LOOP%ITERATION_NUMBER,current_time,1.0_dp)
2512 DO variable_idx=1,equations_set%DEPENDENT%DEPENDENT_FIELD%NUMBER_OF_VARIABLES
2513 variable_type=equations_set%DEPENDENT%DEPENDENT_FIELD%VARIABLES(variable_idx)%VARIABLE_TYPE
2514 field_variable=>equations_set%DEPENDENT%DEPENDENT_FIELD%VARIABLE_TYPE_MAP(variable_type)%PTR
2515 IF(
ASSOCIATED(field_variable))
THEN 2516 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
2517 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
2518 IF(
ASSOCIATED(domain))
THEN 2519 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 2520 domain_nodes=>domain%TOPOLOGY%NODES
2521 IF(
ASSOCIATED(domain_nodes))
THEN 2523 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
2524 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
2526 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
2527 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
2528 boundary_condition_check_variable=boundary_conditions_variable% &
2529 & condition_types(local_ny)
2531 CALL field_parameter_set_update_local_dof(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2532 & field_u_variable_type,field_values_set_type,local_ny, &
2533 & boundary_values(local_ny),err,error,*999)
2543 CALL field_parameter_set_data_restore(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
2544 & field_u_variable_type,field_boundary_set_type,boundary_values,err,error,*999)
2547 CALL flagerror(
"Boundary condition variable is not associated.",err,error,*999)
2550 CALL flagerror(
"Boundary conditions are not associated.",err,error,*999)
2553 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2556 CALL flagerror(
"Equations are not associated.",err,error,*999)
2559 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
2561 CALL field_parameter_set_update_start(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2562 & field_values_set_type,err,error,*999)
2563 CALL field_parameter_set_update_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2564 & field_values_set_type,err,error,*999)
2568 solver_equations=>solver%SOLVER_EQUATIONS
2569 IF(
ASSOCIATED(solver_equations))
THEN 2570 solver_mapping=>solver_equations%SOLVER_MAPPING
2571 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
2572 IF(
ASSOCIATED(equations))
THEN 2573 equations_set=>equations%EQUATIONS_SET
2574 IF(
ASSOCIATED(equations_set))
THEN 2575 boundary_conditions=>solver_equations%BOUNDARY_CONDITIONS
2576 IF(
ASSOCIATED(boundary_conditions))
THEN 2578 & variable_type_map(field_u_variable_type)%PTR,boundary_conditions_variable,err,error,*999)
2579 IF(
ASSOCIATED(boundary_conditions_variable))
THEN 2580 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2581 & number_of_dimensions,err,error,*999)
2582 NULLIFY(mesh_velocity_values)
2583 CALL field_parameter_set_data_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
2584 & field_mesh_velocity_set_type,mesh_velocity_values,err,error,*999)
2585 NULLIFY(boundary_values)
2586 CALL field_parameter_set_data_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
2587 & field_boundary_set_type,boundary_values,err,error,*999)
2590 & control_loop%TIME_LOOP%ITERATION_NUMBER,current_time,1.0_dp)
2591 DO variable_idx=1,equations_set%DEPENDENT%DEPENDENT_FIELD%NUMBER_OF_VARIABLES
2592 variable_type=equations_set%DEPENDENT%DEPENDENT_FIELD%VARIABLES(variable_idx)%VARIABLE_TYPE
2593 field_variable=>equations_set%DEPENDENT%DEPENDENT_FIELD%VARIABLE_TYPE_MAP(variable_type)%PTR
2594 IF(
ASSOCIATED(field_variable))
THEN 2595 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
2596 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
2597 IF(
ASSOCIATED(domain))
THEN 2598 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 2599 domain_nodes=>domain%TOPOLOGY%NODES
2600 IF(
ASSOCIATED(domain_nodes))
THEN 2602 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
2603 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
2605 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
2606 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
2607 displacement_value=0.0_dp
2608 boundary_condition_check_variable=boundary_conditions_variable% &
2609 & condition_types(local_ny)
2611 CALL field_parameter_set_update_local_dof(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2612 & field_u_variable_type,field_values_set_type,local_ny, &
2613 & mesh_velocity_values(local_ny),err,error,*999)
2615 CALL field_parameter_set_update_local_dof(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2616 & field_u_variable_type,field_values_set_type,local_ny, &
2617 & boundary_values(local_ny),err,error,*999)
2627 CALL field_parameter_set_data_restore(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
2628 & field_u_variable_type,field_mesh_velocity_set_type,mesh_velocity_values,err,error,*999)
2629 CALL field_parameter_set_data_restore(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
2630 & field_u_variable_type,field_boundary_set_type,boundary_values,err,error,*999)
2632 CALL flagerror(
"Boundary condition variable is not associated.",err,error,*999)
2635 CALL flagerror(
"Boundary conditions are not associated.",err,error,*999)
2638 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2641 CALL flagerror(
"Equations are not associated.",err,error,*999)
2644 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
2646 CALL field_parameter_set_update_start(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2647 & field_values_set_type,err,error,*999)
2648 CALL field_parameter_set_update_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2649 & field_values_set_type,err,error,*999)
2653 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
2654 &
" is not valid for a Stokes equation fluid type of a fluid mechanics problem class." 2655 CALL flagerror(local_error,err,error,*999)
2658 CALL flagerror(
"Problem is not associated.",err,error,*999)
2661 CALL flagerror(
"Solver is not associated.",err,error,*999)
2664 CALL flagerror(
"Control loop is not associated.",err,error,*999)
2666 exits(
"STOKES_PRE_SOLVE_UPDATE_BOUNDARY_CONDITIONS")
2668 999 errorsexits(
"STOKES_PRE_SOLVE_UPDATE_BOUNDARY_CONDITIONS",err,error)
2681 INTEGER(INTG),
INTENT(OUT) :: ERR
2684 TYPE(
solver_type),
POINTER :: SOLVER_ALE_STOKES, SOLVER_LAPLACE
2685 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD_LAPLACE, INDEPENDENT_FIELD_ALE_STOKES
2696 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT,ALPHA
2697 REAL(DP),
POINTER :: MESH_DISPLACEMENT_VALUES(:)
2698 INTEGER(INTG) :: I,NUMBER_OF_DIMENSIONS_LAPLACE,NUMBER_OF_DIMENSIONS_ALE_STOKES,GEOMETRIC_MESH_COMPONENT
2699 INTEGER(INTG) :: INPUT_TYPE,INPUT_OPTION,component_idx,deriv_idx,local_ny,node_idx,variable_idx,variable_type
2701 enters(
"STOKES_PRE_SOLVE_ALE_UPDATE_MESH",err,error,*999)
2703 IF(
ASSOCIATED(control_loop))
THEN 2705 NULLIFY(solver_laplace)
2706 NULLIFY(solver_ale_stokes)
2707 IF(
ASSOCIATED(solver))
THEN 2708 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 2709 IF(.NOT.
ALLOCATED(control_loop%problem%specification))
THEN 2710 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
2711 ELSE IF(
SIZE(control_loop%problem%specification,1)<3)
THEN 2712 CALL flagerror(
"Problem specification must have three entries for a Stokes problem.",err,error,*999)
2714 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
2724 solver_equations_ale_stokes=>solver_ale_stokes%SOLVER_EQUATIONS
2725 IF(
ASSOCIATED(solver_equations_ale_stokes))
THEN 2726 solver_mapping_ale_stokes=>solver_equations_ale_stokes%SOLVER_MAPPING
2727 IF(
ASSOCIATED(solver_mapping_ale_stokes))
THEN 2728 equations_set_ale_stokes=>solver_mapping_ale_stokes%EQUATIONS_SETS(1)%PTR
2729 IF(
ASSOCIATED(equations_set_ale_stokes))
THEN 2730 independent_field_ale_stokes=>equations_set_ale_stokes%INDEPENDENT%INDEPENDENT_FIELD
2732 CALL flagerror(
"ALE Stokes equations set is not associated.",err,error,*999)
2735 CALL field_number_of_components_get(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD, &
2736 & field_u_variable_type,number_of_dimensions_ale_stokes,err,error,*999)
2741 NULLIFY(mesh_displacement_values)
2742 CALL field_parameter_set_data_get(equations_set_ale_stokes%INDEPENDENT%INDEPENDENT_FIELD, &
2743 & field_u_variable_type,field_mesh_displacement_set_type,mesh_displacement_values,err,error,*999)
2745 & number_of_dimensions_ale_stokes,input_type,input_option,control_loop%TIME_LOOP%ITERATION_NUMBER,1.0_dp)
2746 CALL field_parameter_set_update_start(equations_set_ale_stokes%INDEPENDENT%INDEPENDENT_FIELD, &
2747 & field_u_variable_type,field_mesh_displacement_set_type,err,error,*999)
2748 CALL field_parameter_set_update_finish(equations_set_ale_stokes%INDEPENDENT%INDEPENDENT_FIELD, &
2749 & field_u_variable_type,field_mesh_displacement_set_type,err,error,*999)
2751 CALL flagerror(
"ALE Stokes solver mapping is not associated.",err,error,*999)
2754 CALL flagerror(
"ALE Stokes solver equations are not associated.",err,error,*999)
2757 CALL field_component_mesh_component_get(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD, &
2758 & field_u_variable_type,1,geometric_mesh_component,err,error,*999)
2761 equations=>solver_mapping_ale_stokes%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
2762 IF(
ASSOCIATED(equations))
THEN 2763 equations_mapping=>equations%EQUATIONS_MAPPING
2764 IF(
ASSOCIATED(equations_mapping))
THEN 2765 DO variable_idx=1,equations_set_ale_stokes%DEPENDENT%DEPENDENT_FIELD%NUMBER_OF_VARIABLES
2766 variable_type=equations_set_ale_stokes%DEPENDENT%DEPENDENT_FIELD%VARIABLES(variable_idx)%VARIABLE_TYPE
2767 field_variable=>equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(variable_type)%PTR
2768 IF(
ASSOCIATED(field_variable))
THEN 2769 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
2770 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
2771 IF(
ASSOCIATED(domain))
THEN 2772 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 2773 domain_nodes=>domain%TOPOLOGY%NODES
2774 IF(
ASSOCIATED(domain_nodes))
THEN 2776 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
2777 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
2779 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
2780 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
2781 CALL field_parameter_set_add_local_dof(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD, &
2782 & field_u_variable_type,field_values_set_type,local_ny, &
2783 & mesh_displacement_values(local_ny),err,error,*999)
2793 CALL flagerror(
"Equations mapping is not associated.",err,error,*999)
2796 CALL flagerror(
"Equations are not associated.",err,error,*999)
2798 CALL field_parameter_set_update_start(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD, &
2799 & field_u_variable_type,field_values_set_type,err,error,*999)
2800 CALL field_parameter_set_update_finish(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD, &
2801 & field_u_variable_type,field_values_set_type,err,error,*999)
2803 time_increment=control_loop%TIME_LOOP%TIME_INCREMENT
2804 alpha=1.0_dp/time_increment
2805 CALL field_parameter_sets_copy(independent_field_ale_stokes,field_u_variable_type, &
2806 & field_mesh_displacement_set_type,field_mesh_velocity_set_type,alpha,err,error,*999)
2808 CALL flagerror(
"Mesh motion calculation not successful for ALE problem.",err,error,*999)
2813 IF(solver%DYNAMIC_SOLVER%ALE)
THEN 2816 solver_equations_laplace=>solver_laplace%SOLVER_EQUATIONS
2817 IF(
ASSOCIATED(solver_equations_laplace))
THEN 2818 solver_mapping_laplace=>solver_equations_laplace%SOLVER_MAPPING
2819 IF(
ASSOCIATED(solver_mapping_laplace))
THEN 2820 equations_set_laplace=>solver_mapping_laplace%EQUATIONS_SETS(1)%PTR
2821 IF(
ASSOCIATED(equations_set_laplace))
THEN 2822 dependent_field_laplace=>equations_set_laplace%DEPENDENT%DEPENDENT_FIELD
2824 CALL flagerror(
"Laplace equations set is not associated.",err,error,*999)
2826 CALL field_number_of_components_get(equations_set_laplace%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2827 & number_of_dimensions_laplace,err,error,*999)
2829 CALL flagerror(
"Laplace solver mapping is not associated.",err,error,*999)
2832 CALL flagerror(
"Laplace solver equations are not associated.",err,error,*999)
2836 solver_equations_ale_stokes=>solver_ale_stokes%SOLVER_EQUATIONS
2837 IF(
ASSOCIATED(solver_equations_ale_stokes))
THEN 2838 solver_mapping_ale_stokes=>solver_equations_ale_stokes%SOLVER_MAPPING
2839 IF(
ASSOCIATED(solver_mapping_ale_stokes))
THEN 2840 equations_set_ale_stokes=>solver_mapping_ale_stokes%EQUATIONS_SETS(1)%PTR
2841 IF(
ASSOCIATED(equations_set_ale_stokes))
THEN 2842 independent_field_ale_stokes=>equations_set_ale_stokes%INDEPENDENT%INDEPENDENT_FIELD
2844 CALL flagerror(
"ALE Stokes equations set is not associated.",err,error,*999)
2846 CALL field_number_of_components_get(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD, &
2847 & field_u_variable_type,number_of_dimensions_ale_stokes,err,error,*999)
2849 CALL flagerror(
"ALE Stokes solver mapping is not associated.",err,error,*999)
2852 CALL flagerror(
"ALE Stokes solver equations are not associated.",err,error,*999)
2855 IF(number_of_dimensions_ale_stokes==number_of_dimensions_laplace)
THEN 2856 DO i=1,number_of_dimensions_ale_stokes
2857 CALL field_parameterstofieldparameterscopy(dependent_field_laplace, &
2858 & field_u_variable_type,field_values_set_type,i,independent_field_ale_stokes, &
2859 & field_u_variable_type,field_mesh_displacement_set_type,i,err,error,*999)
2862 CALL flagerror(
"Dimension of Laplace and ALE Stokes equations set is not consistent.",err,error,*999)
2865 CALL field_component_mesh_component_get(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD, &
2866 & field_u_variable_type,1,geometric_mesh_component,err,error,*999)
2867 NULLIFY(mesh_displacement_values)
2868 CALL field_parameter_set_data_get(independent_field_ale_stokes,field_u_variable_type, &
2869 & field_mesh_displacement_set_type,mesh_displacement_values,err,error,*999)
2870 equations=>solver_mapping_laplace%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
2871 IF(
ASSOCIATED(equations))
THEN 2872 equations_mapping=>equations%EQUATIONS_MAPPING
2873 IF(
ASSOCIATED(equations_mapping))
THEN 2874 DO variable_idx=1,equations_set_ale_stokes%DEPENDENT%DEPENDENT_FIELD%NUMBER_OF_VARIABLES
2875 variable_type=equations_set_ale_stokes%DEPENDENT%DEPENDENT_FIELD%VARIABLES(variable_idx)%VARIABLE_TYPE
2876 field_variable=>equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(variable_type)%PTR
2877 IF(
ASSOCIATED(field_variable))
THEN 2878 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
2879 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
2880 IF(
ASSOCIATED(domain))
THEN 2881 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 2882 domain_nodes=>domain%TOPOLOGY%NODES
2883 IF(
ASSOCIATED(domain_nodes))
THEN 2885 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
2886 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
2888 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
2889 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
2890 CALL field_parameter_set_add_local_dof(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD, &
2891 & field_u_variable_type,field_values_set_type,local_ny, &
2892 & mesh_displacement_values(local_ny),err,error,*999)
2902 CALL flagerror(
"Equations mapping is not associated.",err,error,*999)
2904 CALL field_parameter_set_data_restore(independent_field_ale_stokes,field_u_variable_type, &
2905 & field_mesh_displacement_set_type,mesh_displacement_values,err,error,*999)
2907 CALL flagerror(
"Equations are not associated.",err,error,*999)
2909 CALL field_parameter_set_update_start(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2910 & field_values_set_type,err,error,*999)
2911 CALL field_parameter_set_update_finish(equations_set_ale_stokes%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2912 & field_values_set_type,err,error,*999)
2914 time_increment=control_loop%TIME_LOOP%TIME_INCREMENT
2915 alpha=1.0_dp/time_increment
2916 CALL field_parameter_sets_copy(independent_field_ale_stokes,field_u_variable_type, &
2917 & field_mesh_displacement_set_type,field_mesh_velocity_set_type,alpha,err,error,*999)
2919 CALL flagerror(
"Mesh motion calculation not successful for ALE problem.",err,error,*999)
2922 CALL flagerror(
"Mesh update is not defined for non-dynamic problems.",err,error,*999)
2925 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
2926 &
" is not valid for a Stokes equation fluid type of a fluid mechanics problem class." 2927 CALL flagerror(local_error,err,error,*999)
2930 CALL flagerror(
"Problem is not associated.",err,error,*999)
2933 CALL flagerror(
"Solver is not associated.",err,error,*999)
2936 CALL flagerror(
"Control loop is not associated.",err,error,*999)
2938 exits(
"STOKES_PRE_SOLVE_ALE_UPDATE_MESH")
2940 999 errorsexits(
"STOKES_PRE_SOLVE_ALE_UPDATE_MESH",err,error)
2953 INTEGER(INTG),
INTENT(OUT) :: ERR
2956 TYPE(
field_type),
POINTER :: INDEPENDENT_FIELD
2966 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
2967 INTEGER(INTG) :: component_idx,node_idx,deriv_idx,local_ny,variable_idx,variable_type
2968 REAL(DP),
POINTER :: MESH_STIFF_VALUES(:)
2971 enters(
"STOKES_PRE_SOLVE_ALE_UPDATE_PARAMETERS",err,error,*999)
2973 IF(
ASSOCIATED(control_loop))
THEN 2975 IF(
ASSOCIATED(solver))
THEN 2976 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 2977 IF(.NOT.
ALLOCATED(control_loop%problem%specification))
THEN 2978 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
2979 ELSE IF(
SIZE(control_loop%problem%specification,1)<3)
THEN 2980 CALL flagerror(
"Problem specification must have three entries for a Stokes problem.",err,error,*999)
2982 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
2990 solver_equations=>solver%SOLVER_EQUATIONS
2991 IF(
ASSOCIATED(solver_equations))
THEN 2992 solver_mapping=>solver_equations%SOLVER_MAPPING
2993 IF(
ASSOCIATED(solver_mapping))
THEN 2994 equations_set=>solver_mapping%EQUATIONS_SETS(1)%PTR
2995 NULLIFY(mesh_stiff_values)
2996 CALL field_parameter_set_data_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
2997 & field_values_set_type,mesh_stiff_values,err,error,*999)
2998 IF(
ASSOCIATED(equations_set))
THEN 2999 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
3000 IF(
ASSOCIATED(equations))
THEN 3001 independent_field=>equations_set%INDEPENDENT%INDEPENDENT_FIELD
3002 IF(
ASSOCIATED(independent_field))
THEN 3003 DO variable_idx=1,equations_set%DEPENDENT%DEPENDENT_FIELD%NUMBER_OF_VARIABLES
3004 variable_type=equations_set%DEPENDENT%DEPENDENT_FIELD%VARIABLES(variable_idx)%VARIABLE_TYPE
3005 field_variable=>equations_set%DEPENDENT%DEPENDENT_FIELD%VARIABLE_TYPE_MAP(variable_type)%PTR
3006 IF(
ASSOCIATED(field_variable))
THEN 3007 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
3008 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
3009 IF(
ASSOCIATED(domain))
THEN 3010 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 3011 domain_nodes=>domain%TOPOLOGY%NODES
3012 IF(
ASSOCIATED(domain_nodes))
THEN 3014 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
3015 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
3017 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
3018 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
3020 mesh_stiff_values(local_ny)=1.0_dp
3021 CALL field_parameter_set_update_local_dof(equations_set%INDEPENDENT% &
3022 & independent_field,field_u_variable_type,field_values_set_type,local_ny, &
3023 & mesh_stiff_values(local_ny),err,error,*999)
3033 CALL flagerror(
"Independent field is not associated.",err,error,*999)
3036 CALL flagerror(
"Equations are not associated.",err,error,*999)
3039 CALL flagerror(
"Equations set is not associated.",err,error,*999)
3041 CALL field_parameter_set_data_restore(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
3042 & field_values_set_type,mesh_stiff_values,err,error,*999)
3044 CALL flagerror(
"Solver mapping is not associated.",err,error,*999)
3047 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
3050 CALL flagerror(
"Mesh motion calculation not successful for ALE problem.",err,error,*999)
3053 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
3054 &
" is not valid for a Stokes equation fluid type of a fluid mechanics problem class." 3055 CALL flagerror(local_error,err,error,*999)
3058 CALL flagerror(
"Problem is not associated.",err,error,*999)
3061 CALL flagerror(
"Solver is not associated.",err,error,*999)
3064 CALL flagerror(
"Control loop is not associated.",err,error,*999)
3066 exits(
"STOKES_PRE_SOLVE_ALE_UPDATE_PARAMETERS")
3068 999 errorsexits(
"STOKES_PRE_SOLVE_ALE_UPDATE_PARAMETERS",err,error)
3082 INTEGER(INTG),
INTENT(OUT) :: ERR
3091 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
3092 INTEGER(INTG) :: EQUATIONS_SET_IDX,CURRENT_LOOP_ITERATION,OUTPUT_ITERATION_NUMBER,NUMBER_OF_DIMENSIONS
3093 LOGICAL :: EXPORT_FIELD
3094 CHARACTER(14) :: OUTPUT_FILE
3096 enters(
"STOKES_POST_SOLVE_OUTPUT_DATA",err,error,*999)
3098 NULLIFY(solver_equations)
3099 NULLIFY(solver_mapping)
3100 NULLIFY(equations_set)
3102 IF(
ASSOCIATED(control_loop))
THEN 3103 IF(
ASSOCIATED(solver))
THEN 3104 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 3105 IF(.NOT.
ALLOCATED(control_loop%problem%specification))
THEN 3106 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3107 ELSE IF(
SIZE(control_loop%problem%specification,1)<3)
THEN 3108 CALL flagerror(
"Problem specification must have three entries for a Stokes problem.",err,error,*999)
3110 CALL system(
'mkdir -p ./output')
3111 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
3113 solver_equations=>solver%SOLVER_EQUATIONS
3114 IF(
ASSOCIATED(solver_equations))
THEN 3115 solver_mapping=>solver_equations%SOLVER_MAPPING
3116 IF(
ASSOCIATED(solver_mapping))
THEN 3118 DO equations_set_idx=1,solver_mapping%NUMBER_OF_EQUATIONS_SETS
3119 equations_set=>solver_mapping%EQUATIONS_SETS(equations_set_idx)%ptr
3120 filename=
"./output/"//
"STATIC_SOLUTION" 3126 fields=>equations_set%REGION%FIELDS
3135 solver_equations=>solver%SOLVER_EQUATIONS
3136 IF(
ASSOCIATED(solver_equations))
THEN 3137 solver_mapping=>solver_equations%SOLVER_MAPPING
3138 IF(
ASSOCIATED(solver_mapping))
THEN 3140 DO equations_set_idx=1,solver_mapping%NUMBER_OF_EQUATIONS_SETS
3141 equations_set=>solver_mapping%EQUATIONS_SETS(equations_set_idx)%ptr
3142 current_loop_iteration=control_loop%TIME_LOOP%ITERATION_NUMBER
3143 output_iteration_number=control_loop%TIME_LOOP%OUTPUT_NUMBER
3144 IF(output_iteration_number/=0)
THEN 3145 IF(control_loop%TIME_LOOP%CURRENT_TIME<=control_loop%TIME_LOOP%STOP_TIME)
THEN 3146 IF(current_loop_iteration<10)
THEN 3147 WRITE(output_file,
'("TIME_STEP_000",I0)') current_loop_iteration
3148 ELSE IF(current_loop_iteration<100)
THEN 3149 WRITE(output_file,
'("TIME_STEP_00",I0)') current_loop_iteration
3150 ELSE IF(current_loop_iteration<1000)
THEN 3151 WRITE(output_file,
'("TIME_STEP_0",I0)') current_loop_iteration
3152 ELSE IF(current_loop_iteration<10000)
THEN 3153 WRITE(output_file,
'("TIME_STEP_",I0)') current_loop_iteration
3155 filename=
"./output/"//
"MainTime_"//
trim(
numbertovstring(current_loop_iteration,
"*",err,error))
3157 IF(mod(current_loop_iteration,output_iteration_number)==0)
THEN 3162 fields=>equations_set%REGION%FIELDS
3171 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 3186 localerror=
"Problem subtype "//
trim(
numbertovstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
3187 &
" is not valid for a Stokes equation fluid type of a fluid mechanics problem class." 3188 CALL flagerror(localerror,err,error,*999)
3191 CALL flagerror(
"Problem is not associated.",err,error,*999)
3194 CALL flagerror(
"Solver is not associated.",err,error,*999)
3197 CALL flagerror(
"Control loop is not associated.",err,error,*999)
3199 exits(
"STOKES_POST_SOLVE_OUTPUT_DATA")
3201 999 errorsexits(
"STOKES_POST_SOLVE_OUTPUT_DATA",err,error)
3215 INTEGER(INTG),
INTENT(OUT) :: ERR
3219 INTEGER(INTG) :: component_idx,deriv_idx,dim_idx,local_ny,node_idx,NUMBER_OF_DIMENSIONS,variable_idx,variable_type,I,J,K
3220 INTEGER(INTG) :: number_of_nodes_xic(3),element_idx,en_idx,BOUND_COUNT,ANALYTIC_FUNCTION_TYPE,GLOBAL_DERIV_INDEX
3221 REAL(DP) ::
VALUE,X(3),XI_COORDINATES(3)
3223 REAL(DP) :: T_COORDINATES(20,3),CURRENT_TIME,MU_PARAM,RHO_PARAM
3224 REAL(DP),
POINTER :: GEOMETRIC_PARAMETERS(:)
3227 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,MATERIALS_FIELD
3236 enters(
"Stokes_BoundaryConditionsAnalyticCalculate",err,error,*999)
3240 xi_coordinates(3)=0.0_dp
3249 IF(
ASSOCIATED(equations_set))
THEN 3250 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 3251 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
3252 IF(
ASSOCIATED(dependent_field))
THEN 3253 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
3254 IF(
ASSOCIATED(geometric_field))
THEN 3255 NULLIFY(interpolation_parameters)
3256 NULLIFY(interpolated_point)
3257 CALL field_interpolation_parameters_initialise(geometric_field,interpolation_parameters,err,error,*999)
3258 CALL field_interpolated_points_initialise(interpolation_parameters,interpolated_point,err,error,*999)
3259 CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
3274 NULLIFY(geometric_variable)
3275 CALL field_variable_get(geometric_field,field_u_variable_type,geometric_variable,err,error,*999)
3276 NULLIFY(geometric_parameters)
3277 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type,field_values_set_type,geometric_parameters, &
3279 IF(
ASSOCIATED(boundary_conditions))
THEN 3280 DO variable_idx=1,dependent_field%NUMBER_OF_VARIABLES
3281 variable_type=dependent_field%VARIABLES(variable_idx)%VARIABLE_TYPE
3282 field_variable=>dependent_field%VARIABLE_TYPE_MAP(variable_type)%PTR
3283 IF(
ASSOCIATED(field_variable))
THEN 3284 CALL field_parameter_set_create(dependent_field,variable_type,field_analytic_values_set_type,err,error,*999)
3285 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
3287 IF(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 3288 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
3289 IF(
ASSOCIATED(domain))
THEN 3290 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 3291 domain_nodes=>domain%TOPOLOGY%NODES
3292 IF(
ASSOCIATED(domain_nodes))
THEN 3294 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
3295 element_idx=domain%topology%nodes%nodes(node_idx)%surrounding_elements(1)
3296 CALL field_interpolation_parameters_element_get(field_values_set_type,element_idx, &
3297 & interpolation_parameters(field_u_variable_type)%PTR,err,error,*999)
3299 xi_coordinates=0.0_dp
3300 number_of_nodes_xic(1)=domain%topology%elements%elements(element_idx)%basis%number_of_nodes_xic(1)
3301 number_of_nodes_xic(2)=domain%topology%elements%elements(element_idx)%basis%number_of_nodes_xic(2)
3302 IF(number_of_dimensions==3)
THEN 3303 number_of_nodes_xic(3)=domain%topology%elements%elements(element_idx)%basis%number_of_nodes_xic(3)
3305 number_of_nodes_xic(3)=1
3308 IF(domain%topology%elements%maximum_number_of_element_parameters==4.AND.number_of_dimensions==2 .OR. &
3309 & domain%topology%elements%maximum_number_of_element_parameters==9.OR. &
3310 & domain%topology%elements%maximum_number_of_element_parameters==16.OR. &
3311 & domain%topology%elements%maximum_number_of_element_parameters==8.OR. &
3312 & domain%topology%elements%maximum_number_of_element_parameters==27.OR. &
3313 & domain%topology%elements%maximum_number_of_element_parameters==64)
THEN 3314 DO k=1,number_of_nodes_xic(3)
3315 DO j=1,number_of_nodes_xic(2)
3316 DO i=1,number_of_nodes_xic(1)
3318 IF(domain%topology%elements%elements(element_idx)%element_nodes(en_idx)==node_idx)
EXIT 3319 xi_coordinates(1)=xi_coordinates(1)+(1.0_dp/(number_of_nodes_xic(1)-1))
3321 IF(domain%topology%elements%elements(element_idx)%element_nodes(en_idx)==node_idx)
EXIT 3322 xi_coordinates(1)=0.0_dp
3323 xi_coordinates(2)=xi_coordinates(2)+(1.0_dp/(number_of_nodes_xic(2)-1))
3325 IF(domain%topology%elements%elements(element_idx)%element_nodes(en_idx)==node_idx)
EXIT 3326 xi_coordinates(1)=0.0_dp
3327 xi_coordinates(2)=0.0_dp
3328 IF(number_of_nodes_xic(3)/=1)
THEN 3329 xi_coordinates(3)=xi_coordinates(3)+(1.0_dp/(number_of_nodes_xic(3)-1))
3333 & interpolated_point(field_u_variable_type)%PTR,err,error,*999)
3336 IF(domain%topology%elements%maximum_number_of_element_parameters==3)
THEN 3337 t_coordinates(1,1:2)=[0.0_dp,1.0_dp]
3338 t_coordinates(2,1:2)=[1.0_dp,0.0_dp]
3339 t_coordinates(3,1:2)=[1.0_dp,1.0_dp]
3340 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==6)
THEN 3341 t_coordinates(1,1:2)=[0.0_dp,1.0_dp]
3342 t_coordinates(2,1:2)=[1.0_dp,0.0_dp]
3343 t_coordinates(3,1:2)=[1.0_dp,1.0_dp]
3344 t_coordinates(4,1:2)=[0.5_dp,0.5_dp]
3345 t_coordinates(5,1:2)=[1.0_dp,0.5_dp]
3346 t_coordinates(6,1:2)=[0.5_dp,1.0_dp]
3347 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==10.AND. &
3348 & number_of_dimensions==2)
THEN 3349 t_coordinates(1,1:2)=[0.0_dp,1.0_dp]
3350 t_coordinates(2,1:2)=[1.0_dp,0.0_dp]
3351 t_coordinates(3,1:2)=[1.0_dp,1.0_dp]
3352 t_coordinates(4,1:2)=[1.0_dp/3.0_dp,2.0_dp/3.0_dp]
3353 t_coordinates(5,1:2)=[2.0_dp/3.0_dp,1.0_dp/3.0_dp]
3354 t_coordinates(6,1:2)=[1.0_dp,1.0_dp/3.0_dp]
3355 t_coordinates(7,1:2)=[1.0_dp,2.0_dp/3.0_dp]
3356 t_coordinates(8,1:2)=[2.0_dp/3.0_dp,1.0_dp]
3357 t_coordinates(9,1:2)=[1.0_dp/3.0_dp,1.0_dp]
3358 t_coordinates(10,1:2)=[2.0_dp/3.0_dp,2.0_dp/3.0_dp]
3359 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==4)
THEN 3360 t_coordinates(1,1:3)=[0.0_dp,1.0_dp,1.0_dp]
3361 t_coordinates(2,1:3)=[1.0_dp,0.0_dp,1.0_dp]
3362 t_coordinates(3,1:3)=[1.0_dp,1.0_dp,0.0_dp]
3363 t_coordinates(4,1:3)=[1.0_dp,1.0_dp,1.0_dp]
3364 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==10.AND. &
3365 & number_of_dimensions==3)
THEN 3366 t_coordinates(1,1:3)=[0.0_dp,1.0_dp,1.0_dp]
3367 t_coordinates(2,1:3)=[1.0_dp,0.0_dp,1.0_dp]
3368 t_coordinates(3,1:3)=[1.0_dp,1.0_dp,0.0_dp]
3369 t_coordinates(4,1:3)=[1.0_dp,1.0_dp,1.0_dp]
3370 t_coordinates(5,1:3)=[0.5_dp,0.5_dp,1.0_dp]
3371 t_coordinates(6,1:3)=[0.5_dp,1.0_dp,0.5_dp]
3372 t_coordinates(7,1:3)=[0.5_dp,1.0_dp,1.0_dp]
3373 t_coordinates(8,1:3)=[1.0_dp,0.5_dp,0.5_dp]
3374 t_coordinates(9,1:3)=[1.0_dp,1.0_dp,0.5_dp]
3375 t_coordinates(10,1:3)=[1.0_dp,0.5_dp,1.0_dp]
3376 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==20)
THEN 3377 t_coordinates(1,1:3)=[0.0_dp,1.0_dp,1.0_dp]
3378 t_coordinates(2,1:3)=[1.0_dp,0.0_dp,1.0_dp]
3379 t_coordinates(3,1:3)=[1.0_dp,1.0_dp,0.0_dp]
3380 t_coordinates(4,1:3)=[1.0_dp,1.0_dp,1.0_dp]
3381 t_coordinates(5,1:3)=[1.0_dp/3.0_dp,2.0_dp/3.0_dp,1.0_dp]
3382 t_coordinates(6,1:3)=[2.0_dp/3.0_dp,1.0_dp/3.0_dp,1.0_dp]
3383 t_coordinates(7,1:3)=[1.0_dp/3.0_dp,1.0_dp,2.0_dp/3.0_dp]
3384 t_coordinates(8,1:3)=[2.0_dp/3.0_dp,1.0_dp,1.0_dp/3.0_dp]
3385 t_coordinates(9,1:3)=[1.0_dp/3.0_dp,1.0_dp,1.0_dp]
3386 t_coordinates(10,1:3)=[2.0_dp/3.0_dp,1.0_dp,1.0_dp]
3387 t_coordinates(11,1:3)=[1.0_dp,1.0_dp/3.0_dp,2.0_dp/3.0_dp]
3388 t_coordinates(12,1:3)=[1.0_dp,2.0_dp/3.0_dp,1.0_dp/3.0_dp]
3389 t_coordinates(13,1:3)=[1.0_dp,1.0_dp,1.0_dp/3.0_dp]
3390 t_coordinates(14,1:3)=[1.0_dp,1.0_dp,2.0_dp/3.0_dp]
3391 t_coordinates(15,1:3)=[1.0_dp,1.0_dp/3.0_dp,1.0_dp]
3392 t_coordinates(16,1:3)=[1.0_dp,2.0_dp/3.0_dp,1.0_dp]
3393 t_coordinates(17,1:3)=[2.0_dp/3.0_dp,2.0_dp/3.0_dp,2.0_dp/3.0_dp]
3394 t_coordinates(18,1:3)=[2.0_dp/3.0_dp,2.0_dp/3.0_dp,1.0_dp]
3395 t_coordinates(19,1:3)=[2.0_dp/3.0_dp,1.0_dp,2.0_dp/3.0_dp]
3396 t_coordinates(20,1:3)=[1.0_dp,2.0_dp/3.0_dp,2.0_dp/3.0_dp]
3398 DO k=1,domain%topology%elements%maximum_number_of_element_parameters
3399 IF(domain%topology%elements%elements(element_idx)%element_nodes(k)==node_idx)
EXIT 3401 IF(number_of_dimensions==2)
THEN 3402 CALL field_interpolate_xi(
no_part_deriv,t_coordinates(k,1:2), &
3403 & interpolated_point(field_u_variable_type)%PTR,err,error,*999)
3404 ELSE IF(number_of_dimensions==3)
THEN 3405 CALL field_interpolate_xi(
no_part_deriv,t_coordinates(k,1:3), &
3406 & interpolated_point(field_u_variable_type)%PTR,err,error,*999)
3410 DO dim_idx=1,number_of_dimensions
3411 x(dim_idx)=interpolated_point(field_u_variable_type)%PTR%VALUES(dim_idx,1)
3415 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
3416 analytic_function_type=equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE
3417 global_deriv_index=domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX
3419 materials_field=>equations_set%MATERIALS%MATERIALS_FIELD
3421 mu_param=materials_field%variables(1)%parameter_sets%parameter_sets(1)%ptr% &
3422 & parameters%cmiss%data_dp(1)
3428 rho_param=materials_field%variables(1)%parameter_sets%parameter_sets(1)%ptr% &
3429 & parameters%cmiss%data_dp(2)
3434 & global_deriv_index,analytic_function_type,number_of_dimensions, &
3435 & field_variable%NUMBER_OF_COMPONENTS,component_idx,err,error,*999)
3437 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
3438 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
3439 CALL field_parameter_set_update_local_dof(dependent_field,variable_type, &
3440 & field_analytic_values_set_type,local_ny,
VALUE,err,error,*999)
3441 IF(variable_type==field_u_variable_type)
THEN 3443 IF(domain_nodes%NODES(node_idx)%BOUNDARY_NODE)
THEN 3445 IF(component_idx<=number_of_dimensions)
THEN 3448 bound_count=bound_count+1
3451 IF(domain%topology%elements%maximum_number_of_element_parameters==3)
THEN 3457 IF(-0.001_dp<x(1).AND.x(1)<0.001_dp.AND.-0.001_dp<x(2).AND.x(2)<0.001_dp.OR. &
3458 & 10.0_dp-0.001_dp<x(1).AND.x(1)<10.0_dp+0.001_dp.AND.-0.001_dp<x(2).AND. &
3459 & x(2)<0.001_dp.OR. &
3460 & 10.0_dp-0.001_dp<x(1).AND.x(1)<10.0_dp+0.001_dp.AND.10.0_dp-0.001_dp<x(2).AND. &
3461 & x(2)<10.0_dp+0.001_dp.OR. &
3462 & -0.001_dp<x(1).AND.x(1)<0.001_dp.AND.10.0_dp-0.001_dp<x(2).AND. &
3463 & x(2)<10.0_dp+0.001_dp)
THEN 3466 bound_count=bound_count+1
3469 ELSE IF(domain%topology%elements%maximum_number_of_element_parameters==4.AND. &
3470 & number_of_dimensions==3)
THEN 3476 IF(-5.0_dp-0.001_dp<x(1).AND.x(1)<-5.0_dp+0.001_dp.AND.-5.0_dp-0.001_dp<x(2).AND. &
3477 & x(2)<-5.0_dp+0.001_dp.AND.-5.0_dp-0.001_dp<x(3).AND.x(3)<-5.0_dp+0.001_dp.OR. &
3478 & -5.0_dp-0.001_dp<x(1).AND.x(1)<-5.0_dp+0.001_dp.AND.5.0_dp-0.001_dp<x(2).AND. &
3479 & x(2)<5.0_dp+0.001_dp.AND.-5.0_dp-0.001_dp<x(3).AND.x(3)<-5.0_dp+0.001_dp.OR. &
3480 & 5.0_dp-0.001_dp<x(1).AND.x(1)<5.0_dp+0.001_dp.AND.5.0_dp-0.001_dp<x(2).AND. &
3481 & x(2)<5.0_dp+0.001_dp.AND.-5.0_dp-0.001_dp<x(3).AND.x(3)<-5.0_dp+0.001_dp.OR. &
3482 & 5.0_dp-0.001_dp<x(1).AND.x(1)<5.0_dp+0.001_dp.AND.-5.0_dp-0.001_dp<x(2).AND. &
3483 & x(2)<-5.0_dp+0.001_dp.AND.-5.0_dp-0.001_dp<x(3).AND.x(3)<-5.0_dp+0.001_dp.OR. &
3484 & -5.0_dp-0.001_dp<x(1).AND.x(1)<-5.0_dp+0.001_dp.AND.-5.0_dp-0.001_dp<x(2).AND. &
3485 & x(2)<-5.0_dp+0.001_dp.AND.5.0_dp-0.001_dp<x(3).AND.x(3)<5.0_dp+0.001_dp.OR. &
3486 & -5.0_dp-0.001_dp<x(1).AND.x(1)<-5.0_dp+0.001_dp.AND.5.0_dp-0.001_dp<x(2).AND. &
3487 & x(2)<5.0_dp+0.001_dp.AND.5.0_dp-0.001_dp<x(3).AND.x(3)<5.0_dp+0.001_dp.OR. &
3488 & 5.0_dp-0.001_dp<x(1).AND.x(1)<5.0_dp+0.001_dp.AND.5.0_dp-0.001_dp<x(2).AND. &
3489 & x(2)<5.0_dp+0.001_dp.AND.5.0_dp-0.001_dp<x(3).AND.x(3)<5.0_dp+0.001_dp.OR. &
3490 & 5.0_dp-0.001_dp<x(1).AND.x(1)<5.0_dp+0.001_dp.AND.-5.0_dp-0.001_dp<x(2).AND. &
3491 & x(2)<-5.0_dp+ 0.001_dp.AND.5.0_dp-0.001_dp<x(3).AND.x(3)<5.0_dp+0.001_dp)
THEN 3494 bound_count=bound_count+1
3498 ELSE IF(bound_count==0)
THEN 3501 bound_count=bound_count+1
3507 IF(component_idx<=number_of_dimensions)
THEN 3508 CALL field_parameter_set_update_local_dof(dependent_field,variable_type, &
3509 & field_values_set_type,local_ny,
VALUE,err,error,*999)
3616 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
3619 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
3622 CALL flagerror(
"Domain is not associated.",err,error,*999)
3625 CALL flagerror(
"Only node based interpolation is implemented.",err,error,*999)
3627 WRITE(*,*)
'NUMBER OF BOUNDARIES SET ',bound_count
3629 CALL field_parameter_set_update_start(dependent_field,variable_type,field_analytic_values_set_type, &
3631 CALL field_parameter_set_update_finish(dependent_field,variable_type,field_analytic_values_set_type, &
3633 CALL field_parameter_set_update_start(dependent_field,variable_type,field_values_set_type, &
3635 CALL field_parameter_set_update_finish(dependent_field,variable_type,field_values_set_type, &
3638 CALL flagerror(
"Field variable is not associated.",err,error,*999)
3641 CALL field_parameter_set_data_restore(geometric_field,field_u_variable_type,field_values_set_type, &
3642 & geometric_parameters,err,error,*999)
3643 CALL field_interpolated_points_finalise(interpolated_point,err,error,*999)
3644 CALL field_interpolation_parameters_finalise(interpolation_parameters,err,error,*999)
3646 CALL flagerror(
"Boundary conditions is not associated.",err,error,*999)
3649 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
3652 CALL flagerror(
"Equations set dependent field is not associated.",err,error,*999)
3655 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
3658 CALL flagerror(
"Equations set is not associated.",err,error,*999)
3661 exits(
"Stokes_BoundaryConditionsAnalyticCalculate")
3663 999 errorsexits(
"Stokes_BoundaryConditionsAnalyticCalculate",err,error)
3672 & global_deriv_index,analytic_function_type,number_of_dimensions,number_of_components,component_idx,err,error,*)
3675 INTEGER(INTG),
INTENT(OUT) :: ERR
3677 REAL(DP),
INTENT(OUT) :: VALUE
3678 REAL(DP) :: MU_PARAM,RHO_PARAM
3679 REAL(DP),
INTENT(IN) :: CURRENT_TIME
3680 REAL(DP),
INTENT(IN),
DIMENSION(3) :: X
3681 INTEGER(INTG),
INTENT(IN) :: NUMBER_OF_DIMENSIONS,NUMBER_OF_COMPONENTS,COMPONENT_IDX
3684 INTEGER(INTG) :: variable_type,GLOBAL_DERIV_INDEX,ANALYTIC_FUNCTION_TYPE
3687 REAL(DP) :: INTERNAL_TIME
3689 enters(
"STOKES_EQUATION_ANALYTIC_FUNCTIONS",err,error,*999)
3692 internal_time=current_time
3693 SELECT CASE(analytic_function_type)
3695 IF(number_of_dimensions==2.AND.number_of_components==3)
THEN 3697 SELECT CASE(variable_type)
3698 CASE(field_u_variable_type)
3699 SELECT CASE(global_deriv_index)
3701 IF(component_idx==1)
THEN 3703 VALUE=x(2)**2/10.0_dp**2
3704 ELSE IF(component_idx==2)
THEN 3706 VALUE=x(1)**2/10.0_dp**2
3707 ELSE IF(component_idx==3)
THEN 3709 VALUE=2.0_dp*mu_param/10.0_dp**2*x(1)
3711 CALL flagerror(
"Not implemented.",err,error,*999)
3714 CALL flagerror(
"Not implemented.",err,error,*999)
3716 CALL flagerror(
"Not implemented.",err,error,*999)
3718 CALL flagerror(
"Not implemented.",err,error,*999)
3721 & global_deriv_index,
"*",err,error))// &
3723 CALL flagerror(local_error,err,error,*999)
3725 CASE(field_deludeln_variable_type)
3726 SELECT CASE(global_deriv_index)
3730 CALL flagerror(
"Not implemented.",err,error,*999)
3732 CALL flagerror(
"Not implemented.",err,error,*999)
3734 CALL flagerror(
"Not implemented.",err,error,*999)
3737 & global_deriv_index,
"*",err,error))// &
3739 CALL flagerror(local_error,err,error,*999)
3744 CALL flagerror(local_error,err,error,*999)
3747 local_error=
"The number of components does not correspond to the number of dimensions." 3748 CALL flagerror(local_error,err,error,*999)
3751 IF(number_of_dimensions==2.AND.number_of_components==3)
THEN 3753 SELECT CASE(variable_type)
3754 CASE(field_u_variable_type)
3755 SELECT CASE(global_deriv_index)
3757 IF(component_idx==1)
THEN 3759 VALUE= exp((x(1)-x(2))/10.0_dp)
3760 ELSE IF(component_idx==2)
THEN 3762 VALUE= exp((x(1)-x(2))/10.0_dp)
3763 ELSE IF(component_idx==3)
THEN 3765 VALUE= 2.0_dp*mu_param/10.0_dp*exp((x(1)-x(2))/10.0_dp)
3767 CALL flagerror(
"Not implemented.",err,error,*999)
3770 CALL flagerror(
"Not implemented.",err,error,*999)
3772 CALL flagerror(
"Not implemented.",err,error,*999)
3774 CALL flagerror(
"Not implemented.",err,error,*999)
3777 & global_deriv_index,
"*",err,error))// &
3779 CALL flagerror(local_error,err,error,*999)
3781 CASE(field_deludeln_variable_type)
3782 SELECT CASE(global_deriv_index)
3784 IF(component_idx==1)
THEN 3787 ELSE IF(component_idx==2)
THEN 3790 ELSE IF(component_idx==3)
THEN 3794 CALL flagerror(
"Not implemented.",err,error,*999)
3797 CALL flagerror(
"Not implemented.",err,error,*999)
3799 CALL flagerror(
"Not implemented.",err,error,*999)
3801 CALL flagerror(
"Not implemented.",err,error,*999)
3804 & global_deriv_index,
"*",err,error))// &
3806 CALL flagerror(local_error,err,error,*999)
3811 CALL flagerror(local_error,err,error,*999)
3814 local_error=
"The number of components does not correspond to the number of dimensions." 3815 CALL flagerror(local_error,err,error,*999)
3818 IF(number_of_dimensions==2.AND.number_of_components==3)
THEN 3820 SELECT CASE(variable_type)
3821 CASE(field_u_variable_type)
3822 SELECT CASE(global_deriv_index)
3824 IF(component_idx==1)
THEN 3826 VALUE=sin(2.0_dp*
pi*x(1)/10.0_dp)*sin(2.0_dp*
pi*x(2)/10.0_dp)
3827 ELSE IF(component_idx==2)
THEN 3829 VALUE=cos(2.0_dp*
pi*x(1)/10.0_dp)*cos(2.0_dp*
pi*x(2)/10.0_dp)
3830 ELSE IF(component_idx==3)
THEN 3832 VALUE=4.0_dp*mu_param*
pi/10.0_dp*sin(2.0_dp*
pi*x(2)/10.0_dp)*cos(2.0_dp*
pi*x(1)/10.0_dp)
3834 CALL flagerror(
"Not implemented.",err,error,*999)
3837 CALL flagerror(
"Not implemented.",err,error,*999)
3839 CALL flagerror(
"Not implemented.",err,error,*999)
3841 CALL flagerror(
"Not implemented.",err,error,*999)
3844 & global_deriv_index,
"*",err,error))// &
3846 CALL flagerror(local_error,err,error,*999)
3848 CASE(field_deludeln_variable_type)
3849 SELECT CASE(global_deriv_index)
3851 IF(component_idx==1)
THEN 3854 ELSE IF(component_idx==2)
THEN 3856 VALUE=16.0_dp*mu_param*
pi**2/10.0_dp**2*cos(2.0_dp*
pi*x(2)/10.0_dp)*cos(2.0_dp*
pi*x(1)/10.0_dp)
3857 ELSE IF(component_idx==3)
THEN 3861 CALL flagerror(
"Not implemented.",err,error,*999)
3864 CALL flagerror(
"Not implemented.",err,error,*999)
3866 CALL flagerror(
"Not implemented.",err,error,*999)
3868 CALL flagerror(
"Not implemented.",err,error,*999)
3871 & global_deriv_index,
"*",err,error))// &
3873 CALL flagerror(local_error,err,error,*999)
3878 CALL flagerror(local_error,err,error,*999)
3881 local_error=
"The number of components does not correspond to the number of dimensions." 3882 CALL flagerror(local_error,err,error,*999)
3885 IF(number_of_dimensions==2.AND.number_of_components==3)
THEN 3887 CALL flagerror(
"Not implemented.",err,error,*999)
3890 IF(number_of_dimensions==2.AND.number_of_components==3)
THEN 3892 SELECT CASE(variable_type)
3893 CASE(field_u_variable_type)
3894 SELECT CASE(global_deriv_index)
3896 IF(component_idx==1)
THEN 3898 VALUE=x(2)*exp(-(2.0_dp*mu_param/rho_param*current_time))
3899 ELSE IF(component_idx==2)
THEN 3901 VALUE=x(1)*exp(-(2.0_dp*mu_param/rho_param*current_time))
3902 ELSE IF(component_idx==3)
THEN 3904 VALUE=2.0_dp*x(2)*mu_param*exp(-(2.0_dp*mu_param/rho_param*current_time))*x(1)
3906 CALL flagerror(
"Not implemented.",err,error,*999)
3909 CALL flagerror(
"Not implemented.",err,error,*999)
3911 CALL flagerror(
"Not implemented.",err,error,*999)
3913 CALL flagerror(
"Not implemented.",err,error,*999)
3916 & global_deriv_index,
"*",err,error))// &
3918 CALL flagerror(local_error,err,error,*999)
3920 CASE(field_deludeln_variable_type)
3921 SELECT CASE(global_deriv_index)
3923 IF(component_idx==1)
THEN 3926 ELSE IF(component_idx==2)
THEN 3929 ELSE IF(component_idx==3)
THEN 3933 CALL flagerror(
"Not implemented.",err,error,*999)
3936 CALL flagerror(
"Not implemented.",err,error,*999)
3938 CALL flagerror(
"Not implemented.",err,error,*999)
3940 CALL flagerror(
"Not implemented.",err,error,*999)
3943 & global_deriv_index,
"*",err,error))// &
3945 CALL flagerror(local_error,err,error,*999)
3950 CALL flagerror(local_error,err,error,*999)
3953 local_error=
"The number of components does not correspond to the number of dimensions." 3954 CALL flagerror(local_error,err,error,*999)
3957 IF(number_of_dimensions==3.AND.number_of_components==4)
THEN 3959 SELECT CASE(variable_type)
3960 CASE(field_u_variable_type)
3961 SELECT CASE(global_deriv_index)
3963 IF(component_idx==1)
THEN 3965 VALUE=x(2)**2/10.0_dp**2+x(3)**2/10.0_dp**2
3966 ELSE IF(component_idx==2)
THEN 3968 VALUE=x(1)**2/10.0_dp**2+x(3)**2/10.0_dp**2
3969 ELSE IF(component_idx==3)
THEN 3971 VALUE=x(1)**2/10.0_dp**2+x(2)**2/10.0_dp**2
3972 ELSE IF(component_idx==4)
THEN 3974 VALUE=4.0_dp*mu_param/10.0_dp**2*x(1)
3976 CALL flagerror(
"Not implemented.",err,error,*999)
3979 CALL flagerror(
"Not implemented.",err,error,*999)
3981 CALL flagerror(
"Not implemented.",err,error,*999)
3983 CALL flagerror(
"Not implemented.",err,error,*999)
3986 & global_deriv_index,
"*",err,error))// &
3988 CALL flagerror(local_error,err,error,*999)
3990 CASE(field_deludeln_variable_type)
3991 SELECT CASE(global_deriv_index)
3995 CALL flagerror(
"Not implemented.",err,error,*999)
3997 CALL flagerror(
"Not implemented.",err,error,*999)
3999 CALL flagerror(
"Not implemented.",err,error,*999)
4002 & global_deriv_index,
"*",err,error))// &
4004 CALL flagerror(local_error,err,error,*999)
4009 CALL flagerror(local_error,err,error,*999)
4012 local_error=
"The number of components does not correspond to the number of dimensions." 4013 CALL flagerror(local_error,err,error,*999)
4016 IF(number_of_dimensions==3.AND.number_of_components==4)
THEN 4018 SELECT CASE(variable_type)
4019 CASE(field_u_variable_type)
4020 SELECT CASE(global_deriv_index)
4022 IF(component_idx==1)
THEN 4024 VALUE=exp((x(1)-x(2))/10.0_dp)+exp((x(3)-x(1))/10.0_dp)
4025 ELSE IF(component_idx==2)
THEN 4027 VALUE=exp((x(1)-x(2))/10.0_dp)+exp((x(2)-x(3))/10.0_dp)
4028 ELSE IF(component_idx==3)
THEN 4030 VALUE=exp((x(3)-x(1))/10.0_dp)+exp((x(2)-x(3))/10.0_dp)
4031 ELSE IF(component_idx==4)
THEN 4033 VALUE=2.0_dp*mu_param/10.0_dp*(exp((x(1)-x(2))/10.0_dp)-exp((x(3)-x(1))/10.0_dp))
4035 CALL flagerror(
"Not implemented.",err,error,*999)
4038 CALL flagerror(
"Not implemented.",err,error,*999)
4040 CALL flagerror(
"Not implemented.",err,error,*999)
4042 CALL flagerror(
"Not implemented.",err,error,*999)
4045 & global_deriv_index,
"*",err,error))// &
4047 CALL flagerror(local_error,err,error,*999)
4049 CASE(field_deludeln_variable_type)
4050 SELECT CASE(global_deriv_index)
4052 IF(component_idx==1)
THEN 4055 ELSE IF(component_idx==2)
THEN 4057 VALUE=-2.0_dp*mu_param*(2.0_dp*exp(x(1)-x(2))+exp(x(2)-x(3)))
4058 ELSE IF(component_idx==3)
THEN 4060 VALUE=-2.0_dp*mu_param*(2.0_dp*exp(x(3)-x(1))+exp(x(2)-x(3)))
4061 ELSE IF(component_idx==4)
THEN 4065 CALL flagerror(
"Not implemented.",err,error,*999)
4068 CALL flagerror(
"Not implemented.",err,error,*999)
4070 CALL flagerror(
"Not implemented.",err,error,*999)
4072 CALL flagerror(
"Not implemented.",err,error,*999)
4075 & global_deriv_index,
"*",err,error))// &
4077 CALL flagerror(local_error,err,error,*999)
4082 CALL flagerror(local_error,err,error,*999)
4085 local_error=
"The number of components does not correspond to the number of dimensions." 4086 CALL flagerror(local_error,err,error,*999)
4089 IF(number_of_dimensions==3.AND.number_of_components==4)
THEN 4091 SELECT CASE(variable_type)
4092 CASE(field_u_variable_type)
4093 SELECT CASE(global_deriv_index)
4095 IF(component_idx==1)
THEN 4097 VALUE=sin(2.0_dp*
pi*x(1)/10.0_dp)*sin(2.0_dp*
pi*x(2)/10.0_dp)*sin(2.0_dp*
pi*x(3)/10.0_dp)
4098 ELSE IF(component_idx==2)
THEN 4100 VALUE=2.0_dp*cos(2.0_dp*
pi*x(1)/10.0_dp)*sin(2.0_dp*
pi*x(3)/10.0_dp)*cos(2.0_dp*
pi*x(2)/10.0_dp)
4101 ELSE IF(component_idx==3)
THEN 4103 VALUE=-cos(2.0_dp*
pi*x(1)/10.0_dp)*sin(2.0_dp*
pi*x(2)/10.0_dp)*cos(2.0_dp*
pi*x(3)/10.0_dp)
4104 ELSE IF(component_idx==4)
THEN 4106 VALUE=6.0_dp*mu_param*
pi/10.0_dp*sin(2.0_dp*
pi*x(2)/10.0_dp)*sin(2.0_dp*
pi*x(3)/10.0_dp)* &
4107 & cos(2.0_dp*
pi*x(1)/10.0_dp)
4109 CALL flagerror(
"Not implemented.",err,error,*999)
4112 CALL flagerror(
"Not implemented.",err,error,*999)
4114 CALL flagerror(
"Not implemented.",err,error,*999)
4116 CALL flagerror(
"Not implemented.",err,error,*999)
4119 & global_deriv_index,
"*",err,error))// &
4121 CALL flagerror(local_error,err,error,*999)
4123 CASE(field_deludeln_variable_type)
4124 SELECT CASE(global_deriv_index)
4126 IF(component_idx==1)
THEN 4129 ELSE IF(component_idx==2)
THEN 4131 VALUE=36*mu_param*
pi**2/10.0_dp**2*cos(2.0_dp*
pi*x(2)/10.0_dp)*sin(2.0_dp*
pi*x(3)/10.0_dp)* &
4132 & cos(2.0_dp*
pi*x(1)/10.0_dp)
4133 ELSE IF(component_idx==3)
THEN 4136 ELSE IF(component_idx==4)
THEN 4140 CALL flagerror(
"Not implemented.",err,error,*999)
4143 CALL flagerror(
"Not implemented.",err,error,*999)
4145 CALL flagerror(
"Not implemented.",err,error,*999)
4147 CALL flagerror(
"Not implemented.",err,error,*999)
4150 & global_deriv_index,
"*",err,error))// &
4152 CALL flagerror(local_error,err,error,*999)
4157 CALL flagerror(local_error,err,error,*999)
4160 local_error=
"The number of components does not correspond to the number of dimensions." 4161 CALL flagerror(local_error,err,error,*999)
4164 IF(number_of_dimensions==3.AND.number_of_components==4)
THEN 4166 CALL flagerror(
"Not implemented.",err,error,*999)
4169 IF(number_of_dimensions==3.AND.number_of_components==4)
THEN 4171 SELECT CASE(variable_type)
4172 CASE(field_u_variable_type)
4173 SELECT CASE(global_deriv_index)
4175 IF(component_idx==1)
THEN 4177 VALUE=x(2)*exp(-(2.0_dp*mu_param/rho_param*current_time))
4178 ELSE IF(component_idx==2)
THEN 4180 VALUE=x(1)*exp(-(2.0_dp*mu_param/rho_param*current_time))
4181 ELSE IF(component_idx==3)
THEN 4184 ELSE IF(component_idx==4)
THEN 4186 VALUE=2.0_dp*x(2)*mu_param*exp(-(2.0_dp*mu_param/rho_param*current_time))*x(1)
4188 CALL flagerror(
"Not implemented.",err,error,*999)
4191 CALL flagerror(
"Not implemented.",err,error,*999)
4193 CALL flagerror(
"Not implemented.",err,error,*999)
4195 CALL flagerror(
"Not implemented.",err,error,*999)
4198 & global_deriv_index,
"*",err,error))// &
4200 CALL flagerror(local_error,err,error,*999)
4202 CASE(field_deludeln_variable_type)
4203 SELECT CASE(global_deriv_index)
4205 IF(component_idx==1)
THEN 4208 ELSE IF(component_idx==2)
THEN 4211 ELSE IF(component_idx==3)
THEN 4214 ELSE IF(component_idx==4)
THEN 4218 CALL flagerror(
"Not implemented.",err,error,*999)
4221 CALL flagerror(
"Not implemented.",err,error,*999)
4223 CALL flagerror(
"Not implemented.",err,error,*999)
4225 CALL flagerror(
"Not implemented.",err,error,*999)
4228 & global_deriv_index,
"*",err,error))// &
4230 CALL flagerror(local_error,err,error,*999)
4235 CALL flagerror(local_error,err,error,*999)
4238 local_error=
"The number of components does not correspond to the number of dimensions." 4239 CALL flagerror(local_error,err,error,*999)
4242 local_error=
"The analytic function type of "// &
4245 CALL flagerror(local_error,err,error,*999)
4247 exits(
"STOKES_EQUATION_ANALYTIC_FUNCTIONS")
4249 999 errorsexits(
"STOKES_EQUATION_ANALYTIC_FUNCTIONS",err,error)
integer(intg), parameter equations_set_setup_dependent_type
Dependent variables.
integer(intg), parameter equations_set_fem_solution_method
Finite Element Method solution method.
This module contains all basis function routines.
integer(intg), parameter equations_set_setup_materials_type
Materials setup.
Contains information on the boundary conditions for the solver equations.
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
integer(intg), parameter, public boundary_condition_moved_wall
The dof is fixed as a boundary condition.
subroutine, public solvers_create_finish(SOLVERS, ERR, ERROR,)
Finish the creation of solvers.
integer, parameter ptr
Pointer integer kind.
integer(intg), parameter, public control_loop_progress_output
Progress output from control loop.
subroutine, public equations_mapping_dynamic_variable_type_set(EQUATIONS_MAPPING, DYNAMIC_VARIABLE_TYPE, ERR, ERROR,)
Sets the mapping between a dependent field variable and the equations set dynamic matrices...
Contains information on the equations mapping i.e., how field variable DOFS are mapped to the rows an...
Contains information about the equations in an equations set.
integer(intg), parameter equations_set_gfem_solution_method
Grid-based Finite Element Method solution method.
integer(intg), parameter problem_control_time_loop_type
Time control loop.
integer(intg), parameter problem_setup_control_type
Solver setup for a problem.
This module handles all problem wide constants.
integer(intg), parameter solver_equations_first_order_dynamic
Solver equations are first order dynamic.
integer(intg), parameter, public control_loop_node
The identifier for a each "leaf" node in a control loop.
subroutine, public solver_dynamic_order_set(SOLVER, ORDER, ERR, ERROR,)
Sets/changes the order for a dynamic solver.
integer(intg), parameter no_global_deriv
No global derivative i.e., u.
Converts a number to its equivalent varying string representation.
subroutine, public equations_create_start(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Start the creation of equations for the equation set.
Contains information on the mesh decomposition.
integer(intg), parameter equations_set_transient_stokes_subtype
integer(intg), parameter equations_set_stokes_equation_two_dim_3
u=tbd
subroutine, public equations_matrices_create_start(EQUATIONS, EQUATIONS_MATRICES, ERR, ERROR,)
Starts the creation of the equations matrices and rhs for the the equations.
Contains information on the type of solver to be used.
integer(intg), parameter, public solver_petsc_library
PETSc solver library.
real(dp), parameter pi
The double precision value of pi.
subroutine, public solvers_number_set(SOLVERS, NUMBER_OF_SOLVERS, ERR, ERROR,)
Sets/changes the number of solvers.
integer(intg), parameter no_part_deriv
No partial derivative i.e., u.
integer(intg), parameter, public solver_dynamic_crank_nicolson_scheme
Crank-Nicolson dynamic solver.
subroutine, public solver_dynamic_degree_set(SOLVER, DEGREE, ERR, ERROR,)
Sets/changes the degree of the polynomial used to interpolate time for a dynamic solver.
subroutine, public stokes_problem_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the Stokes problem.
subroutine, public stokes_equations_set_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the standard Stokes fluid setup.
This module handles all equations matrix and rhs routines.
integer(intg), parameter, public solver_dynamic_first_order
Dynamic solver has first order terms.
integer(intg), parameter equations_set_navier_stokes_equation_two_dim_4
u=tbd
subroutine, public stokes_pre_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the Stokes problem pre solve.
subroutine, public solver_type_set(SOLVER, SOLVE_TYPE, ERR, ERROR,)
Sets/changes the type for a solver.
subroutine, public stokes_equation_analytic_functions(VALUE, X, MU_PARAM, RHO_PARAM, CURRENT_TIME, VARIABLE_TYPE, GLOBAL_DERIV_INDEX, ANALYTIC_FUNCTION_TYPE, NUMBER_OF_DIMENSIONS, NUMBER_OF_COMPONENTS, COMPONENT_IDX, ERR, ERROR,)
Calculates the various analytic solutions given X and time, can be called from within analytic calcul...
integer(intg), parameter equations_static
The equations are static and have no time dependence.
Contains information on an equations set.
This module handles all equations routines.
integer(intg), parameter equations_set_setup_source_type
Source setup.
Contains information on the fields defined on a region.
This module contains all string manipulation and transformation routines.
subroutine, public solvers_create_start(CONTROL_LOOP, SOLVERS, ERR, ERROR,)
Start the creation of a solvers for the control loop.
Contains information on the solvers to be used in a control loop.
integer(intg), parameter first_part_deriv
First partial derivative i.e., du/ds.
This module contains routines for timing the program.
subroutine, public control_loop_current_times_get(CONTROL_LOOP, CURRENT_TIME, TIME_INCREMENT, ERR, ERROR,)
Gets the current time parameters for a time control loop.
integer(intg), parameter problem_ale_stokes_subtype
subroutine, public equations_matrices_dynamic_lumping_type_set(EQUATIONS_MATRICES, LUMPING_TYPE, ERR, ERROR,)
Sets the lumping of the linear equations matrices.
integer(intg), parameter solver_equations_static
Solver equations are static.
subroutine, public equations_time_dependence_type_set(EQUATIONS, TIME_DEPENDENCE_TYPE, ERR, ERROR,)
Sets/changes the time dependence type for equations.
integer(intg), parameter problem_stokes_equation_type
subroutine, public solver_equations_sparsity_type_set(SOLVER_EQUATIONS, SPARSITY_TYPE, ERR, ERROR,)
Sets/changes the sparsity type for solver equations.
This module handles all analytic analysis routines.
subroutine, public solvers_solver_get(SOLVERS, SOLVER_INDEX, SOLVER, ERR, ERROR,)
Returns a pointer to the specified solver in the list of solvers.
subroutine, public stokes_equationssetsolutionmethodset(EQUATIONS_SET, SOLUTION_METHOD, ERR, ERROR,)
Sets/changes the solution method for a Stokes flow equation type of an fluid mechanics equations set ...
Contains information for a field defined on a region.
subroutine stokes_pre_solve_ale_update_mesh(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Update mesh velocity and move mesh for ALE Stokes problem.
integer(intg), parameter, public equations_matrices_full_matrices
Use fully populated equation matrices.
integer(intg), parameter equations_set_navier_stokes_equation_two_dim_5
u=tbd
integer(intg), parameter equations_set_fluid_mechanics_class
subroutine, public equations_mapping_rhs_variable_type_set(EQUATIONS_MAPPING, RHS_VARIABLE_TYPE, ERR, ERROR,)
Sets the mapping between a dependent field variable and the equations set rhs vector.
integer(intg), parameter solver_equations_linear
Solver equations are linear.
integer(intg), parameter global_deriv_s2
First global derivative in the s2 direction i.e., du/ds2.
Contains information on a control loop.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
subroutine, public solver_equations_create_finish(SOLVER_EQUATIONS, ERR, ERROR,)
Finishes the process of creating solver equations.
integer(intg), parameter, public solver_sparse_matrices
Use sparse solver matrices.
subroutine, public stokes_post_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the Stokes problem post solve.
subroutine, public solver_equations_create_start(SOLVER, SOLVER_EQUATIONS, ERR, ERROR,)
Starts the process of creating solver equations.
subroutine stokes_pre_solve_update_boundary_conditions(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Update boundary conditions for Stokes flow pre solve.
integer(intg), parameter, public solver_dynamic_type
A dynamic solver.
integer(intg), parameter equations_set_stokes_equation_three_dim_4
u=tbd
integer(intg), parameter, public basis_default_quadrature_scheme
Identifier for the default quadrature scheme.
integer(intg), parameter problem_setup_solvers_type
Solver setup for a problem.
integer(intg), parameter equations_set_setup_equations_type
Equations setup.
Contains information for mapping field variables to the dynamic matrices in the equations set of the ...
integer(intg), parameter equations_set_setup_independent_type
Independent variables.
This module contains all program wide constants.
subroutine, public solver_library_type_set(SOLVER, SOLVER_LIBRARY_TYPE, ERR, ERROR,)
Sets/changes the type of library type to use for the solver.
integer(intg), parameter, public boundary_condition_fixed_inlet
The dof is fixed as a boundary condition.
subroutine, public equationsmapping_linearmatricesnumberset(EQUATIONS_MAPPING, NUMBER_OF_LINEAR_EQUATIONS_MATRICES, ERR, ERROR,)
Sets/changes the number of linear equations matrices.
integer(intg), parameter, public equations_lumped_matrices
The equations matrices are "mass" lumped.
integer(intg), parameter equations_set_laplace_stokes_subtype
integer(intg), parameter equations_set_stokes_equation_two_dim_2
u=tbd
integer(intg), parameter equations_set_navier_stokes_equation_three_dim_5
u=tbd
integer(intg), parameter problem_setup_initial_type
Initial setup for a problem.
subroutine, public equationsmapping_linearmatricesvariabletypesset(EQUATIONS_MAPPING, LINEAR_MATRIX_VARIABLE_TYPES, ERR, ERROR,)
Sets the mapping between the dependent field variable types and the linear equations matrices...
subroutine, public fluid_mechanics_io_read_data(SOLVER_TYPE, INPUT_VALUES, NUMBER_OF_DIMENSIONS, INPUT_TYPE, INPUT_OPTION, TIME_STEP, LENGTH_SCALE)
Reads input data from a file.
integer(intg), parameter equations_set_stokes_equation_two_dim_4
u=tbd
integer(intg), parameter equations_first_order_dynamic
The equations are first order dynamic.
Contains information on the boundary conditions for a dependent field variable.
integer(intg), parameter equations_set_static_stokes_subtype
subroutine, public solver_equations_linearity_type_set(SOLVER_EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for solver equations.
integer(intg), parameter problem_laplace_stokes_subtype
integer(intg), parameter equations_set_setup_start_action
Start setup action.
subroutine, public exits(NAME)
Records the exit out of the named procedure.
recursive subroutine, public control_loop_solvers_get(CONTROL_LOOP, SOLVERS, ERR, ERROR,)
Returns a pointer to the solvers for a control loop.
This module contains all type definitions in order to avoid cyclic module references.
Contains information on the equations matrices and vectors.
integer(intg), parameter, public equations_matrix_fem_structure
Finite element matrix structure.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
Contains information of the linear matrices for equations matrices.
integer(intg), parameter, public general_output_type
General output type.
subroutine, public equationsmatrices_dynamicstructuretypeset(EQUATIONS_MATRICES, STRUCTURE_TYPE, ERR, ERROR,)
Sets the structure (sparsity) of the dynamic equations matrices.
integer(intg), parameter equations_set_stokes_equation_three_dim_2
u=tbd
subroutine, public stokes_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the equation specification for a Stokes flow equation of a fluid mechanics equations set...
subroutine, public equations_matrices_linear_storage_type_set(EQUATIONS_MATRICES, STORAGE_TYPE, ERR, ERROR,)
Sets the storage type (sparsity) of the linear equations matrices.
subroutine, public equationsmatrices_linearstructuretypeset(EQUATIONS_MATRICES, STRUCTURE_TYPE, ERR, ERROR,)
Sets the structure (sparsity) of the linear equations matrices.
subroutine, public equations_mapping_create_finish(EQUATIONS_MAPPING, ERR, ERROR,)
Finishes the process of creating an equations mapping.
subroutine stokes_pre_solve_ale_update_parameters(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Update mesh parameters for three component Laplace problem.
integer(intg), parameter equations_set_stokes_equation_three_dim_3
u=tbd
Returns the specified control loop as indexed by the control loop identifier from the control loop ro...
This module handles all Stokes fluid routines.
subroutine, public control_loop_type_set(CONTROL_LOOP, LOOP_TYPE, ERR, ERROR,)
Sets/changes the control loop type.
integer(intg), parameter equations_set_stokes_equation_three_dim_1
u=tbd
integer(intg), parameter equations_set_navier_stokes_equation_three_dim_4
u=tbd
integer(intg), parameter equations_set_optimised_stokes_subtype
integer(intg), parameter problem_transient_stokes_subtype
subroutine, public equations_set_equations_get(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Gets the equations for an equations set.
subroutine, public stokes_finite_element_calculate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Calculates the element stiffness matrices and RHS for a Stokes fluid finite element equations set...
integer(intg), parameter problem_static_stokes_subtype
integer(intg), dimension(4) partial_derivative_first_derivative_map
PARTIAL_DERIVATIVE_FIRST_DERIVATIVE_MAP(nic) gives the partial derivative index for the first derivat...
subroutine, public equations_create_finish(EQUATIONS, ERR, ERROR,)
Finish the creation of equations.
This module handles all domain mappings routines.
integer(intg), parameter problem_setup_finish_action
Finish setup action.
This module handles all equations mapping routines.
Contains information about the solver equations for a solver.
integer(intg), parameter, public matrix_compressed_row_storage_type
Matrix compressed row storage type.
subroutine, public equations_matrices_dynamic_storage_type_set(EQUATIONS_MATRICES, STORAGE_TYPE, ERR, ERROR,)
Sets the storage type (sparsity) of the dynamic equations matrices.
integer(intg), parameter, public equations_matrix_diagonal_structure
Diagonal matrix structure.
integer(intg), parameter equations_set_gfv_solution_method
Grid-based Finite Volume solution method.
integer(intg), parameter equations_set_setup_geometry_type
Geometry setup.
integer(intg), parameter global_deriv_s1_s2
Global Cross derivative in the s1 and s2 direction i.e., d^2u/ds1ds2.
Contains information for a problem.
integer(intg), parameter, public solver_progress_output
Progress output from solver routines.
subroutine stokes_post_solve_output_data(CONTROL_LOOP, SOLVER, err, error,)
Output data post solve.
integer(intg), parameter equations_linear
The equations are linear.
subroutine, public analyticanalysis_output(FIELD, FILENAME, ERR, ERROR,)
Output the analytic error analysis for a dependent field compared to the analytic values parameter se...
Contains the topology information for the nodes of a domain.
subroutine, public equations_matrices_create_finish(EQUATIONS_MATRICES, ERR, ERROR,)
Finishes the creation of the equations matrices and RHS for the the equations.
This module handles all distributed matrix vector routines.
integer(intg), parameter problem_optimised_stokes_subtype
integer(intg), parameter global_deriv_s1
First global derivative in the s1 direction i.e., du/ds1.
This module handles all boundary conditions routines.
This module handles all solver routines.
subroutine, public equations_mapping_create_start(EQUATIONS, EQUATIONS_MAPPING, ERR, ERROR,)
Finishes the process of creating an equations mapping for a equations set equations.
integer(intg), parameter, public equations_matrix_unlumped
The matrix is not lumped.
Contains information about an equations matrix.
Contains information for a particular quadrature scheme.
Implements lists of Field IO operation.
This module contains all routines dealing with (non-distributed) matrix and vectors types...
integer(intg), parameter, public distributed_matrix_block_storage_type
Distributed matrix block storage type.
integer(intg), parameter, public equations_matrix_lumped
The matrix is "mass" lumped.
subroutine, public equations_linearity_type_set(EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for equations.
subroutine, public control_loop_create_start(PROBLEM, CONTROL_LOOP, ERR, ERROR,)
Start the process of creating a control loop for a problem.
integer(intg), parameter equations_set_stokes_equation_two_dim_1
u=tbd
integer(intg), parameter problem_setup_solver_equations_type
Solver equations setup for a problem.
integer(intg), parameter equations_set_pgm_stokes_subtype
Sets a boundary condition on the specified local DOF.
Contains information on the solver mapping between the global equation sets and the solver matrices...
subroutine, public solver_dynamic_scheme_set(SOLVER, SCHEME, ERR, ERROR,)
Sets/changes the scheme for a dynamic solver.
integer(intg), parameter equations_set_stokes_equation_two_dim_5
u=tbd
integer(intg), parameter equations_set_navier_stokes_equation_three_dim_1
u=tbd
Contains information for a field variable defined on a field.
integer(intg), parameter equations_set_fd_solution_method
Finite Difference solution method.
integer(intg), parameter, public equations_matrices_sparse_matrices
Use sparse equations matrices.
integer(intg), parameter problem_pgm_stokes_subtype
Contains information on the setup information for an equations set.
A pointer to the domain decomposition for this domain.
integer(intg), parameter problem_setup_start_action
Start setup action.
subroutine, public solver_equations_time_dependence_type_set(SOLVER_EQUATIONS, TIME_DEPENDENCE_TYPE, ERR, ERROR,)
Sets/changes the time dependence type for solver equations.
This module handles all control loop routines.
integer(intg), parameter, public solver_cmiss_library
CMISS (internal) solver library.
integer(intg), parameter, public boundary_condition_fixed
The dof is fixed as a boundary condition.
subroutine, public errors(NAME, ERR, ERROR)
Records the exiting error of the subroutine.
This module defines all constants shared across equations set routines.
integer(intg), parameter equations_set_bem_solution_method
Boundary Element Method solution method.
subroutine, public solver_solver_equations_get(SOLVER, SOLVER_EQUATIONS, ERR, ERROR,)
Returns a pointer to the solver equations for a solver.
subroutine, public fluid_mechanics_io_read_boundary_conditions(SOLVER_TYPE, BOUNDARY_VALUES, NUMBER_OF_DIMENSIONS, BOUNDARY_CONDITION, OPTION, TIME_STEP, TIME, LENGTH_SCALE)
Reads boundary conditions from a file.
subroutine, public boundary_conditions_variable_get(BOUNDARY_CONDITIONS, FIELD_VARIABLE, BOUNDARY_CONDITIONS_VARIABLE, ERR, ERROR,)
Find the boundary conditions variable for a given field variable.
Contains all information about a basis .
integer(intg), parameter equations_set_fv_solution_method
Finite Volume solution method.
integer(intg), parameter, public matrix_block_storage_type
Matrix block storage type.
integer(intg), parameter, public solver_dynamic_first_degree
Dynamic solver uses a first degree polynomial for time interpolation.
subroutine, public stokes_boundaryconditionsanalyticcalculate(EQUATIONS_SET, BOUNDARY_CONDITIONS, ERR, ERROR,)
Calculates the analytic solution and sets the boundary conditions for an analytic problem...
Flags an error condition.
integer(intg), parameter equations_set_setup_initial_type
Initial setup.
recursive subroutine, public control_loop_create_finish(CONTROL_LOOP, ERR, ERROR,)
Finish the process of creating a control loop.
integer(intg), parameter equations_set_setup_analytic_type
Analytic setup.
Flags an error condition.
integer(intg), parameter, public solver_linear_type
A linear solver.
integer(intg), parameter problem_fluid_mechanics_class
integer(intg), parameter equations_set_stokes_equation_type
Contains information of the RHS vector for equations matrices.
subroutine, public field_io_elements_export(FIELDS, FILE_NAME, METHOD, ERR, ERROR,)
Export elemental information into multiple files.
subroutine, public stokes_problemspecificationset(problem, problemSpecification, err, error,)
Sets the problem specification for a Stokes fluid problem.
integer(intg), parameter equations_set_stokes_equation_three_dim_5
u=tbd
integer(intg), parameter, public distributed_matrix_diagonal_storage_type
Distributed matrix diagonal storage type.
integer(intg), parameter equations_set_ale_stokes_subtype
Contains information for mapping field variables to the linear matrices in the equations set of the m...
This module contains all kind definitions.
Temporary IO routines for fluid mechanics.
subroutine, public field_io_nodes_export(FIELDS, FILE_NAME, METHOD, ERR, ERROR,)
Export nodal information.
integer(intg), parameter equations_set_setup_finish_action
Finish setup action.
integer(intg), parameter, public distributed_matrix_compressed_row_storage_type
Distributed matrix compressed row storage type.
Contains information of the dynamic matrices for equations matrices.