OpenCMISS-Iron Internal API Documentation
elasticity_routines.f90
Go to the documentation of this file.
1 
43 
46 
47  USE base_routines
51  USE input_output
53  USE kinds
56  USE strings
57  USE types
58 
59 #include "macros.h"
60 
61  IMPLICIT NONE
62 
63  PRIVATE
64 
65  !Module parameters
66 
67  !Module types
68 
69  !Module variables
70 
71  !Interfaces
72 
74 
76 
78 
80 
82 
84 
86 
88 
90 
92 
94 
96 
98 
100 
101 CONTAINS
102 
103  !
104  !================================================================================================================================
105  !
106 
108  SUBROUTINE elasticity_equationssetspecificationset(equationsSet,specification,err,error,*)
110  !Argument variables
111  TYPE(equations_set_type), POINTER :: equationsSet
112  INTEGER(INTG), INTENT(IN) :: specification(:)
113  INTEGER(INTG), INTENT(OUT) :: err
114  TYPE(varying_string), INTENT(OUT) :: error
115  !Local Variables
116  TYPE(varying_string) :: localError
117 
118  enters("Elasticity_EquationsSetSpecificationSet",err,error,*999)
119 
120  IF(ASSOCIATED(equationsset)) THEN
121  IF(SIZE(specification,1)<2) THEN
122  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
123  & err,error,*999)
124  END IF
125  SELECT CASE(specification(2))
127  CALL linearelasticity_equationssetspecificationset(equationsset,specification,err,error,*999)
129  CALL finiteelasticity_equationssetspecificationset(equationsset,specification,err,error,*999)
130  CASE DEFAULT
131  localerror="The second equations set specification of "//trim(numbertovstring(specification(2),"*",err,error))// &
132  & " is not valid for an elasticity equations set."
133  CALL flagerror(localerror,err,error,*999)
134  END SELECT
135  ELSE
136  CALL flagerror("Equations set is not associated.",err,error,*999)
137  END IF
138 
139  exits("Elasticity_EquationsSetSpecificationSet")
140  RETURN
141 999 errors("Elasticity_EquationsSetSpecificationSet",err,error)
142  exits("Elasticity_EquationsSetSpecificationSet")
143  RETURN 1
144 
146 
147  !
148  !================================================================================================================================
149  !
150 
152  SUBROUTINE elasticity_finite_element_calculate(EQUATIONS_SET,ELEMENT_NUMBER,ERR,ERROR,*)
154  !Argument variables
155  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
156  INTEGER(INTG), INTENT(IN) :: ELEMENT_NUMBER
157  INTEGER(INTG), INTENT(OUT) :: ERR
158  TYPE(varying_string), INTENT(OUT) :: ERROR
159  !Local Variables
160  TYPE(varying_string) :: LOCAL_ERROR
161 
162  enters("ELASTICITY_FINITE_ELEMENT_CALCULATE",err,error,*999)
163 
164  IF(ASSOCIATED(equations_set)) THEN
165  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
166  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
167  ELSE IF(SIZE(equations_set%SPECIFICATION,1)<2) THEN
168  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
169  & err,error,*999)
170  END IF
171  SELECT CASE(equations_set%SPECIFICATION(2))
173  CALL linear_elasticity_finite_element_calculate(equations_set,element_number,err,error,*999)
175  CALL flagerror("Not implemented.",err,error,*999)
176  CASE DEFAULT
177  local_error="Equations set type "//trim(number_to_vstring(equations_set%SPECIFICATION(2),"*",err,error))// &
178  & " is not valid for an elasticity equation set class."
179  CALL flagerror(local_error,err,error,*999)
180  END SELECT
181  ELSE
182  CALL flagerror("Equations set is not associated",err,error,*999)
183  ENDIF
184 
185  exits("ELASTICITY_FINITE_ELEMENT_CALCULATE")
186  RETURN
187 999 errorsexits("ELASTICITY_FINITE_ELEMENT_CALCULATE",err,error)
188  RETURN 1
190 
191  !
192  !================================================================================================================================
193  !
194 
196  SUBROUTINE elasticity_finite_element_jacobian_evaluate(EQUATIONS_SET,ELEMENT_NUMBER,ERR,ERROR,*)
198  !Argument variables
199  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
200  INTEGER(INTG), INTENT(IN) :: ELEMENT_NUMBER
201  INTEGER(INTG), INTENT(OUT) :: ERR
202  TYPE(varying_string), INTENT(OUT) :: ERROR
203  !Local Variables
204  TYPE(varying_string) :: LOCAL_ERROR
205 
206  enters("ELASTICITY_FINITE_ELEMENT_JACOBIAN_EVALUATE",err,error,*999)
207 
208  IF(ASSOCIATED(equations_set)) THEN
209  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
210  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
211  ELSE IF(SIZE(equations_set%SPECIFICATION,1)<2) THEN
212  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
213  & err,error,*999)
214  END IF
215  SELECT CASE(equations_set%SPECIFICATION(2))
217  CALL flagerror("Not implemented.",err,error,*999)
219  CALL finiteelasticity_finiteelementjacobianevaluate(equations_set,element_number,err,error,*999)
220  CASE DEFAULT
221  local_error="Equations set type "//trim(number_to_vstring(equations_set%SPECIFICATION(2),"*",err,error))// &
222  & " is not valid for an elasticity equation set class."
223  CALL flagerror(local_error,err,error,*999)
224  END SELECT
225  ELSE
226  CALL flagerror("Equations set is not associated",err,error,*999)
227  ENDIF
228 
229  exits("ELASTICITY_FINITE_ELEMENT_JACOBIAN_EVALUATE")
230  RETURN
231 999 errorsexits("ELASTICITY_FINITE_ELEMENT_JACOBIAN_EVALUATE",err,error)
232  RETURN 1
234 
235  !
236  !================================================================================================================================
237  !
238 
240  SUBROUTINE elasticity_finite_element_residual_evaluate(EQUATIONS_SET,ELEMENT_NUMBER,ERR,ERROR,*)
242  !Argument variables
243  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
244  INTEGER(INTG), INTENT(IN) :: ELEMENT_NUMBER
245  INTEGER(INTG), INTENT(OUT) :: ERR
246  TYPE(varying_string), INTENT(OUT) :: ERROR
247  !Local Variables
248  TYPE(varying_string) :: LOCAL_ERROR
249 
250  enters("ELASTICITY_FINITE_ELEMENT_RESIDUAL_EVALUATE",err,error,*999)
251 
252  IF(ASSOCIATED(equations_set)) THEN
253  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
254  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
255  ELSE IF(SIZE(equations_set%SPECIFICATION,1)<2) THEN
256  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
257  & err,error,*999)
258  END IF
259  SELECT CASE(equations_set%SPECIFICATION(2))
261  CALL flagerror("Not implemented.",err,error,*999)
263  CALL finiteelasticity_finiteelementresidualevaluate(equations_set,element_number,err,error,*999)
264  CASE DEFAULT
265  local_error="Equations set type "//trim(number_to_vstring(equations_set%SPECIFICATION(2),"*",err,error))// &
266  & " is not valid for an elasticity equation set class."
267  CALL flagerror(local_error,err,error,*999)
268  END SELECT
269  ELSE
270  CALL flagerror("Equations set is not associated",err,error,*999)
271  ENDIF
272 
273  exits("ELASTICITY_FINITE_ELEMENT_RESIDUAL_EVALUATE")
274  RETURN
275 999 errorsexits("ELASTICITY_FINITE_ELEMENT_RESIDUAL_EVALUATE",err,error)
276  RETURN 1
278 
279  !
280  !================================================================================================================================
281  !
282 
284  SUBROUTINE elasticity_finiteelementpreresidualevaluate(EQUATIONS_SET,ERR,ERROR,*)
286  !Argument variables
287  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
288  INTEGER(INTG), INTENT(OUT) :: ERR
289  TYPE(varying_string), INTENT(OUT) :: ERROR
290  !Local Variables
291  TYPE(varying_string) :: LOCAL_ERROR
292 
293  enters("Elasticity_FiniteElementPreResidualEvaluate",err,error,*999)
294 
295  IF(ASSOCIATED(equations_set)) THEN
296  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
297  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
298  ELSE IF(SIZE(equations_set%SPECIFICATION,1)<2) THEN
299  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
300  & err,error,*999)
301  END IF
302  SELECT CASE(equations_set%SPECIFICATION(2))
304  CALL flagerror("Cannot pre-evaluate the residual for a linear equations set.",err,error,*999)
306  CALL finiteelasticity_finiteelementpreresidualevaluate(equations_set,err,error,*999)
307  CASE DEFAULT
308  local_error="Equations set type "//trim(number_to_vstring(equations_set%SPECIFICATION(2),"*",err,error))// &
309  & " is not valid for an elasticity equation set class."
310  CALL flagerror(local_error,err,error,*999)
311  END SELECT
312  ELSE
313  CALL flagerror("Equations set is not associated",err,error,*999)
314  ENDIF
315 
316  exits("Elasticity_FiniteElementPreResidualEvaluate")
317  RETURN
318 999 errorsexits("Elasticity_FiniteElementPreResidualEvaluate",err,error)
319  RETURN 1
320 
322 
323  !
324  !================================================================================================================================
325  !
326 
328  SUBROUTINE elasticity_finiteelementpostresidualevaluate(EQUATIONS_SET,ERR,ERROR,*)
330  !Argument variables
331  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
332  INTEGER(INTG), INTENT(OUT) :: ERR
333  TYPE(varying_string), INTENT(OUT) :: ERROR
334  !Local Variables
335  TYPE(varying_string) :: LOCAL_ERROR
336 
337  enters("Elasticity_FiniteElementPostResidualEvaluate",err,error,*999)
338 
339  IF(ASSOCIATED(equations_set)) THEN
340  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
341  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
342  ELSE IF(SIZE(equations_set%SPECIFICATION,1)<2) THEN
343  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
344  & err,error,*999)
345  END IF
346  SELECT CASE(equations_set%SPECIFICATION(2))
348  CALL flagerror("Cannot post-evaluate the residual for a linear equations set.",err,error,*999)
350  CALL finiteelasticity_finiteelementpostresidualevaluate(equations_set,err,error,*999)
351  CASE DEFAULT
352  local_error="Equations set type "//trim(number_to_vstring(equations_set%SPECIFICATION(2),"*",err,error))// &
353  & " is not valid for an elasticity equation set class."
354  CALL flagerror(local_error,err,error,*999)
355  END SELECT
356  ELSE
357  CALL flagerror("Equations set is not associated",err,error,*999)
358  ENDIF
359 
360  exits("Elasticity_FiniteElementPostResidualEvaluate")
361  RETURN
362 999 errors("Elasticity_FiniteElementPostResidualEvaluate",err,error)
363  exits("Elasticity_FiniteElementPostResidualEvaluate")
364  RETURN 1
365 
367 
368  !
369  !================================================================================================================================
370  !
371 
373  SUBROUTINE elasticity_equations_set_setup(EQUATIONS_SET,EQUATIONS_SET_SETUP,ERR,ERROR,*)
375  !Argument variables
376  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
377  TYPE(equations_set_setup_type), INTENT(INOUT) :: EQUATIONS_SET_SETUP
378  INTEGER(INTG), INTENT(OUT) :: ERR
379  TYPE(varying_string), INTENT(OUT) :: ERROR
380  !Local Variables
381  TYPE(varying_string) :: LOCAL_ERROR
382 
383  enters("ELASTICITY_EQUATIONS_SET_SETUP",err,error,*999)
384 
385  IF(ASSOCIATED(equations_set)) THEN
386  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
387  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
388  ELSE IF(SIZE(equations_set%SPECIFICATION,1)<2) THEN
389  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
390  & err,error,*999)
391  END IF
392  SELECT CASE(equations_set%SPECIFICATION(2))
394  CALL linear_elasticity_equations_set_setup(equations_set,equations_set_setup,err,error,*999)
396  CALL finite_elasticity_equations_set_setup(equations_set,equations_set_setup,err,error,*999)
397  CASE DEFAULT
398  local_error="Equation set type "//trim(number_to_vstring(equations_set%SPECIFICATION(2),"*",err,error))// &
399  & " is not valid for an elasticity equations set class."
400  CALL flagerror(local_error,err,error,*999)
401  END SELECT
402  ELSE
403  CALL flagerror("Equations set is not associated.",err,error,*999)
404  ENDIF
405 
406  exits("ELASTICITY_EQUATIONS_SET_SETUP")
407  RETURN
408 999 errorsexits("ELASTICITY_EQUATIONS_SET_SETUP",err,error)
409  RETURN 1
410  END SUBROUTINE elasticity_equations_set_setup
411 
412  !
413  !================================================================================================================================
414  !
415 
417  SUBROUTINE elasticity_equationssetsolutionmethodset(EQUATIONS_SET,SOLUTION_METHOD,ERR,ERROR,*)
419  !Argument variables
420  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
421  INTEGER(INTG), INTENT(IN) :: SOLUTION_METHOD
422  INTEGER(INTG), INTENT(OUT) :: ERR
423  TYPE(varying_string), INTENT(OUT) :: ERROR
424  !Local Variables
425  TYPE(varying_string) :: LOCAL_ERROR
426 
427  enters("Elasticity_EquationsSetSolutionMethodSet",err,error,*999)
428 
429  IF(ASSOCIATED(equations_set)) THEN
430  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
431  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
432  ELSE IF(SIZE(equations_set%SPECIFICATION,1)<2) THEN
433  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
434  & err,error,*999)
435  END IF
436  SELECT CASE(equations_set%SPECIFICATION(2))
438  CALL linearelasticity_equationssetsolutionmethodset(equations_set,solution_method,err,error,*999)
440  CALL finiteelasticity_equationssetsolutionmethodset(equations_set,solution_method,err,error,*999)
441  CASE DEFAULT
442  local_error="Equations set equation type of "//trim(number_to_vstring(equations_set%SPECIFICATION(2),"*",err,error))// &
443  & " is not valid for an elasticity equations set class."
444  CALL flagerror(local_error,err,error,*999)
445  END SELECT
446  ELSE
447  CALL flagerror("Equations set is not associated",err,error,*999)
448  ENDIF
449 
450  exits("Elasticity_EquationsSetSolutionMethodSet")
451  RETURN
452 999 errorsexits("Elasticity_EquationsSetSolutionMethodSet",err,error)
453  RETURN 1
454 
456 
457  !
458  !================================================================================================================================
459  !
460 
462  SUBROUTINE elasticity_equationssetderivedvariablecalculate(equationsSet,derivedType,err,error,*)
464  !Argument variables
465  TYPE(equations_set_type), POINTER, INTENT(IN) :: equationsSet
466  INTEGER(INTG), INTENT(IN) :: derivedType
467  INTEGER(INTG), INTENT(OUT) :: err
468  TYPE(varying_string), INTENT(OUT) :: error
469 
470  enters("Elasticity_EquationsSetDerivedVariableCalculate",err,error,*999)
471 
472  IF(ASSOCIATED(equationsset)) THEN
473  IF(.NOT.equationsset%EQUATIONS_SET_FINISHED) THEN
474  CALL flagerror("Equations set has not been finished.",err,error,*999)
475  ELSE
476  SELECT CASE(equationsset%specification(2))
478  CALL flagerror("Not implemented.",err,error,*999)
480  CALL finiteelasticityequationsset_derivedvariablecalculate(equationsset,derivedtype, &
481  & err,error,*999)
482  CASE DEFAULT
483  CALL flagerror("The second equations set specification of "// &
484  & trim(number_to_vstring(equationsset%specification(2),"*",err,error))// &
485  & " is not valid for an elasticity equations set.",err,error,*999)
486  END SELECT
487  ENDIF
488  ELSE
489  CALL flagerror("Equations set is not associated.",err,error,*999)
490  ENDIF
491 
492  exits("Elasticity_EquationsSetDerivedVariableCalculate")
493  RETURN
494 999 errors("Elasticity_EquationsSetDerivedVariableCalculate",err,error)
495  exits("Elasticity_EquationsSetDerivedVariableCalculate")
496  RETURN 1
497 
499 
500  !
501  !================================================================================================================================
502  !
503 
505  SUBROUTINE elasticity_tensorinterpolatexi(equationsSet,tensorEvaluateType,userElementNumber,xi,values,err,error,*)
507  !Argument variables
508  TYPE(equations_set_type), POINTER, INTENT(IN) :: equationsSet
509  INTEGER(INTG), INTENT(IN) :: tensorEvaluateType
510  INTEGER(INTG), INTENT(IN) :: userElementNumber
511  REAL(DP), INTENT(IN) :: xi(:)
512  REAL(DP), INTENT(OUT) :: values(3,3)
513  INTEGER(INTG), INTENT(OUT) :: err
514  TYPE(varying_string), INTENT(OUT) :: error
515 
516  enters("Elasticity_TensorInterpolateXi",err,error,*999)
517 
518  IF(.NOT.ASSOCIATED(equationsset)) THEN
519  CALL flagerror("Equations set is not associated.",err,error,*999)
520  END IF
521 
522  SELECT CASE(equationsset%specification(2))
524  CALL flagerror("Not implemented.",err,error,*999)
526  CALL finiteelasticity_tensorinterpolatexi(equationsset,tensorevaluatetype,userelementnumber,xi,values,err,error,*999)
527  CASE DEFAULT
528  CALL flagerror("The second equations set specification of "// &
529  & trim(numbertovstring(equationsset%specification(2),"*",err,error))// &
530  & " is not valid for an elasticity equation set.",err,error,*999)
531  END SELECT
532 
533  exits("Elasticity_TensorInterpolateXi")
534  RETURN
535 999 errorsexits("Elasticity_TensorInterpolateXi",err,error)
536  RETURN 1
537  END SUBROUTINE elasticity_tensorinterpolatexi
538 
539  !
540  !================================================================================================================================
541  !
542 
544  SUBROUTINE elasticity_boundaryconditionsanalyticcalculate(EQUATIONS_SET,BOUNDARY_CONDITIONS,ERR,ERROR,*)
546  !Argument variables
547  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
548  TYPE(boundary_conditions_type), POINTER :: BOUNDARY_CONDITIONS
549  INTEGER(INTG), INTENT(OUT) :: ERR
550  TYPE(varying_string), INTENT(OUT) :: ERROR
551  !Local Variables
552  TYPE(varying_string) :: LOCAL_ERROR
553 
554  enters("Elasticity_BoundaryConditionsAnalyticCalculate",err,error,*999)
555 
556  IF(ASSOCIATED(equations_set)) THEN
557  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
558  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
559  ELSE IF(SIZE(equations_set%SPECIFICATION,1)<2) THEN
560  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
561  & err,error,*999)
562  END IF
563  SELECT CASE(equations_set%SPECIFICATION(2))
565  CALL linearelasticity_boundaryconditionsanalyticcalculate(equations_set,boundary_conditions,err,error,*999)
567  CALL finiteelasticity_boundaryconditionsanalyticcalculate(equations_set,boundary_conditions,err,error,*999)
568  CASE DEFAULT
569  local_error="Equations set equation type of "//trim(number_to_vstring(equations_set%SPECIFICATION(2),"*",err,error))// &
570  & " is not valid for an elasticity equations set class."
571  CALL flagerror(local_error,err,error,*999)
572  END SELECT
573  ELSE
574  CALL flagerror("Equations set is not associated",err,error,*999)
575  ENDIF
576 
577  exits("Elasticity_BoundaryConditionsAnalyticCalculate")
578  RETURN
579 999 errors("Elasticity_BoundaryConditionsAnalyticCalculate",err,error)
580  exits("Elasticity_BoundaryConditionsAnalyticCalculate")
581  RETURN 1
582 
584 
585  !
586  !================================================================================================================================
587  !
588 
590  SUBROUTINE elasticity_problemspecificationset(problem,problemSpecification,err,error,*)
592  !Argument variables
593  TYPE(problem_type), POINTER :: problem
594  INTEGER(INTG), INTENT(IN) :: problemSpecification(:)
595  INTEGER(INTG), INTENT(OUT) :: err
596  TYPE(varying_string), INTENT(OUT) :: error
597  !Local Variables
598  TYPE(varying_string) :: localError
599  INTEGER(INTG) :: problemType
600 
601  CALL enters("Elasticity_ProblemSpecificationSet",err,error,*999)
602 
603  IF(ASSOCIATED(problem)) THEN
604  IF(SIZE(problemspecification,1)>=2) THEN
605  problemtype=problemspecification(2)
606  SELECT CASE(problemtype)
608  CALL linearelasticity_problemspecificationset(problem,problemspecification,err,error,*999)
610  CALL finiteelasticity_problemspecificationset(problem,problemspecification,err,error,*999)
612  CALL flag_error("Not implemented yet.",err,error,*999)
614  CALL finiteelasticity_contactproblemspecificationset(problem,problemspecification,err,error,*999)
615  CASE DEFAULT
616  localerror="The second problem specification of "//trim(numbertovstring(problemtype,"*",err,error))// &
617  & " is not valid for an elasticity problem."
618  CALL flagerror(localerror,err,error,*999)
619  END SELECT
620  ELSE
621  CALL flagerror("Elasticity problem specification requires a type.",err,error,*999)
622  END IF
623  ELSE
624  CALL flagerror("Problem is not associated.",err,error,*999)
625  END IF
626 
627  CALL exits("Elasticity_ProblemSpecificationSet")
628  RETURN
629 999 CALL errors("Elasticity_ProblemSpecificationSet",err,error)
630  CALL exits("Elasticity_ProblemSpecificationSet")
631  RETURN 1
632 
634 
635  !
636  !================================================================================================================================
637  !
638 
640  SUBROUTINE elasticity_problem_setup(PROBLEM,PROBLEM_SETUP,ERR,ERROR,*)
642  !Argument variables
643  TYPE(problem_type), POINTER :: PROBLEM
644  TYPE(problem_setup_type), INTENT(INOUT) :: PROBLEM_SETUP
645  INTEGER(INTG), INTENT(OUT) :: ERR
646  TYPE(varying_string), INTENT(OUT) :: ERROR
647  !Local Variables
648  TYPE(varying_string) :: LOCAL_ERROR
649 
650  enters("ELASTICITY_PROBLEM_SETUP",err,error,*999)
651 
652  IF(ASSOCIATED(problem)) THEN
653  IF(.NOT.ALLOCATED(problem%SPECIFICATION)) THEN
654  CALL flagerror("Problem specification is not allocated.",err,error,*999)
655  ELSE IF(SIZE(problem%SPECIFICATION,1)<2) THEN
656  CALL flagerror("Problem specification must have at least two entries for an elasticity problem.",err,error,*999)
657  END IF
658  SELECT CASE(problem%SPECIFICATION(2))
660  CALL linear_elasticity_problem_setup(problem,problem_setup,err,error,*999)
662  CALL finite_elasticity_problem_setup(problem,problem_setup,err,error,*999)
664  CALL flagerror("Not implemented yet.",err,error,*999)
666  CALL finiteelasticity_contactproblemsetup(problem,problem_setup,err,error,*999)
667  CASE DEFAULT
668  local_error="Problem type "//trim(number_to_vstring(problem%SPECIFICATION(2),"*",err,error))// &
669  & " is not valid for an elasticity problem class."
670  CALL flagerror(local_error,err,error,*999)
671  END SELECT
672  ELSE
673  CALL flagerror("Problem is not associated.",err,error,*999)
674  ENDIF
675 
676  exits("ELASTICITY_PROBLEM_SETUP")
677  RETURN
678 999 errorsexits("ELASTICITY_PROBLEM_SETUP",err,error)
679  RETURN 1
680  END SUBROUTINE elasticity_problem_setup
681 
682  !
683  !================================================================================================================================
684  !
685 
687  SUBROUTINE elasticity_pre_solve(CONTROL_LOOP,SOLVER,ERR,ERROR,*)
689  !Argument variables
690  TYPE(control_loop_type), POINTER :: CONTROL_LOOP
691  TYPE(solver_type), POINTER :: SOLVER
692  INTEGER(INTG), INTENT(OUT) :: ERR
693  TYPE(varying_string), INTENT(OUT) :: ERROR
694  !Local Variables
695  TYPE(varying_string) :: LOCAL_ERROR
696 
697  enters("ELASTICITY_PRE_SOLVE",err,error,*999)
698 
699  IF(ASSOCIATED(control_loop%PROBLEM)) THEN
700  IF(.NOT.ALLOCATED(control_loop%PROBLEM%SPECIFICATION)) THEN
701  CALL flagerror("Problem specification is not allocated.",err,error,*999)
702  ELSE IF(SIZE(control_loop%PROBLEM%SPECIFICATION,1)<2) THEN
703  CALL flagerror("Problem specification must have at least two entries for an elasticity problem.",err,error,*999)
704  END IF
705  SELECT CASE(control_loop%PROBLEM%SPECIFICATION(2))
707  !Do Nothing
709  CALL finite_elasticity_pre_solve(control_loop,solver,err,error,*999)
711  !Do Nothing
713  !Do Nothing
714  CASE DEFAULT
715  local_error="Problem type "//trim(number_to_vstring(control_loop%PROBLEM%SPECIFICATION(2),"*",err,error))// &
716  & " is not valid for an elasticity problem class."
717  CALL flagerror(local_error,err,error,*999)
718  END SELECT
719  ELSE
720  CALL flagerror("Problem is not associated.",err,error,*999)
721  ENDIF
722 
723  exits("ELASTICITY_PRE_SOLVE")
724  RETURN
725 999 errorsexits("ELASTICITY_PRE_SOLVE",err,error)
726  RETURN 1
727 
728  END SUBROUTINE elasticity_pre_solve
729 
730  !
731  !================================================================================================================================
732  !
733 
735  SUBROUTINE elasticity_post_solve(CONTROL_LOOP,SOLVER,ERR,ERROR,*)
737  !Argument variables
738  TYPE(control_loop_type), POINTER :: CONTROL_LOOP
739  TYPE(solver_type), POINTER :: SOLVER
740  INTEGER(INTG), INTENT(OUT) :: ERR
741  TYPE(varying_string), INTENT(OUT) :: ERROR
742  !Local Variables
743  TYPE(varying_string) :: LOCAL_ERROR
744 
745  enters("ELASTICITY_POST_SOLVE",err,error,*999)
746 
747  IF(ASSOCIATED(control_loop%PROBLEM)) THEN
748  IF(.NOT.ALLOCATED(control_loop%PROBLEM%SPECIFICATION)) THEN
749  CALL flagerror("Problem specification is not allocated.",err,error,*999)
750  ELSE IF(SIZE(control_loop%PROBLEM%SPECIFICATION,1)<2) THEN
751  CALL flagerror("Problem specification must have at least two entries for an elasticity problem.",err,error,*999)
752  END IF
753  SELECT CASE(control_loop%PROBLEM%SPECIFICATION(2))
755  !Do Nothing
757  CALL finite_elasticity_post_solve(control_loop,solver,err,error,*999)
759  !Do Nothing
761  !Do Nothing
762  CASE DEFAULT
763  local_error="Problem type "//trim(number_to_vstring(control_loop%PROBLEM%SPECIFICATION(2),"*",err,error))// &
764  & " is not valid for an elasticity problem class."
765  CALL flagerror(local_error,err,error,*999)
766  END SELECT
767  ELSE
768  CALL flagerror("Problem is not associated.",err,error,*999)
769  ENDIF
770 
771  exits("ELASTICITY_POST_SOLVE")
772  RETURN
773 999 errorsexits("ELASTICITY_POST_SOLVE",err,error)
774  RETURN 1
775  END SUBROUTINE elasticity_post_solve
776 
777  !
778  !================================================================================================================================
779  !
780 
782  SUBROUTINE elasticity_control_loop_pre_loop(CONTROL_LOOP,ERR,ERROR,*)
784  !Argument variables
785  TYPE(control_loop_type), POINTER :: CONTROL_LOOP
786  INTEGER(INTG), INTENT(OUT) :: ERR
787  TYPE(varying_string), INTENT(OUT) :: ERROR
788  !Local Variables
789  TYPE(varying_string) :: LOCAL_ERROR
790  REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
791 
792  enters("ELASTICITY_CONTROL_LOOP_PRE_LOOP",err,error,*999)
793 
794  IF(ASSOCIATED(control_loop%PROBLEM)) THEN
795  SELECT CASE(control_loop%LOOP_TYPE)
797  CALL control_loop_current_times_get(control_loop,current_time,time_increment,err,error,*999)
798  CALL write_string(general_output_type,"====== Starting time step",err,error,*999)
799  CALL write_string_value(general_output_type,"CURRENT_TIME = ",current_time,err,error,*999)
800  CALL write_string_value(general_output_type,"TIME_INCREMENT = ",time_increment,err,error,*999)
801  IF(diagnostics1) THEN
802  CALL write_string(diagnostic_output_type,"====== Starting time step",err,error,*999)
803  CALL write_string_value(diagnostic_output_type,"CURRENT_TIME = ",current_time,err,error,*999)
804  CALL write_string_value(diagnostic_output_type,"TIME_INCREMENT = ",time_increment,err,error,*999)
805  ENDIF
806  IF(.NOT.ALLOCATED(control_loop%PROBLEM%SPECIFICATION)) THEN
807  CALL flagerror("Problem specification is not allocated.",err,error,*999)
808  ELSE IF(SIZE(control_loop%PROBLEM%SPECIFICATION,1)<2) THEN
809  CALL flagerror("Problem specification must have at least two entries for an elasticity problem.",err,error,*999)
810  END IF
811  SELECT CASE(control_loop%PROBLEM%SPECIFICATION(2))
813  !do nothing for now
815  CALL finiteelasticity_controltimelooppreloop(control_loop,err,error,*999)
816  CASE DEFAULT
817  local_error="Problem type "//trim(number_to_vstring(control_loop%PROBLEM%SPECIFICATION(2),"*",err,error))// &
818  & " is not valid for an elasticity problem class."
819  CALL flagerror(local_error,err,error,*999)
820  END SELECT
821  CASE DEFAULT
822  !do nothing
823  END SELECT
824  ELSE
825  CALL flagerror("Problem is not associated.",err,error,*999)
826  ENDIF
827 
828  exits("ELASTICITY_CONTROL_LOOP_PRE_LOOP")
829  RETURN
830 999 errorsexits("ELASTICITY_CONTROL_LOOP_PRE_LOOP",err,error)
831  RETURN 1
832  END SUBROUTINE elasticity_control_loop_pre_loop
833 
834  !
835  !================================================================================================================================
836  !
837 
839  SUBROUTINE elasticity_controllooppostloop(controlLoop,err,error,*)
841  !Argument variables
842  TYPE(control_loop_type), POINTER :: controlLoop
843  INTEGER(INTG), INTENT(OUT) :: ERR
844  TYPE(varying_string), INTENT(OUT) :: error
845  !Local Variables
846  TYPE(problem_type), POINTER :: problem
847  TYPE(varying_string) :: localError
848 
849  enters("Elasticity_ControlLoopPostLoop",err,error,*999)
850 
851  IF(ASSOCIATED(controlloop)) THEN
852  problem=>controlloop%PROBLEM
853  IF(ASSOCIATED(problem)) THEN
854  SELECT CASE(controlloop%LOOP_TYPE)
856  IF(.NOT.ALLOCATED(problem%specification)) THEN
857  CALL flagerror("Problem specification is not allocated.",err,error,*999)
858  ELSE IF(SIZE(problem%specification,1)<2) THEN
859  CALL flagerror("Problem specification must have at least two entries for an elasticity problem.",err,error,*999)
860  END IF
861  SELECT CASE(problem%specification(2))
863  !Do nothing
865  CALL finiteelasticity_controlloadincrementlooppostloop(controlloop,err,error,*999)
866  CASE DEFAULT
867  localerror="Problem type "//trim(number_to_vstring(problem%SPECIFICATION(2),"*",err,error))// &
868  & " is not valid for a elasticity problem class."
869  CALL flagerror(localerror,err,error,*999)
870  END SELECT
871  CASE DEFAULT
872  !do nothing
873  END SELECT
874  ELSE
875  CALL flagerror("Problem is not associated.",err,error,*999)
876  ENDIF
877  ELSE
878  CALL flagerror("Control loop is not associated.",err,error,*999)
879  ENDIF
880 
881  exits("Elasticity_ControlLoopPostLoop")
882  RETURN
883 999 errorsexits("Elasticity_ControlLoopPostLoop",err,error)
884  RETURN 1
885  END SUBROUTINE elasticity_controllooppostloop
886 
887  !
888  !================================================================================================================================
889  !
890 
892  SUBROUTINE elasticity_load_increment_apply(EQUATIONS_SET,ITERATION_NUMBER,MAXIMUM_NUMBER_OF_ITERATIONS,ERR,ERROR,*)
894  !Argument variables
895  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
896  INTEGER(INTG), INTENT(IN) :: ITERATION_NUMBER
897  INTEGER(INTG), INTENT(IN) :: MAXIMUM_NUMBER_OF_ITERATIONS
898  INTEGER(INTG), INTENT(OUT) :: ERR
899  TYPE(varying_string), INTENT(OUT) :: ERROR
900 
901  enters("ELASTICITY_LOAD_INCREMENT_APPLY",err,error,*999)
902 
903  IF(ASSOCIATED(equations_set)) THEN
904  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
905  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
906  ELSE IF(SIZE(equations_set%SPECIFICATION,1)<2) THEN
907  CALL flagerror("Equations set specification must have at least two entries for an elasticity class equations set.", &
908  & err,error,*999)
909  END IF
910  SELECT CASE(equations_set%SPECIFICATION(2))
912  CALL finite_elasticity_load_increment_apply(equations_set,iteration_number,maximum_number_of_iterations,err,error,*999)
913  CASE DEFAULT
914  !Do nothing
915  END SELECT
916  ELSE
917  CALL flagerror("Equations set is not associated.",err,error,*999)
918  ENDIF
919 
920  exits("ELASTICITY_LOAD_INCREMENT_APPLY")
921  RETURN
922 999 errorsexits("ELASTICITY_LOAD_INCREMENT_APPLY",err,error)
923  RETURN 1
924 
925  END SUBROUTINE elasticity_load_increment_apply
926 
927  !
928  !================================================================================================================================
929  !
930 
931 END MODULE elasticity_routines
932 
Contains information on the boundary conditions for the solver equations.
Definition: types.f90:1780
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
Write a string followed by a value to a given output stream.
subroutine, public finite_elasticity_equations_set_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the finite elasticity equation type of an elasticity equations set class. ...
subroutine, public finite_elasticity_post_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the finite elasticity problem post solve.
integer(intg), parameter problem_control_time_loop_type
Time control loop.
subroutine, public elasticity_finiteelementpostresidualevaluate(EQUATIONS_SET, ERR, ERROR,)
Post-evaluates the residual for an elasticity class finite element equation set.
This module handles all problem wide constants.
subroutine, public elasticity_problemspecificationset(problem, problemSpecification, err, error,)
Sets/changes the problem type and subtype for an elasticity problem class.
Converts a number to its equivalent varying string representation.
Definition: strings.f90:161
subroutine, public elasticity_equations_set_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the equations set for an elasticity equations set class.
subroutine, public linear_elasticity_finite_element_calculate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Calculates the element stiffness matrices and RHS for a linear elasticity finite element equations se...
subroutine, public elasticity_controllooppostloop(controlLoop, err, error,)
Executes after each loop of a control loop.
Contains information on the type of solver to be used.
Definition: types.f90:2777
integer(intg), parameter problem_linear_elasticity_contact_type
subroutine, public elasticity_tensorinterpolatexi(equationsSet, tensorEvaluateType, userElementNumber, xi, values, err, error,)
Evaluate a tensor at a given element xi location.
This module handles all elasticity class routines.
Contains information on an equations set.
Definition: types.f90:1941
subroutine, public finiteelasticity_equationssetsolutionmethodset(EQUATIONS_SET, SOLUTION_METHOD, ERR, ERROR,)
Sets/changes the solution method for a finite elasticity equation type of an elasticity equations set...
subroutine, public finiteelasticity_tensorinterpolatexi(equationsSet, tensorEvaluateType, userElementNumber, xi, values, err, error,)
Evaluates a tensor at a given element xi location.
This module contains all string manipulation and transformation routines.
Definition: strings.f90:45
integer(intg), parameter equations_set_linear_elasticity_type
subroutine, public linearelasticity_problemspecificationset(problem, problemSpecification, err, error,)
Sets the problem specification for a linear elasticity type problem.
subroutine, public linear_elasticity_equations_set_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the Linear elasticity equation type of an elasticity equations set class. ...
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 linearelasticity_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the equation specification for a linear elasticity equation type of an elasticity equations set ...
subroutine, public finiteelasticity_boundaryconditionsanalyticcalculate(EQUATIONS_SET, BOUNDARY_CONDITIONS, ERR, ERROR,)
Calculates the analytic solution and sets the boundary conditions for an analytic problem...
Contains information on a control loop.
Definition: types.f90:3185
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
subroutine, public finiteelasticity_finiteelementpostresidualevaluate(EQUATIONS_SET, ERR, ERROR,)
Post-evaluates the residual for a finite elasticity finite element equations set. ...
subroutine, public elasticity_post_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the output type for an elasticity problem class.
subroutine, public elasticity_finite_element_jacobian_evaluate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Evaluates the Jacobian for the given element number for an elasticity class finite element equation s...
integer(intg), parameter problem_finite_elasticity_type
subroutine, public elasticity_boundaryconditionsanalyticcalculate(EQUATIONS_SET, BOUNDARY_CONDITIONS, ERR, ERROR,)
Sets the analytic boundary conditions for an elasticity equation set class.
subroutine, public finiteelasticity_contactproblemspecificationset(problem, problemSpecification, err, error,)
Sets/changes the problem subtype for a finite elasticity contact type .
subroutine, public exits(NAME)
Records the exit out of the named procedure.
subroutine, public elasticity_pre_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Performs pre-solve actions for an elasticity problem class.
subroutine, public elasticity_finite_element_residual_evaluate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Evaluates the residual and rhs vector for the given element number for an elasticity class finite ele...
This module contains all type definitions in order to avoid cyclic module references.
Definition: types.f90:70
Write a string to a given output stream.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
integer(intg), parameter, public general_output_type
General output type.
integer(intg), parameter problem_finite_elasticity_contact_type
subroutine, public finiteelasticity_finiteelementpreresidualevaluate(EQUATIONS_SET, ERR, ERROR,)
Pre-evaluates the residual for a finite elasticity finite element equations set.
subroutine, public elasticity_equationssetsolutionmethodset(EQUATIONS_SET, SOLUTION_METHOD, ERR, ERROR,)
Sets/changes the solution method for an elasticity equation set class.
subroutine, public elasticity_control_loop_pre_loop(CONTROL_LOOP, ERR, ERROR,)
Executes before each loop of a control loop, ie before each time step for a time loop.
subroutine, public elasticity_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the problem specification for an elasticity equation set class.
subroutine, public finiteelasticity_finiteelementjacobianevaluate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Evaluates the element Jacobian matrix for the given element number for a finite elasticity class fini...
subroutine, public elasticity_finite_element_calculate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Calculates the element stiffness matries and rhs vector for the given element number for an elasticit...
subroutine, public finiteelasticityequationsset_derivedvariablecalculate(equationsSet, derivedType, err, error,)
Calculated an output field for a finite elasticity equations set.
Contains information for a problem.
Definition: types.f90:3221
logical, save, public diagnostics1
.TRUE. if level 1 diagnostic output is active in the current routine
subroutine, public finiteelasticity_finiteelementresidualevaluate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Evaluates the residual and RHS vectors for a finite elasticity finite element equations set...
integer(intg), parameter equations_set_finite_elasticity_type
subroutine, public elasticity_load_increment_apply(EQUATIONS_SET, ITERATION_NUMBER, MAXIMUM_NUMBER_OF_ITERATIONS, ERR, ERROR,)
Apply load increments for equations sets.
subroutine, public elasticity_finiteelementpreresidualevaluate(EQUATIONS_SET, ERR, ERROR,)
Pre-evaluates the residual for an elasticity class finite element equation set.
integer(intg), parameter, public diagnostic_output_type
Diagnostic output type.
subroutine, public linearelasticity_equationssetsolutionmethodset(EQUATIONS_SET, SOLUTION_METHOD, ERR, ERROR,)
Sets/changes the solution method for a linear elasticity equation type of an elasticity equations set...
subroutine, public linearelasticity_boundaryconditionsanalyticcalculate(EQUATIONS_SET, BOUNDARY_CONDITIONS, ERR, ERROR,)
Calculates the analytic solution and sets the boundary conditions for an analytic problem...
subroutine, public finite_elasticity_pre_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the finite elasticity problem pre-solve.
subroutine, public finiteelasticity_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the equation specification for a finite elasticity equation type of an elasticity equations set ...
integer(intg), parameter problem_control_load_increment_loop_type
Load increment control loop.
Contains information on the setup information for an equations set.
Definition: types.f90:1866
This module handles all control loop routines.
subroutine, public finiteelasticity_controlloadincrementlooppostloop(controlLoop, err, error,)
Executes after each loop of a control loop for finite elasticity problems, i.e., after each load incr...
subroutine, public errors(NAME, ERR, ERROR)
Records the exiting error of the subroutine.
This module defines all constants shared across equations set routines.
This module handles all linear elasticity routines.
integer(intg), parameter problem_linear_elasticity_type
Flags an error condition.
subroutine, public finite_elasticity_problem_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the finite elasticity problem.
subroutine, public linear_elasticity_problem_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the linear elasticity problem.
Flags an error condition.
subroutine, public finiteelasticity_controltimelooppreloop(CONTROL_LOOP, ERR, ERROR,)
Runs before each time loop for a finite elasticity problem.
subroutine, public elasticity_equationssetderivedvariablecalculate(equationsSet, derivedType, err, error,)
Calculates a derived value for the elasticity equations set.
This module handles all finite elasticity routines.
This module contains all kind definitions.
Definition: kinds.f90:45
subroutine, public finite_elasticity_load_increment_apply(EQUATIONS_SET, ITERATION_NUMBER, MAXIMUM_NUMBER_OF_ITERATIONS, ERR, ERROR,)
Apply load increments to the gravity vector.
subroutine, public finiteelasticity_problemspecificationset(problem, problemSpecification, err, error,)
Sets the problem specification for a finite elasticity type problem.
subroutine, public finiteelasticity_contactproblemsetup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the finite elasticity problem.
subroutine, public elasticity_problem_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the problem for an elasticity problem class.
This module handles all formating and input and output.