104 INTEGER(INTG),
INTENT(IN) :: solutionMethod
105 INTEGER(INTG),
INTENT(OUT) :: err
110 enters(
"Stree_EquationsSetSolutionMethodSet",err,error,*999)
112 IF(
ASSOCIATED(equationsset))
THEN 113 IF(.NOT.
ALLOCATED(equationsset%specification))
THEN 114 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
115 ELSE IF(
SIZE(equationsset%specification,1)/=3)
THEN 116 CALL flagerror(
"Equations set specification must have three entries for a structured tree type equations set.", &
119 SELECT CASE(equationsset%specification(3))
121 SELECT CASE(solutionmethod)
125 CALL flag_error(
"Not implemented.",err,error,*999)
127 CALL flag_error(
"Not implemented.",err,error,*999)
129 CALL flag_error(
"Not implemented.",err,error,*999)
131 CALL flag_error(
"Not implemented.",err,error,*999)
133 CALL flag_error(
"Not implemented.",err,error,*999)
135 CALL flag_error(
"Not implemented.",err,error,*999)
137 localerror=
"The specified solution method of "//
trim(
number_to_vstring(solutionmethod,
"*",err,error))// &
142 localerror=
"The third equations set specification of "// &
144 &
" is not valid for a Stree type of a fluid mechanics equations set." 148 CALL flag_error(
"Equations set is not associated.",err,error,*999)
151 exits(
"Stree_EquationsSetSolutionMethodSet")
153 999 errorsexits(
"Stree_EquationsSetSolutionMethodSet",err,error)
167 INTEGER(INTG),
INTENT(IN) :: specification(:)
168 INTEGER(INTG),
INTENT(OUT) :: err
171 INTEGER(INTG) :: subtype
174 enters(
"Stree_EquationsSetSpecificationSet",err,error,*999)
176 IF(
ASSOCIATED(equationsset))
THEN 177 IF(
SIZE(specification,1)/=3)
THEN 178 CALL flagerror(
"Equations set specification must have three entries for a Stree type equations set.", &
181 subtype=specification(3)
186 localerror=
"The third equations set specification of "//
trim(
numbertovstring(subtype,
"*",err,error))// &
187 &
" is not valid for a Stree type of a fluid mechanics equations set." 188 CALL flagerror(localerror,err,error,*999)
191 IF(
ALLOCATED(equationsset%specification))
THEN 192 CALL flagerror(
"Equations set specification is already allocated.",err,error,*999)
194 ALLOCATE(equationsset%specification(3),stat=err)
195 IF(err/=0)
CALL flagerror(
"Could not allocate equations set specification.",err,error,*999)
199 CALL flagerror(
"Equations set is not associated.",err,error,*999)
202 exits(
"Stree_EquationsSetSpecificationSet")
204 999 errorsexits(
"Stree_EquationsSetSpecificationSet",err,error)
219 INTEGER(INTG),
INTENT(OUT) :: err
228 TYPE(
field_type),
POINTER :: equationsSetField
229 INTEGER(INTG) :: I,geometricScalingType,geometricMeshComponent,geometricComponentNumber
230 INTEGER(INTG) :: dependentFieldNumberOfVariables,dependentFieldNumberOfComponents
231 INTEGER(INTG) :: materialsFieldNumberOfVariables,materialsFieldNumberOfComponents
234 enters(
"Stree_EquationsSetSetup",err,error,*999)
237 NULLIFY(equationsmapping)
238 NULLIFY(equationsmatrices)
239 NULLIFY(equationsmaterials)
240 NULLIFY(geometricdecomposition)
242 IF(
ASSOCIATED(equationsset))
THEN 243 IF(.NOT.
ALLOCATED(equationsset%specification))
THEN 244 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
245 ELSE IF(
SIZE(equationsset%specification,1)/=3)
THEN 246 CALL flagerror(
"Equations set specification must have three entries for a Stree type equations set.", &
249 SELECT CASE(equationsset%specification(3))
251 SELECT CASE(equationssetsetup%SETUP_TYPE)
256 SELECT CASE(equationsset%specification(3))
258 SELECT CASE(equationssetsetup%ACTION_TYPE)
263 equationsequationssetfield=>equationsset%EQUATIONS_SET_FIELD
264 IF(equationsequationssetfield%EQUATIONS_SET_FIELD_AUTO_CREATED)
THEN 266 CALL field_create_start(equationssetsetup%FIELD_USER_NUMBER,equationsset%REGION, &
267 & equationsequationssetfield%EQUATIONS_SET_FIELD_FIELD,err,error,*999)
268 equationssetfield=>equationsequationssetfield%EQUATIONS_SET_FIELD_FIELD
269 CALL field_label_set(equationssetfield,
"Equations Set Field",err,error,*999)
270 CALL field_type_set_and_lock(equationssetfield,field_general_type,&
272 CALL field_number_of_variables_set(equationssetfield,1,err,error,*999)
273 CALL field_variable_types_set_and_lock(equationssetfield,[field_u_variable_type],err,error,*999)
274 CALL field_variable_label_set(equationssetfield,field_u_variable_type,
"Stree",err,error,*999)
275 CALL field_data_type_set_and_lock(equationssetfield,field_u_variable_type,field_dp_type,err,error,*999)
276 CALL field_number_of_components_set_and_lock(equationssetfield,field_u_variable_type,1,err,error,*999)
279 IF(equationsset%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_AUTO_CREATED)
THEN 280 CALL field_create_finish(equationsset%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD,err,error,*999)
281 CALL field_component_values_initialise(equationsset%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD, &
282 & field_u_variable_type,field_values_set_type,1,1.0_dp,err,error,*999)
287 & setup_type,
"*",err,error))//
" is not implemented for a Stree equations set." 291 localerror=
"The third equations set specification of "// &
293 &
" is invalid for a Stree equations set." 300 SELECT CASE(equationsset%specification(3))
302 SELECT CASE(equationssetsetup%ACTION_TYPE)
304 equationsequationssetfield=>equationsset%EQUATIONS_SET_FIELD
305 equationssetfield=>equationsequationssetfield%EQUATIONS_SET_FIELD_FIELD
306 IF(equationsequationssetfield%EQUATIONS_SET_FIELD_AUTO_CREATED)
THEN 307 CALL field_mesh_decomposition_get(equationsset%GEOMETRY%GEOMETRIC_FIELD,geometricdecomposition,err,error,*999)
308 CALL field_mesh_decomposition_set_and_lock(equationssetfield,geometricdecomposition,err,error,*999)
309 CALL field_geometric_field_set_and_lock(equationssetfield,equationsset%GEOMETRY%GEOMETRIC_FIELD,err,error,*999)
310 CALL field_component_mesh_component_get(equationsset%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
311 & 1,geometriccomponentnumber,err,error,*999)
312 CALL field_component_mesh_component_set_and_lock(equationssetfield,field_u_variable_type, &
313 & 1,geometriccomponentnumber,err,error,*999)
314 CALL field_component_interpolation_set_and_lock(equationssetfield,field_u_variable_type, &
315 & 1,field_constant_interpolation,err,error,*999)
317 CALL field_scaling_type_get(equationsset%GEOMETRY%GEOMETRIC_FIELD,geometricscalingtype,err,error,*999)
318 CALL field_scaling_type_set(equationsset%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD, &
319 & geometricscalingtype,err,error,*999)
326 localerror=
"The action type of "//
trim(
number_to_vstring(equationssetsetup%ACTION_TYPE,
"*",err,error))// &
328 &
" is invalid for a Stree equation." 332 localerror=
"The third equations set specification of "// &
334 &
" is invalid for a Stree equations set." 341 SELECT CASE(equationsset%specification(3))
343 dependentfieldnumberofvariables=2
344 dependentfieldnumberofcomponents=1
345 SELECT CASE(equationssetsetup%ACTION_TYPE)
348 IF(equationsset%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 351 CALL field_create_start(equationssetsetup%FIELD_USER_NUMBER,equationsset%REGION, &
352 & equationsset%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
354 CALL field_type_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
356 CALL field_label_set(equationsset%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
358 CALL field_dependent_type_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD, &
359 & field_dependent_type,err,error,*999)
361 CALL field_mesh_decomposition_get(equationsset%GEOMETRY%GEOMETRIC_FIELD,geometricdecomposition, &
364 CALL field_mesh_decomposition_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD, &
365 & geometricdecomposition,err,error,*999)
367 CALL field_geometric_field_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD,equationsset%GEOMETRY% &
368 & geometric_field,err,error,*999)
370 CALL field_number_of_variables_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD, &
371 & dependentfieldnumberofvariables,err,error,*999)
372 CALL field_variable_types_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
373 & field_deludeln_variable_type],err,error,*999)
375 CALL field_dimension_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
376 & field_vector_dimension_type,err,error,*999)
377 CALL field_dimension_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
378 & field_vector_dimension_type,err,error,*999)
380 CALL field_data_type_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
381 & field_dp_type,err,error,*999)
382 CALL field_data_type_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
383 & field_dp_type,err,error,*999)
385 CALL field_number_of_components_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD, &
386 & field_u_variable_type,dependentfieldnumberofcomponents,err,error,*999)
387 CALL field_number_of_components_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD, &
388 & field_deludeln_variable_type,dependentfieldnumberofcomponents,err,error,*999)
389 CALL field_component_mesh_component_get(equationsset%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
390 & 1,geometricmeshcomponent,err,error,*999)
392 DO i=1,dependentfieldnumberofcomponents
393 CALL field_component_mesh_component_set(equationsset%DEPENDENT%DEPENDENT_FIELD, &
394 & field_u_variable_type,i,geometricmeshcomponent,err,error,*999)
395 CALL field_component_mesh_component_set(equationsset%DEPENDENT%DEPENDENT_FIELD, &
396 & field_deludeln_variable_type,i,geometricmeshcomponent,err,error,*999)
398 SELECT CASE(equationsset%SOLUTION_METHOD)
401 DO i=1,dependentfieldnumberofcomponents
402 CALL field_component_interpolation_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD, &
403 & field_u_variable_type,i,field_node_based_interpolation,err,error,*999)
404 CALL field_component_interpolation_set_and_lock(equationsset%DEPENDENT%DEPENDENT_FIELD, &
405 & field_deludeln_variable_type,i,field_node_based_interpolation,err,error,*999)
407 CALL field_scaling_type_get(equationsset%GEOMETRY%GEOMETRIC_FIELD,geometricscalingtype,err,error,*999)
408 CALL field_scaling_type_set(equationsset%DEPENDENT%DEPENDENT_FIELD,geometricscalingtype,err,error,*999)
410 localerror=
"The solution method of " &
416 CALL field_type_check(equationssetsetup%FIELD,field_general_type,err,error,*999)
417 CALL field_dependent_type_check(equationssetsetup%FIELD,field_dependent_type,err,error,*999)
418 CALL field_number_of_variables_check(equationssetsetup%FIELD,dependentfieldnumberofvariables,err,error,*999)
419 CALL field_variable_types_check(equationssetsetup%FIELD,[field_u_variable_type, &
420 & field_deludeln_variable_type],err,error,*999)
421 CALL field_dimension_check(equationssetsetup%FIELD,field_u_variable_type, &
422 & field_vector_dimension_type,err,error,*999)
423 CALL field_dimension_check(equationssetsetup%FIELD,field_deludeln_variable_type, &
424 & field_vector_dimension_type,err,error,*999)
425 CALL field_data_type_check(equationssetsetup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
426 CALL field_data_type_check(equationssetsetup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
427 CALL field_number_of_components_check(equationssetsetup%FIELD,field_u_variable_type, &
428 & dependentfieldnumberofcomponents,err,error,*999)
429 CALL field_number_of_components_check(equationssetsetup%FIELD,field_deludeln_variable_type, &
430 & dependentfieldnumberofcomponents,err,error,*999)
431 SELECT CASE(equationsset%SOLUTION_METHOD)
433 CALL field_component_interpolation_check(equationssetsetup%FIELD,field_u_variable_type,1, &
434 & field_node_based_interpolation,err,error,*999)
435 CALL field_component_interpolation_check(equationssetsetup%FIELD,field_deludeln_variable_type,1, &
436 & field_node_based_interpolation,err,error,*999)
439 &
"*",err,error))//
" is invalid." 445 IF(equationsset%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 446 CALL field_create_finish(equationsset%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
449 localerror=
"The third equations set specification of "// &
451 &
" is invalid for a Stree equations set." 455 localerror=
"The third equations set specification of "// &
457 &
" is invalid for a Stree equations set." 464 SELECT CASE(equationsset%specification(3))
466 materialsfieldnumberofvariables=2
467 materialsfieldnumberofcomponents=27
468 SELECT CASE(equationssetsetup%ACTION_TYPE)
471 equationsmaterials=>equationsset%MATERIALS
472 IF(
ASSOCIATED(equationsmaterials))
THEN 473 IF(equationsmaterials%MATERIALS_FIELD_AUTO_CREATED)
THEN 476 CALL field_create_start(equationssetsetup%FIELD_USER_NUMBER,equationsset%REGION, &
477 & equationsset%MATERIALS%MATERIALS_FIELD,err,error,*999)
478 CALL field_type_set_and_lock(equationsmaterials%MATERIALS_FIELD,field_material_type,err,error,*999)
480 CALL field_label_set(equationsmaterials%MATERIALS_FIELD,
"Materials Field",err,error,*999)
481 CALL field_dependent_type_set_and_lock(equationsmaterials%MATERIALS_FIELD,field_independent_type, &
483 CALL field_mesh_decomposition_get(equationsset%GEOMETRY%GEOMETRIC_FIELD,geometricdecomposition, &
486 CALL field_mesh_decomposition_set_and_lock(equationsset%MATERIALS%MATERIALS_FIELD, &
487 & geometricdecomposition,err,error,*999)
489 CALL field_geometric_field_set_and_lock(equationsmaterials%MATERIALS_FIELD,equationsset%GEOMETRY% &
490 & geometric_field,err,error,*999)
491 CALL field_number_of_variables_set(equationsmaterials%MATERIALS_FIELD, &
492 & materialsfieldnumberofvariables,err,error,*999)
493 CALL field_variable_types_set_and_lock(equationsmaterials%MATERIALS_FIELD, &
494 & [field_u_variable_type,field_v_variable_type],err,error,*999)
495 CALL field_dimension_set_and_lock(equationsmaterials%MATERIALS_FIELD,field_u_variable_type, &
496 & field_vector_dimension_type,err,error,*999)
497 CALL field_dimension_set_and_lock(equationsmaterials%MATERIALS_FIELD,field_v_variable_type, &
498 & field_vector_dimension_type,err,error,*999)
499 CALL field_data_type_set_and_lock(equationsmaterials%MATERIALS_FIELD,field_u_variable_type, &
500 & field_dp_type,err,error,*999)
501 CALL field_data_type_set_and_lock(equationsmaterials%MATERIALS_FIELD,field_v_variable_type, &
502 & field_dp_type,err,error,*999)
503 CALL field_number_of_components_set_and_lock(equationsmaterials%MATERIALS_FIELD,field_u_variable_type, &
504 & materialsfieldnumberofcomponents,err,error,*999)
505 CALL field_number_of_components_set_and_lock(equationsmaterials%MATERIALS_FIELD,field_v_variable_type, &
506 & materialsfieldnumberofcomponents,err,error,*999)
507 CALL field_component_mesh_component_get(equationsset%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
508 & 1,geometriccomponentnumber,err,error,*999)
509 DO i=1,materialsfieldnumberofcomponents
510 CALL field_component_mesh_component_set(equationsmaterials%MATERIALS_FIELD,field_u_variable_type, &
511 & i,geometriccomponentnumber,err,error,*999)
512 CALL field_component_mesh_component_set(equationsmaterials%MATERIALS_FIELD,field_v_variable_type, &
513 & i,geometriccomponentnumber,err,error,*999)
515 DO i=1,materialsfieldnumberofcomponents
516 CALL field_component_interpolation_set(equationsmaterials%MATERIALS_FIELD,field_u_variable_type, &
517 & i,field_node_based_interpolation,err,error,*999)
518 CALL field_component_interpolation_set(equationsmaterials%MATERIALS_FIELD,field_v_variable_type, &
519 & i,field_node_based_interpolation,err,error,*999)
522 CALL field_scaling_type_get(equationsset%GEOMETRY%GEOMETRIC_FIELD,geometricscalingtype,err,error,*999)
523 CALL field_scaling_type_set(equationsmaterials%MATERIALS_FIELD,geometricscalingtype,err,error,*999)
526 CALL field_type_check(equationssetsetup%FIELD,field_material_type,err,error,*999)
527 CALL field_dependent_type_check(equationssetsetup%FIELD,field_independent_type,err,error,*999)
528 CALL field_number_of_variables_check(equationssetsetup%FIELD,materialsfieldnumberofvariables,err,error,*999)
529 CALL field_variable_types_check(equationssetsetup%FIELD,[field_u_variable_type,field_u_variable_type], &
531 CALL field_dimension_check(equationssetsetup%FIELD,field_u_variable_type,field_vector_dimension_type, &
533 CALL field_dimension_check(equationssetsetup%FIELD,field_v_variable_type,field_vector_dimension_type, &
535 CALL field_data_type_check(equationssetsetup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
536 CALL field_data_type_check(equationssetsetup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
537 CALL field_number_of_components_check(equationssetsetup%FIELD,field_u_variable_type, &
538 & materialsfieldnumberofcomponents,err,error,*999)
539 CALL field_number_of_components_check(equationssetsetup%FIELD,field_v_variable_type, &
540 & materialsfieldnumberofcomponents,err,error,*999)
543 CALL flag_error(
"Equations set materials is not associated.",err,error,*999)
547 equationsmaterials=>equationsset%MATERIALS
548 IF(
ASSOCIATED(equationsmaterials))
THEN 549 IF(equationsmaterials%MATERIALS_FIELD_AUTO_CREATED)
THEN 550 CALL field_create_finish(equationsmaterials%MATERIALS_FIELD,err,error,*999)
553 CALL flag_error(
"Equations set materials is not associated.",err,error,*999)
558 & err,error))//
" is invalid for Stree equation." 562 localerror=
"The third equations set specification of "// &
564 &
" is invalid for a Stree equation." 571 SELECT CASE(equationsset%specification(3))
573 SELECT CASE(equationssetsetup%ACTION_TYPE)
575 equationsmaterials=>equationsset%MATERIALS
576 IF(
ASSOCIATED(equationsmaterials))
THEN 577 IF(equationsmaterials%MATERIALS_FINISHED)
THEN 582 CALL flag_error(
"Equations set materials has not been finished.",err,error,*999)
585 CALL flag_error(
"Equations materials is not associated.",err,error,*999)
588 SELECT CASE(equationsset%SOLUTION_METHOD)
601 SELECT CASE(equations%SPARSITY_TYPE)
610 localerror=
"The equations matrices sparsity type of "// &
616 CALL flag_error(
"Not implemented.",err,error,*999)
618 CALL flag_error(
"Not implemented.",err,error,*999)
620 CALL flag_error(
"Not implemented.",err,error,*999)
622 CALL flag_error(
"Not implemented.",err,error,*999)
624 CALL flag_error(
"Not implemented.",err,error,*999)
627 &
"*",err,error))//
" is invalid." 631 localerror=
"The action type of "//
trim(
number_to_vstring(equationssetsetup%ACTION_TYPE,
"*",err,error))// &
633 &
" is invalid for a Strees equation." 637 localerror=
"The third equations set specification of "// &
639 &
" is invalid for a Stree equation." 643 localerror=
"The setup type of "//
trim(
number_to_vstring(equationssetsetup%SETUP_TYPE,
"*",err,error))// &
644 &
" is invalid for a Strees equation set." 648 localerror=
"The third equations set specification of "// &
650 &
" does not equal a Strees equation set." 654 CALL flag_error(
"Equations set is not associated.",err,error,*999)
657 exits(
"Stree_EquationsSetSetup")
659 999 errorsexits(
"Stree_EquationsSetSetup",err,error)
673 INTEGER(INTG),
INTENT(IN) :: nodeNumber
674 INTEGER(INTG),
INTENT(OUT) :: err
685 TYPE(
field_type),
POINTER :: materialsField,dependentField
688 REAL(DP),
POINTER :: dependentParameters(:),materialsParameters(:)
690 enters(
"STREE_FINITE_ELEMENT_CALCULATE",err,error,*999)
693 NULLIFY(equationsmapping)
694 NULLIFY(equationsmatrices)
695 NULLIFY(linearmapping)
696 NULLIFY(linearmatrices)
697 NULLIFY(stiffnessmatrix)
698 NULLIFY(dependentfield)
699 NULLIFY(materialsfield)
702 NULLIFY(dependentparameters)
703 NULLIFY(materialsparameters)
704 NULLIFY(fieldvariable)
706 IF(
ASSOCIATED(equationsset))
THEN 707 equations=>equationsset%EQUATIONS
708 IF(
ASSOCIATED(equations))
THEN 709 dependentfield=>equations%EQUATIONS_SET%DEPENDENT%DEPENDENT_FIELD
710 IF(
ASSOCIATED(dependentfield))
THEN 711 domain=>dependentfield%DECOMPOSITION%DOMAIN(dependentfield%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR
712 IF(
ASSOCIATED(domain))
THEN 713 domainnodes=>domain%TOPOLOGY%NODES
715 CALL flag_error(
"Domain is not associated.",err,error,*999)
718 CALL flag_error(
"Dependent Field is not associated.",err,error,*999)
721 CALL flag_error(
"Equations set equations is not associated.",err,error,*999)
724 CALL flag_error(
"Equations set is not associated.",err,error,*999)
727 SELECT CASE(equationsset%specification(3))
730 equationsmatrices=>equations%EQUATIONS_MATRICES
731 equationsmapping=>equations%EQUATIONS_MAPPING
732 linearmatrices=>equationsmatrices%LINEAR_MATRICES
733 stiffnessmatrix=>linearmatrices%MATRICES(1)%PTR
734 linearmapping=>equationsmapping%LINEAR_MAPPING
735 stiffnessmatrix%ELEMENT_MATRIX%matrix=0.0_dp
738 localerror=
"The third equations set specification of "// &
740 &
" is not valid for a Stree type of a fluid mechanics equations set." 744 exits(
"STREE_FINITE_ELEMENT_CALCULATE")
746 999 errorsexits(
"STREE_FINITE_ELEMENT_CALCULATE",err,error)
760 INTEGER(INTG),
INTENT(OUT) :: err
770 TYPE(
field_type),
POINTER :: materialsField,navierstokesDependentField
777 INTEGER(INTG) :: variableIdx,BOUNDARY_CONDITION_CHECK_VARIABLE,nodeIdx,componentIdx,derivativeIdx,versionIdx
778 INTEGER(INTG) :: dependentDof,dependentVariableType,userNodeNumber,m
779 REAL(DP) :: currentTime,timeIncrement,flow
781 enters(
"Stree_PRE_SOLVE",err,error,*999)
784 IF(
ASSOCIATED(solver))
THEN 785 solvers=>solver%SOLVERS
786 IF(
ASSOCIATED(solvers))
THEN 787 controlloop=>solvers%CONTROL_LOOP
789 parentloop=>controlloop%PARENT_LOOP
790 navierstokesloop=>parentloop%SUB_LOOPS(2)%PTR
791 navierstokessolver=>navierstokesloop%SOLVERS%SOLVERS(2)%PTR
792 IF(
ASSOCIATED(controlloop%PROBLEM))
THEN 793 SELECT CASE(controlloop%PROBLEM%specification(3))
796 solverequations=>solver%SOLVER_EQUATIONS
797 navierstokessolverequations=>navierstokessolver%SOLVER_EQUATIONS
798 IF(
ASSOCIATED(solverequations))
THEN 799 solvermapping=>solverequations%SOLVER_MAPPING
800 navierstokessolvermapping=>navierstokessolverequations%SOLVER_MAPPING
801 IF(
ASSOCIATED(solvermapping))
THEN 802 equationsset=>solvermapping%EQUATIONS_SETS(1)%PTR
803 navierstokesequationsset=>navierstokessolvermapping%EQUATIONS_SETS(1)%PTR
804 IF(
ASSOCIATED(equationsset))
THEN 805 equations=>equationsset%EQUATIONS
806 navierstokesequations=>navierstokesequationsset%EQUATIONS
807 IF(
ASSOCIATED(equations))
THEN 808 materialsfield=>equationsset%MATERIALS%MATERIALS_FIELD
809 navierstokesdependentfield=>navierstokesequationsset%DEPENDENT%DEPENDENT_FIELD
810 IF(.NOT.
ASSOCIATED(materialsfield))
THEN 811 CALL flag_error(
"Dependent field is not associated.",err,error,*999)
814 CALL flag_error(
"Equations set equations is not associated.",err,error,*999)
817 CALL flag_error(
"Equations set is not associated.",err,error,*999)
820 CALL flag_error(
"Solver mapping is not associated.",err,error,*999)
823 CALL flag_error(
"Solver equations is not associated.",err,error,*999)
826 localerror=
"The third problem specification of "// &
828 &
" is not valid for boundary flux calculation." 832 CALL flag_error(
"Problem is not associated.",err,error,*999)
835 CALL flag_error(
"Solvers is not associated.",err,error,*999)
838 CALL flag_error(
"Solver is not associated.",err,error,*999)
841 boundary_conditions=>navierstokessolverequations%BOUNDARY_CONDITIONS
842 DO variableidx=1,navierstokesdependentfield%NUMBER_OF_VARIABLES
843 dependentvariabletype=navierstokesdependentfield%VARIABLES(variableidx)%VARIABLE_TYPE
844 NULLIFY(dependentfieldvariable)
845 CALL field_variable_get(navierstokesdependentfield,dependentvariabletype,dependentfieldvariable,err,error,*999)
847 & dependentfieldvariable,boundary_conditions_variable,err,error,*999)
848 IF(
ASSOCIATED(boundary_conditions_variable))
THEN 849 IF(
ASSOCIATED(dependentfieldvariable))
THEN 850 DO componentidx=1,dependentfieldvariable%NUMBER_OF_COMPONENTS
851 IF(dependentfieldvariable%COMPONENTS(componentidx)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 852 domain=>dependentfieldvariable%COMPONENTS(componentidx)%DOMAIN
853 IF(
ASSOCIATED(domain))
THEN 854 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 855 domainnodes=>domain%TOPOLOGY%NODES
856 IF(
ASSOCIATED(domainnodes))
THEN 858 DO nodeidx=1,domainnodes%NUMBER_OF_NODES
859 usernodenumber=domainnodes%NODES(nodeidx)%USER_NUMBER
860 DO derivativeidx=1,domainnodes%NODES(nodeidx)%NUMBER_OF_DERIVATIVES
861 DO versionidx=1,domainnodes%NODES(nodeidx)%DERIVATIVES(derivativeidx)%numberOfVersions
862 dependentdof = dependentfieldvariable%COMPONENTS(componentidx)%PARAM_TO_DOF_MAP% &
863 & node_param2dof_map%NODES(nodeidx)%DERIVATIVES(derivativeidx)%VERSIONS(versionidx)
864 boundary_condition_check_variable=boundary_conditions_variable%CONDITION_TYPES(dependentdof)
867 IF(
ASSOCIATED(materialsfield))
THEN 868 CALL field_parameter_set_get_node(navierstokesdependentfield,field_u_variable_type, &
869 & field_values_set_type,versionidx,derivativeidx,nodeidx,1,flow,err,error,*999)
870 m=int(currenttime)-800*(int(currenttime)/800)
871 CALL field_parameter_set_update_local_node(materialsfield,field_v_variable_type, &
872 & field_values_set_type,versionidx,derivativeidx,m+1,1,flow,err,error,*999)
879 CALL flag_error(
"Domain topology nodes is not associated.",err,error,*999)
882 CALL flag_error(
"Domain topology is not associated.",err,error,*999)
885 CALL flag_error(
"Domain is not associated.",err,error,*999)
888 CALL flag_error(
"Only node based interpolation is implemented.",err,error,*999)
892 CALL flag_error(
"Dependent field variable is not associated.",err,error,*999)
897 exits(
"Stree_PRE_SOLVE")
899 999 errorsexits(
"Stree_PRE_SOLVE",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.
This module contains all coordinate transformation and support routines.
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.
This module handles all problem wide constants.
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.
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.
This module handles all equations matrix and rhs routines.
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.
This module contains all string manipulation and transformation routines.
Contains information on the solvers to be used in a control loop.
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.
subroutine, public equations_time_dependence_type_set(EQUATIONS, TIME_DEPENDENCE_TYPE, ERR, ERROR,)
Sets/changes the time dependence type for equations.
integer(intg), parameter equations_set_stree_equation_type
This module contains all mathematics support routines.
Contains information for a field defined on a region.
integer(intg), parameter, public equations_matrices_full_matrices
Use fully populated equation matrices.
subroutine, public stree_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the equation specification for a Stree type of a fluid mechanics equations set.
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.
Contains information on a control loop.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
integer(intg), parameter, public boundary_condition_fixed_stree
The dof is fixed and set to values specified based on the transmission line theory at the dof...
integer(intg), parameter equations_set_setup_equations_type
Equations setup.
This module handles all Stree equation routines.
This module contains all program wide constants.
subroutine, public equationsmapping_linearmatricesnumberset(EQUATIONS_MAPPING, NUMBER_OF_LINEAR_EQUATIONS_MATRICES, ERR, ERROR,)
Sets/changes the number of linear equations matrices.
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...
Contains information on the boundary conditions for a dependent field variable.
integer(intg), parameter equations_set_setup_start_action
Start setup action.
subroutine, public exits(NAME)
Records the exit out of the named procedure.
This module contains all type definitions in order to avoid cyclic module references.
Contains information on the equations matrices and vectors.
integer(intg), parameter, public equations_matrix_fem_structure
Finite element matrix structure.
subroutine, public stree_finite_element_calculate(equationsSet, nodeNumber, err, error,)
Evaluates the residual nodal stiffness matrices and RHS for a Stree equation nodal equations set...
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.
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, public stree_equationssetsetup(equationsSet, equationsSetSetup, err, error,)
Sets up the Stree equations fluid setup.
subroutine, public equations_set_equations_get(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Gets the equations for an equations set.
This module contains all computational environment variables.
This module contains CMISS MPI routines.
subroutine, public equations_create_finish(EQUATIONS, ERR, ERROR,)
Finish the creation of equations.
This module handles all domain mappings routines.
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 stree_pre_solve(solver, err, error,)
Evaluates the residual nodal stiffness matrices and RHS for a Stree equation nodal equations set...
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 equations_set_classical_field_class
integer(intg), parameter equations_linear
The equations are linear.
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.
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.
Contains information about an equations matrix.
Implements lists of Field IO operation.
This module contains all routines dealing with (non-distributed) matrix and vectors types...
subroutine, public stree_equationssetsolutionmethodset(equationsSet, solutionMethod, err, error,)
Sets/changes the solution method for a Stree equation type of an fluid mechanics equations set class...
subroutine, public equations_linearity_type_set(EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for equations.
Contains information on the solver mapping between the global equation sets and the solver matrices...
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.
Contains information on the setup information for an equations set.
integer(intg), parameter problem_stree1d0d_navier_stokes_subtype
A pointer to the domain decomposition for this domain.
This module handles all control loop routines.
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 boundary_conditions_variable_get(BOUNDARY_CONDITIONS, FIELD_VARIABLE, BOUNDARY_CONDITIONS_VARIABLE, ERR, ERROR,)
Find the boundary conditions variable for a given field variable.
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 equations_set_stree1d0d_subtype
Flags an error condition.
integer(intg), parameter equations_set_setup_initial_type
Initial setup.
Flags an error condition.
integer(intg), parameter equations_set_nodal_solution_method
Similar to Finite Element Method with looping over nodes instead of elements.
integer(intg), parameter problem_stree1d0d_adv_navier_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.
integer(intg), parameter equations_set_setup_finish_action
Finish setup action.