OpenCMISS-Iron Internal API Documentation
Helmholtz_equations_routines.f90
Go to the documentation of this file.
1 
43 
46 
47  USE base_routines
48  USE basis_routines
50  USE constants
53  USE domain_mappings
58  USE field_routines
59  USE input_output
61  USE kinds
62  USE matrix_vector
63  USE node_routines
65  USE strings
66  USE solver_routines
67  USE timer
68  USE types
69 
70 #include "macros.h"
71 
72  IMPLICIT NONE
73 
74  PRIVATE
75 
76  !Module parameters
77 
78  !Module types
79 
80  !Module variables
81 
82  !Interfaces
83 
84 !!MERGE: move
85 
86  PUBLIC helmholtz_boundaryconditionsanalyticcalculate
87 
88  PUBLIC helmholtz_equationssetsolutionmethodset
89 
90  PUBLIC helmholtz_equation_equations_set_setup
91 
92  PUBLIC helmholtz_equationssetspecificationset
93 
94  PUBLIC helmholtz_equation_finite_element_calculate
95 
96  PUBLIC helmholtz_equation_problem_setup
97 
98  PUBLIC helmholtz_problemspecificationset
99 
100 CONTAINS
101 
102  !
103  !================================================================================================================================
104  !
105 
106 
108  SUBROUTINE helmholtz_boundaryconditionsanalyticcalculate(EQUATIONS_SET,BOUNDARY_CONDITIONS,ERR,ERROR,*)
110  !Argument variables
111  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
112  TYPE(boundary_conditions_type), POINTER :: BOUNDARY_CONDITIONS
113  INTEGER(INTG), INTENT(OUT) :: ERR
114  TYPE(varying_string), INTENT(OUT) :: ERROR
115  !Local Variables
116  INTEGER(INTG) :: component_idx,node_idx,NUMBER_OF_DIMENSIONS,variable_idx,variable_type,local_ny,deriv_idx,dim_idx
117  REAL(DP), POINTER :: GEOMETRIC_PARAMETERS(:), MATERIALS_PARAMETERS(:)
118  TYPE(domain_type), POINTER :: DOMAIN
119  TYPE(domain_nodes_type), POINTER :: DOMAIN_NODES
120  TYPE(field_type), POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,MATERIALS_FIELD
121  TYPE(field_variable_type), POINTER :: FIELD_VARIABLE,GEOMETRIC_VARIABLE,MATERIALS_VARIABLE
122  REAL(DP) :: VALUE,X(3),k,mu
123  TYPE(varying_string) :: LOCAL_ERROR
124 
125  enters("Helmholtz_BoundaryConditionsAnalyticCalculate",err,error,*999)
126 
127  IF(ASSOCIATED(equations_set)) THEN
128  IF(ASSOCIATED(equations_set%ANALYTIC)) THEN
129  dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
130  IF(ASSOCIATED(dependent_field)) THEN
131  geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
132  IF(ASSOCIATED(geometric_field)) THEN
133  materials_field=>equations_set%MATERIALS%MATERIALS_FIELD
134  IF(ASSOCIATED(materials_field)) THEN
135  CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
136  NULLIFY(geometric_variable)
137  NULLIFY(geometric_parameters)
138  CALL field_variable_get(geometric_field,field_u_variable_type,geometric_variable,err,error,*999)
139  CALL field_parameter_set_data_get(geometric_field,field_u_variable_type,field_values_set_type,geometric_parameters, &
140  & err,error,*999)
141  NULLIFY(materials_variable)
142  NULLIFY(materials_parameters)
143  CALL field_variable_get(materials_field,field_u_variable_type,materials_variable,err,error,*999)
144  CALL field_parameter_set_data_get(materials_field,field_u_variable_type,field_values_set_type,materials_parameters, &
145  & err,error,*999)
146  IF(ASSOCIATED(boundary_conditions)) THEN
147  DO variable_idx=1,dependent_field%NUMBER_OF_VARIABLES
148  variable_type=dependent_field%VARIABLES(variable_idx)%VARIABLE_TYPE
149  field_variable=>dependent_field%VARIABLE_TYPE_MAP(variable_type)%PTR
150  IF(ASSOCIATED(field_variable)) THEN
151  CALL field_parameter_set_create(dependent_field,variable_type,field_analytic_values_set_type,err,error,*999)
152  DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
153  IF(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE==field_node_based_interpolation) THEN
154  IF(materials_variable%COMPONENTS(1)%INTERPOLATION_TYPE==field_constant_interpolation) THEN
155  local_ny=materials_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%CONSTANT_PARAM2DOF_MAP
156  k=materials_parameters(local_ny)
157  mu=k/sqrt(2.0_dp)
158  domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
159  IF(ASSOCIATED(domain)) THEN
160  IF(ASSOCIATED(domain%TOPOLOGY)) THEN
161  domain_nodes=>domain%TOPOLOGY%NODES
162  IF(ASSOCIATED(domain_nodes)) THEN
163  !Loop over the local nodes excluding the ghosts.
164  DO node_idx=1,domain_nodes%NUMBER_OF_NODES
165  !!TODO \todo We should interpolate the geometric field here and the node position.
166  DO dim_idx=1,number_of_dimensions
167  local_ny=geometric_variable%COMPONENTS(dim_idx)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP% &
168  & nodes(node_idx)%DERIVATIVES(1)%VERSIONS(1)
169  x(dim_idx)=geometric_parameters(local_ny)
170  ENDDO !dim_idx
171  !Loop over the derivatives
172  DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
173  SELECT CASE(equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE)
175  !u=cos(k*x/sqrt(2))*sin(k*y/sqrt(2))
176  SELECT CASE(variable_type)
177  CASE(field_u_variable_type)
178  SELECT CASE(domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX)
179  CASE(no_global_deriv)
180  VALUE=cos(mu*x(1))*sin(mu*x(2))
181  CASE(global_deriv_s1)
182  VALUE=-mu*sin(mu*x(1))*sin(mu*x(2))
183  CASE(global_deriv_s2)
184  VALUE=mu*cos(mu*x(1))*cos(mu*x(2))
185  CASE(global_deriv_s1_s2)
186  VALUE=-mu*mu*sin(mu*x(1))*cos(mu*x(2))
187  CASE DEFAULT
188  local_error="The global derivative index of "//trim(number_to_vstring( &
189  & domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX,"*", &
190  & err,error))//" is invalid."
191  CALL flagerror(local_error,err,error,*999)
192  END SELECT
193  CASE(field_deludeln_variable_type)
194  SELECT CASE(domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX)
195  CASE(no_global_deriv)
196  VALUE=0.0_dp !!TODO
197  CASE(global_deriv_s1)
198  CALL flagerror("Not implemented.",err,error,*999)
199  CASE(global_deriv_s2)
200  CALL flagerror("Not implemented.",err,error,*999)
201  CASE(global_deriv_s1_s2)
202  CALL flagerror("Not implemented.",err,error,*999)
203  CASE DEFAULT
204  local_error="The global derivative index of "//trim(number_to_vstring( &
205  & domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX,"*", &
206  & err,error))//" is invalid."
207  CALL flagerror(local_error,err,error,*999)
208  END SELECT
209  CASE DEFAULT
210  local_error="The variable type of "//trim(number_to_vstring(variable_type,"*",err,error))//&
211  & " is invalid."
212  CALL flagerror(local_error,err,error,*999)
213  END SELECT
214  CASE DEFAULT
215  local_error="The analytic function type of "// &
216  & trim(number_to_vstring(equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE,"*",err,error))// &
217  & " is invalid."
218  CALL flagerror(local_error,err,error,*999)
219  END SELECT
220  local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
221  & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
222  CALL field_parameter_set_update_local_dof(dependent_field,variable_type, &
223  & field_analytic_values_set_type,local_ny,VALUE,err,error,*999)
224  IF(variable_type==field_u_variable_type) THEN
225  IF(domain_nodes%NODES(node_idx)%BOUNDARY_NODE) THEN
226  !If we are a boundary node then set the analytic value on the boundary
227  CALL boundary_conditions_set_local_dof(boundary_conditions,dependent_field,variable_type, &
228  & local_ny,boundary_condition_fixed,VALUE,err,error,*999)
229  ENDIF
230  ENDIF
231  ENDDO !deriv_idx
232  ENDDO !node_idx
233  ELSE
234  CALL flagerror("Domain topology nodes is not associated.",err,error,*999)
235  ENDIF
236  ELSE
237  CALL flagerror("Domain topology is not associated.",err,error,*999)
238  ENDIF
239  ELSE
240  CALL flagerror("Domain is not associated.",err,error,*999)
241  ENDIF
242  ELSE
243  CALL flagerror("Only constant interpolation of the material field is implemented.",err,error,*999)
244  ENDIF
245  ELSE
246  CALL flagerror("Only node based interpolation is implemented.",err,error,*999)
247  ENDIF
248  ENDDO !component_idx
249  CALL field_parameter_set_update_start(dependent_field,variable_type,field_analytic_values_set_type, &
250  & err,error,*999)
251  CALL field_parameter_set_update_finish(dependent_field,variable_type,field_analytic_values_set_type, &
252  & err,error,*999)
253  ELSE
254  CALL flagerror("Field variable is not associated.",err,error,*999)
255  ENDIF
256 
257  ENDDO !variable_idx
258  CALL field_parameter_set_data_restore(geometric_field,field_u_variable_type,field_values_set_type, &
259  & geometric_parameters,err,error,*999)
260  ELSE
261  CALL flagerror("Boundary conditions is not associated.",err,error,*999)
262  ENDIF
263  ELSE
264  CALL flagerror("Equations set materials field is not associated.",err,error,*999)
265  ENDIF
266  ELSE
267  CALL flagerror("Equations set geometric field is not associated.",err,error,*999)
268  ENDIF
269  ELSE
270  CALL flagerror("Equations set dependent field is not associated.",err,error,*999)
271  ENDIF
272  ELSE
273  CALL flagerror("Equations set analytic is not associated.",err,error,*999)
274  ENDIF
275  ELSE
276  CALL flagerror("Equations set is not associated.",err,error,*999)
277  ENDIF
278 
279  exits("Helmholtz_BoundaryConditionsAnalyticCalculate")
280  RETURN
281 999 errors("Helmholtz_BoundaryConditionsAnalyticCalculate",err,error)
282  exits("Helmholtz_BoundaryConditionsAnalyticCalculate")
283  RETURN 1
284 
285  END SUBROUTINE helmholtz_boundaryconditionsanalyticcalculate
286 
287  !
288  !================================================================================================================================
289  !
290 
292  SUBROUTINE helmholtz_equation_finite_element_calculate(EQUATIONS_SET,ELEMENT_NUMBER,ERR,ERROR,*)
294  !Argument variables
295  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
296  INTEGER(INTG), INTENT(IN) :: ELEMENT_NUMBER
297  INTEGER(INTG), INTENT(OUT) :: ERR
298  TYPE(varying_string), INTENT(OUT) :: ERROR
299  !Local Variables
300  INTEGER(INTG) FIELD_VAR_TYPE,ng,mh,mhs,mi,ms,nh,nhs,ni,ns
301  REAL(DP) :: RWG,SUM,PGMSI(3),PGNSI(3),PGM,PGN,k
302  TYPE(basis_type), POINTER :: DEPENDENT_BASIS,GEOMETRIC_BASIS
303  TYPE(equations_type), POINTER :: EQUATIONS
304  TYPE(equations_mapping_type), POINTER :: EQUATIONS_MAPPING
305  TYPE(equations_mapping_linear_type), POINTER :: LINEAR_MAPPING
306  TYPE(equations_matrices_type), POINTER :: EQUATIONS_MATRICES
307  TYPE(equations_matrices_linear_type), POINTER :: LINEAR_MATRICES
308  TYPE(equations_matrices_rhs_type), POINTER :: RHS_VECTOR
309  TYPE(equations_matrix_type), POINTER :: EQUATIONS_MATRIX
310  TYPE(field_type), POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,MATERIALS_FIELD
311  TYPE(field_variable_type), POINTER :: FIELD_VARIABLE
312  TYPE(quadrature_scheme_type), POINTER :: QUADRATURE_SCHEME
313  TYPE(varying_string) :: LOCAL_ERROR
314 
315 #ifdef TAUPROF
316  CHARACTER(26) :: CVAR
317  INTEGER :: GAUSS_POINT_LOOP_PHASE(2) = (/ 0, 0 /)
318  SAVE gauss_point_loop_phase
319 #endif
320 
321  enters("HELMHOLTZ_EQUATION_FINITE_ELEMENT_CALCULATE",err,error,*999)
322 
323  IF(ASSOCIATED(equations_set)) THEN
324  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
325  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
326  ELSE IF(SIZE(equations_set%SPECIFICATION,1)/=3) THEN
327  CALL flagerror("Equations set specification must have three entries for a Helmholtz type equations set.", &
328  & err,error,*999)
329  END IF
330  equations=>equations_set%EQUATIONS
331  IF(ASSOCIATED(equations)) THEN
332  SELECT CASE(equations_set%SPECIFICATION(3))
334 !!TODO: move these and scale factor adjustment out once generalised Helmholtz is put in.
335  !Store all these in equations matrices/somewhere else?????
336  dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
337  geometric_field=>equations%INTERPOLATION%GEOMETRIC_FIELD
338  materials_field=>equations%INTERPOLATION%MATERIALS_FIELD
339  equations_matrices=>equations%EQUATIONS_MATRICES
340  linear_matrices=>equations_matrices%LINEAR_MATRICES
341  equations_matrix=>linear_matrices%MATRICES(1)%PTR
342  rhs_vector=>equations_matrices%RHS_VECTOR
343  equations_mapping=>equations%EQUATIONS_MAPPING
344  linear_mapping=>equations_mapping%LINEAR_MAPPING
345  field_variable=>linear_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
346  field_var_type=field_variable%VARIABLE_TYPE
347  dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(dependent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
348  & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
349  geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
350  & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
351  quadrature_scheme=>dependent_basis%QUADRATURE%QUADRATURE_SCHEME_MAP(basis_default_quadrature_scheme)%PTR
352  CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
353  & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
354  CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
355  & materials_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
356  !Loop over gauss points
357  DO ng=1,quadrature_scheme%NUMBER_OF_GAUSS
358 #ifdef TAUPROF
359  WRITE (cvar,'(a17,i2)') 'Gauss Point Loop ',ng
360  CALL tau_phase_create_dynamic(gauss_point_loop_phase,cvar)
361  CALL tau_phase_start(gauss_point_loop_phase)
362 #endif
363  CALL field_interpolate_gauss(first_part_deriv,basis_default_quadrature_scheme,ng,equations%INTERPOLATION% &
364  & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
365  CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
366  & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
367 
368  CALL field_interpolate_gauss(first_part_deriv,basis_default_quadrature_scheme,ng,equations%INTERPOLATION% &
369  & materials_interp_point(field_u_variable_type)%PTR,err,error,*999)
370  k = equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,no_part_deriv) ! wave number
371 
372  !Calculate RWG.
373 !!TODO: Think about symmetric problems.
374  rwg=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
375  & quadrature_scheme%GAUSS_WEIGHTS(ng)
376  !Loop over field components
377  mhs=0
378  DO mh=1,field_variable%NUMBER_OF_COMPONENTS
379  !Loop over element rows
380 !!TODO: CHANGE ELEMENT CALCULATE TO WORK OF ns ???
381  DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
382  mhs=mhs+1
383  nhs=0
384  IF(equations_matrix%UPDATE_MATRIX) THEN
385  !Loop over element columns
386  DO nh=1,field_variable%NUMBER_OF_COMPONENTS
387  DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
388  nhs=nhs+1
389  pgm=quadrature_scheme%GAUSS_BASIS_FNS(ms,no_part_deriv,ng)
390  pgn=quadrature_scheme%GAUSS_BASIS_FNS(ns,no_part_deriv,ng)
391  DO ni=1,dependent_basis%NUMBER_OF_XI
392  pgmsi(ni)=quadrature_scheme%GAUSS_BASIS_FNS(ms,partial_derivative_first_derivative_map(ni),ng)
393  pgnsi(ni)=quadrature_scheme%GAUSS_BASIS_FNS(ns,partial_derivative_first_derivative_map(ni),ng)
394  ENDDO !ni
395  sum=0.0_dp
396  sum=sum-k*k*pgm*pgn
397  DO mi=1,dependent_basis%NUMBER_OF_XI
398  DO ni=1,dependent_basis%NUMBER_OF_XI
399  sum=sum+pgmsi(mi)*pgnsi(ni)*equations%INTERPOLATION% &
400  & geometric_interp_point_metrics(field_u_variable_type)%PTR%GU(mi,ni)
401  ENDDO !ni
402  ENDDO !mi
403  equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+sum*rwg
404  ENDDO !ns
405  ENDDO !nh
406  ENDIF
407  IF(rhs_vector%UPDATE_VECTOR) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=0.0_dp
408  ENDDO !ms
409  ENDDO !mh
410 #ifdef TAUPROF
411  CALL tau_phase_stop(gauss_point_loop_phase)
412 #endif
413  ENDDO !ng
414 
415  !Scale factor adjustment
416  IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling) THEN
417  CALL field_interpolationparametersscalefactorselementget(element_number,equations%INTERPOLATION% &
418  & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
419  mhs=0
420  DO mh=1,field_variable%NUMBER_OF_COMPONENTS
421  !Loop over element rows
422  DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
423  mhs=mhs+1
424  nhs=0
425  IF(equations_matrix%UPDATE_MATRIX) THEN
426  !Loop over element columns
427  DO nh=1,field_variable%NUMBER_OF_COMPONENTS
428  DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
429  nhs=nhs+1
430  equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
431  & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
432  & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
433  ENDDO !ns
434  ENDDO !nh
435  ENDIF
436  IF(rhs_vector%UPDATE_VECTOR) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
437  & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
438  ENDDO !ms
439  ENDDO !mh
440  ENDIF
442  CALL flagerror("Not implemented.",err,error,*999)
443  CASE DEFAULT
444  local_error="Equations set subtype "//trim(number_to_vstring(equations_set%SPECIFICATION(3),"*",err,error))// &
445  & " is not valid for a Helmholtz equation type of a classical field equations set class."
446  CALL flagerror(local_error,err,error,*999)
447  END SELECT
448 
449  ELSE
450  CALL flagerror("Equations set equations is not associated.",err,error,*999)
451  ENDIF
452  ELSE
453  CALL flagerror("Equations set is not associated.",err,error,*999)
454  ENDIF
455 
456  exits("HELMHOLTZ_EQUATION_FINITE_ELEMENT_CALCULATE")
457  RETURN
458 999 errorsexits("HELMHOLTZ_EQUATION_FINITE_ELEMENT_CALCULATE",err,error)
459  RETURN 1
460  END SUBROUTINE helmholtz_equation_finite_element_calculate
461 
462  !
463  !================================================================================================================================
464  !
465 
467  SUBROUTINE helmholtz_equation_equations_set_setup(EQUATIONS_SET,EQUATIONS_SET_SETUP,ERR,ERROR,*)
469  !Argument variables
470  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
471  TYPE(equations_set_setup_type), INTENT(INOUT) :: EQUATIONS_SET_SETUP
472  INTEGER(INTG), INTENT(OUT) :: ERR
473  TYPE(varying_string), INTENT(OUT) :: ERROR
474  !Local Variables
475  TYPE(varying_string) :: LOCAL_ERROR
476 
477  enters("HELMHOLTZ_EQUATION_EQUATIONS_SET_SETUP",err,error,*999)
478 
479  IF(ASSOCIATED(equations_set)) THEN
480  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
481  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
482  ELSE IF(SIZE(equations_set%SPECIFICATION,1)/=3) THEN
483  CALL flagerror("Equations set specification must have three entries for a Helmholtz type equations set.", &
484  & err,error,*999)
485  END IF
486  SELECT CASE(equations_set%SPECIFICATION(3))
488  CALL helmholtz_equationssetstandardsetup(equations_set,equations_set_setup,err,error,*999)
490  CALL flagerror("Not implemented.",err,error,*999)
491  CASE DEFAULT
492  local_error="Equations set subtype "//trim(number_to_vstring(equations_set%SPECIFICATION(3),"*",err,error))// &
493  & " is not valid for a Helmholtz equation type of a classical field equation set class."
494  CALL flagerror(local_error,err,error,*999)
495  END SELECT
496  ELSE
497  CALL flagerror("Equations set is not associated.",err,error,*999)
498  ENDIF
499 
500  exits("HELMHOLTZ_EQUATION_EQUATIONS_SET_SETUP")
501  RETURN
502 999 errorsexits("HELMHOLTZ_EQUATION_EQUATIONS_SET_SETUP",err,error)
503  RETURN 1
504  END SUBROUTINE helmholtz_equation_equations_set_setup
505 
506  !
507  !================================================================================================================================
508  !
509 
511  SUBROUTINE helmholtz_equationssetsolutionmethodset(EQUATIONS_SET,SOLUTION_METHOD,ERR,ERROR,*)
513  !Argument variables
514  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
515  INTEGER(INTG), INTENT(IN) :: SOLUTION_METHOD
516  INTEGER(INTG), INTENT(OUT) :: ERR
517  TYPE(varying_string), INTENT(OUT) :: ERROR
518  !Local Variables
519  TYPE(varying_string) :: LOCAL_ERROR
520 
521  enters("Helmholtz_EquationsSetSolutionMethodSet",err,error,*999)
522 
523  IF(ASSOCIATED(equations_set)) THEN
524  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
525  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
526  ELSE IF(SIZE(equations_set%SPECIFICATION,1)/=3) THEN
527  CALL flagerror("Equations set specification must have three entries for a Helmholtz type equations set.", &
528  & err,error,*999)
529  END IF
530  SELECT CASE(equations_set%SPECIFICATION(3))
532  SELECT CASE(solution_method)
534  equations_set%SOLUTION_METHOD=equations_set_fem_solution_method
536  CALL flagerror("Not implemented.",err,error,*999)
538  CALL flagerror("Not implemented.",err,error,*999)
540  CALL flagerror("Not implemented.",err,error,*999)
542  CALL flagerror("Not implemented.",err,error,*999)
544  CALL flagerror("Not implemented.",err,error,*999)
545  CASE DEFAULT
546  local_error="The specified solution method of "//trim(number_to_vstring(solution_method,"*",err,error))//" is invalid."
547  CALL flagerror(local_error,err,error,*999)
548  END SELECT
550  SELECT CASE(solution_method)
552  equations_set%SOLUTION_METHOD=equations_set_fem_solution_method
554  CALL flagerror("Not implemented.",err,error,*999)
556  CALL flagerror("Not implemented.",err,error,*999)
558  CALL flagerror("Not implemented.",err,error,*999)
560  CALL flagerror("Not implemented.",err,error,*999)
562  CALL flagerror("Not implemented.",err,error,*999)
563  CASE DEFAULT
564  local_error="The specified solution method of "//trim(number_to_vstring(solution_method,"*",err,error))//" is invalid."
565  CALL flagerror(local_error,err,error,*999)
566  END SELECT
567  CASE DEFAULT
568  local_error="Equations set subtype of "//trim(number_to_vstring(equations_set%SPECIFICATION(3),"*",err,error))// &
569  & " is not valid for a Helmholtz equation type of an classical field equations set class."
570  CALL flagerror(local_error,err,error,*999)
571  END SELECT
572  ELSE
573  CALL flagerror("Equations set is not associated.",err,error,*999)
574  ENDIF
575 
576  exits("Helmholtz_EquationsSetSolutionMethodSet")
577  RETURN
578 999 errors("Helmholtz_EquationsSetSolutionMethodSet",err,error)
579  exits("Helmholtz_EquationsSetSolutionMethodSet")
580  RETURN 1
581 
582  END SUBROUTINE helmholtz_equationssetsolutionmethodset
583 
584  !
585  !================================================================================================================================
586  !
587 
589  SUBROUTINE helmholtz_equationssetspecificationset(equationsSet,specification,err,error,*)
591  !Argument variables
592  TYPE(equations_set_type), POINTER :: equationsSet
593  INTEGER(INTG), INTENT(IN) :: specification(:)
594  INTEGER(INTG), INTENT(OUT) :: err
595  TYPE(varying_string), INTENT(OUT) :: error
596  !Local Variables
597  TYPE(varying_string) :: localError
598  INTEGER(INTG) :: subtype
599 
600  enters("Helmholtz_EquationsSetSpecificationSet",err,error,*999)
601 
602  IF(ASSOCIATED(equationsset)) THEN
603  IF(SIZE(specification,1)/=3) THEN
604  CALL flagerror("Equations set specification must have three entries for a Helmholtz type equations set.", &
605  & err,error,*999)
606  END IF
607  subtype=specification(3)
608  SELECT CASE(subtype)
610  !ok
612  CALL flagerror("Not implemented.",err,error,*999)
613  CASE DEFAULT
614  localerror="The third equations set specification of "//trim(numbertovstring(subtype,"*",err,error))// &
615  & " is not valid for a Helmholtz type of a classical field equations set."
616  CALL flagerror(localerror,err,error,*999)
617  END SELECT
618  !Set full specification
619  IF(ALLOCATED(equationsset%specification)) THEN
620  CALL flagerror("Equations set specification is already allocated.",err,error,*999)
621  ELSE
622  ALLOCATE(equationsset%specification(3),stat=err)
623  IF(err/=0) CALL flagerror("Could not allocate equations set specification.",err,error,*999)
624  END IF
625  equationsset%specification(1:3)=[equations_set_classical_field_class,equations_set_helmholtz_equation_type,subtype]
626  ELSE
627  CALL flagerror("Equations set is not associated.",err,error,*999)
628  END IF
629 
630  exits("Helmholtz_EquationsSetSpecificationSet")
631  RETURN
632 999 errors("Helmholtz_EquationsSetSpecificationSet",err,error)
633  exits("Helmholtz_EquationsSetSpecificationSet")
634  RETURN 1
635 
636  END SUBROUTINE helmholtz_equationssetspecificationset
637 
638  !
639  !================================================================================================================================
640  !
641 
643  SUBROUTINE helmholtz_equationssetstandardsetup(EQUATIONS_SET,EQUATIONS_SET_SETUP,ERR,ERROR,*)
645  !Argument variables
646  TYPE(equations_set_type), POINTER :: EQUATIONS_SET
647  TYPE(equations_set_setup_type), INTENT(INOUT) :: EQUATIONS_SET_SETUP
648  INTEGER(INTG), INTENT(OUT) :: ERR
649  TYPE(varying_string), INTENT(OUT) :: ERROR
650  !Local Variables
651  INTEGER(INTG) :: GEOMETRIC_MESH_COMPONENT,GEOMETRIC_SCALING_TYPE,NUMBER_OF_DIMENSIONS
652  TYPE(decomposition_type), POINTER :: GEOMETRIC_DECOMPOSITION
653  TYPE(field_type), POINTER :: ANALYTIC_FIELD,DEPENDENT_FIELD,GEOMETRIC_FIELD
654  TYPE(equations_type), POINTER :: EQUATIONS
655  TYPE(equations_mapping_type), POINTER :: EQUATIONS_MAPPING
656  TYPE(equations_matrices_type), POINTER :: EQUATIONS_MATRICES
657  TYPE(equations_set_materials_type), POINTER :: EQUATIONS_MATERIALS
658  INTEGER(INTG) :: MATERIAL_FIELD_NUMBER_OF_VARIABLES, MATERIAL_FIELD_NUMBER_OF_COMPONENTS
659  INTEGER(INTG) :: i,GEOMETRIC_COMPONENT_NUMBER
660  TYPE(varying_string) :: LOCAL_ERROR
661 
662  enters("HELMHOLTZ_EQUATION_EQUATION_SET_STANDARD_SETUP",err,error,*999)
663 
664  NULLIFY(equations)
665  NULLIFY(equations_mapping)
666  NULLIFY(equations_matrices)
667  NULLIFY(geometric_decomposition)
668 
669  IF(ASSOCIATED(equations_set)) THEN
670  IF(.NOT.ALLOCATED(equations_set%SPECIFICATION)) THEN
671  CALL flagerror("Equations set specification is not allocated.",err,error,*999)
672  ELSE IF(SIZE(equations_set%SPECIFICATION,1)/=3) THEN
673  CALL flagerror("Equations set specification must have three entries for a Helmholtz type equations set.", &
674  & err,error,*999)
675  END IF
676  IF(equations_set%SPECIFICATION(3)==equations_set_standard_helmholtz_subtype) THEN
677  SELECT CASE(equations_set_setup%SETUP_TYPE)
679  SELECT CASE(equations_set_setup%ACTION_TYPE)
681  CALL helmholtz_equationssetsolutionmethodset(equations_set,equations_set_fem_solution_method,err,error, &
682  & *999)
684  !Do nothing
685  CASE DEFAULT
686  local_error="The action type of "//trim(number_to_vstring(equations_set_setup%ACTION_TYPE,"*",err,error))// &
687  & " for a setup type of "//trim(number_to_vstring(equations_set_setup%SETUP_TYPE,"*",err,error))// &
688  & " is invalid for a standard Helmholtz equation."
689  CALL flagerror(local_error,err,error,*999)
690  END SELECT
692  !Do nothing
694  SELECT CASE(equations_set_setup%ACTION_TYPE)
696  IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED) THEN
697  !Create the auto created dependent field
698  CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
699  & dependent_field,err,error,*999)
700  CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,"Dependent Field",err,error,*999)
701  CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
702  CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
703  CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
704  CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
705  & err,error,*999)
706  CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
707  & geometric_field,err,error,*999)
708  CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,2,err,error,*999)
709  CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,(/field_u_variable_type, &
710  & field_deludeln_variable_type/),err,error,*999)
711  CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,"Phi",err,error,*999)
712  CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,"del Phi/del n", &
713  & err,error,*999)
714  CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
715  & field_scalar_dimension_type,err,error,*999)
716  CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
717  & field_scalar_dimension_type,err,error,*999)
718  CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
719  & field_dp_type,err,error,*999)
720  CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
721  & field_dp_type,err,error,*999)
722  CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
723  & err,error,*999)
724  CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
725  & err,error,*999)
726  CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1,"Phi",err,error,*999)
727  CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
728  & "del Phi/del n",err,error,*999)
729  !Default to the geometric interpolation setup
730  CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
731  & geometric_mesh_component,err,error,*999)
732  CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
733  & geometric_mesh_component,err,error,*999)
734  CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
735  & geometric_mesh_component,err,error,*999)
736  SELECT CASE(equations_set%SOLUTION_METHOD)
738  CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
739  & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
740  CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
741  & field_deludeln_variable_type,1,field_node_based_interpolation,err,error,*999)
742  !Default the scaling to the geometric field scaling
743  CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
744  CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
746  CALL flagerror("Not implemented.",err,error,*999)
748  CALL flagerror("Not implemented.",err,error,*999)
750  CALL flagerror("Not implemented.",err,error,*999)
752  CALL flagerror("Not implemented.",err,error,*999)
754  CALL flagerror("Not implemented.",err,error,*999)
755  CASE DEFAULT
756  local_error="The solution method of "//trim(number_to_vstring(equations_set%SOLUTION_METHOD,"*",err,error))// &
757  & " is invalid."
758  CALL flagerror(local_error,err,error,*999)
759  END SELECT
760  ELSE
761  !Check the user specified field
762  CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
763  CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
764  CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
765  CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type,field_deludeln_variable_type/), &
766  & err,error,*999)
767  CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type,err,error,*999)
768  CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_scalar_dimension_type, &
769  & err,error,*999)
770  CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
771  CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
772  CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
773  CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type,1,err,error,*999)
774  SELECT CASE(equations_set%SOLUTION_METHOD)
776  CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
777  & field_node_based_interpolation,err,error,*999)
778  CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
779  & field_node_based_interpolation,err,error,*999)
781  CALL flagerror("Not implemented.",err,error,*999)
783  CALL flagerror("Not implemented.",err,error,*999)
785  CALL flagerror("Not implemented.",err,error,*999)
787  CALL flagerror("Not implemented.",err,error,*999)
789  CALL flagerror("Not implemented.",err,error,*999)
790  CASE DEFAULT
791  local_error="The solution method of "//trim(number_to_vstring(equations_set%SOLUTION_METHOD,"*",err,error))// &
792  & " is invalid."
793  CALL flagerror(local_error,err,error,*999)
794  END SELECT
795  ENDIF
797  IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED) THEN
798  CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
799  ENDIF
800  CASE DEFAULT
801  local_error="The action type of "//trim(number_to_vstring(equations_set_setup%ACTION_TYPE,"*",err,error))// &
802  & " for a setup type of "//trim(number_to_vstring(equations_set_setup%SETUP_TYPE,"*",err,error))// &
803  & " is invalid for a standard Helmholtz equation"
804  CALL flagerror(local_error,err,error,*999)
805  END SELECT
807  material_field_number_of_variables=1
808  material_field_number_of_components=1 ! wave number k
809  SELECT CASE(equations_set_setup%ACTION_TYPE)
811  equations_materials=>equations_set%MATERIALS
812  IF(ASSOCIATED(equations_materials)) THEN
813  IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED) THEN
814  !Create the auto created materials field
815  CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_materials% &
816  & materials_field,err,error,*999)
817  CALL field_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_material_type,err,error,*999)
818  CALL field_dependent_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_independent_type,err,error,*999)
819  CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
820  CALL field_mesh_decomposition_set_and_lock(equations_materials%MATERIALS_FIELD,geometric_decomposition, &
821  & err,error,*999)
822  CALL field_geometric_field_set_and_lock(equations_materials%MATERIALS_FIELD,equations_set%GEOMETRY% &
823  & geometric_field,err,error,*999)
824  CALL field_number_of_variables_set(equations_materials%MATERIALS_FIELD, &
825  & material_field_number_of_variables,err,error,*999)
826  CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,(/field_u_variable_type/), &
827  & err,error,*999)
828  CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
829  & field_vector_dimension_type,err,error,*999)
830  CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
831  & field_dp_type,err,error,*999)
832  CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
833  & material_field_number_of_components,err,error,*999)
834  CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
835  & 1,geometric_component_number,err,error,*999)
836 
837  !Default to constant interpolation of material field
838  DO i=1,material_field_number_of_components
839  CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
840  & i,geometric_component_number,err,error,*999)
841  CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
842  & i,field_constant_interpolation,err,error,*999)
843  END DO
844 
845  !Default the field scaling to that of the geometric field
846  CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
847  CALL field_scaling_type_set(equations_materials%MATERIALS_FIELD,geometric_scaling_type,err,error,*999)
848  ELSE
849  !Check the user specified field
850  CALL field_type_check(equations_set_setup%FIELD,field_material_type,err,error,*999)
851  CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
852  CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
853  CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type/),err,error,*999)
854  CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
855  & err,error,*999)
856  CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
857  CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
858  ENDIF
859  ELSE
860  CALL flagerror("Equations set materials is not associated.",err,error,*999)
861  ENDIF
863  equations_materials=>equations_set%MATERIALS
864  IF( ASSOCIATED(equations_materials) ) THEN
865  IF( equations_materials%MATERIALS_FIELD_AUTO_CREATED ) THEN
866  CALL field_create_finish(equations_materials%MATERIALS_FIELD,err,error,*999)
867  !Set the default values for the materials field
868  DO i=1,material_field_number_of_components
869  CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
870  & field_values_set_type, i, 1.0_dp, err, error, *999)
871  ENDDO
872  ENDIF
873  ELSE
874  CALL flagerror("Equations set materials is not associated.",err,error,*999)
875  ENDIF
876  CASE DEFAULT
877  local_error="The action type of "//trim(number_to_vstring(equations_set_setup%ACTION_TYPE,"*",err,error))// &
878  & " for a setup type of "//trim(number_to_vstring(equations_set_setup%SETUP_TYPE,"*",err,error))// &
879  & " is invalid for a standard Helmholtz equation."
880  CALL flagerror(local_error,err,error,*999)
881  END SELECT
883  SELECT CASE(equations_set_setup%ACTION_TYPE)
885  !Do nothing
887  !Do nothing
888  CASE DEFAULT
889  local_error="The action type of "//trim(number_to_vstring(equations_set_setup%ACTION_TYPE,"*",err,error))// &
890  & " for a setup type of "//trim(number_to_vstring(equations_set_setup%SETUP_TYPE,"*",err,error))// &
891  & " is invalid for a standard Helmholtz equation."
892  CALL flagerror(local_error,err,error,*999)
893  END SELECT
895  SELECT CASE(equations_set_setup%ACTION_TYPE)
897  IF(equations_set%DEPENDENT%DEPENDENT_FINISHED) THEN
898  dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
899  IF(ASSOCIATED(dependent_field)) THEN
900  geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
901  IF(ASSOCIATED(geometric_field)) THEN
902  CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
903  SELECT CASE(equations_set_setup%ANALYTIC_FUNCTION_TYPE)
905  !Check that we are in 2D
906  IF(number_of_dimensions/=2) THEN
907  local_error="The number of geometric dimensions of "// &
908  & trim(number_to_vstring(number_of_dimensions,"*",err,error))// &
909  & " is invalid. The analytic function type of "// &
910  & trim(number_to_vstring(equations_set_setup%ANALYTIC_FUNCTION_TYPE,"*",err,error))// &
911  & " requires that there be 2 geometric dimensions."
912  CALL flagerror(local_error,err,error,*999)
913  ENDIF
914  !Create analytic field if required
915  !Set analtyic function type
916  equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE=equations_set_helmholtz_equation_two_dim_1
917  CASE DEFAULT
918  local_error="The specified analytic function type of "// &
919  & trim(number_to_vstring(equations_set_setup%ANALYTIC_FUNCTION_TYPE,"*",err,error))// &
920  & " is invalid for a standard Helmholtz equation."
921  CALL flagerror(local_error,err,error,*999)
922  END SELECT
923  ELSE
924  CALL flagerror("Equations set geometric field is not associated.",err,error,*999)
925  ENDIF
926  ELSE
927  CALL flagerror("Equations set dependent field is not associated.",err,error,*999)
928  ENDIF
929  ELSE
930  CALL flagerror("Equations set dependent field has not been finished.",err,error,*999)
931  ENDIF
933  IF(ASSOCIATED(equations_set%ANALYTIC)) THEN
934  analytic_field=>equations_set%ANALYTIC%ANALYTIC_FIELD
935  IF(ASSOCIATED(analytic_field)) THEN
936  IF(equations_set%ANALYTIC%ANALYTIC_FIELD_AUTO_CREATED) THEN
937  CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
938  ENDIF
939  ENDIF
940  ELSE
941  CALL flagerror("Equations set analytic is not associated.",err,error,*999)
942  ENDIF
943  CASE DEFAULT
944  local_error="The action type of "//trim(number_to_vstring(equations_set_setup%ACTION_TYPE,"*",err,error))// &
945  & " for a setup type of "//trim(number_to_vstring(equations_set_setup%SETUP_TYPE,"*",err,error))// &
946  & " is invalid for a standard Helmholtz equation."
947  CALL flagerror(local_error,err,error,*999)
948  END SELECT
950  SELECT CASE(equations_set_setup%ACTION_TYPE)
952  IF(equations_set%DEPENDENT%DEPENDENT_FINISHED) THEN
953  CALL equations_create_start(equations_set,equations,err,error,*999)
954  CALL equations_linearity_type_set(equations,equations_linear,err,error,*999)
955  CALL equations_time_dependence_type_set(equations,equations_static,err,error,*999)
956  ELSE
957  CALL flagerror("Equations set dependent field has not been finished.",err,error,*999)
958  ENDIF
960  SELECT CASE(equations_set%SOLUTION_METHOD)
962  !Finish the equations creation
963  CALL equations_set_equations_get(equations_set,equations,err,error,*999)
964  CALL equations_create_finish(equations,err,error,*999)
965  !Create the equations mapping.
966  CALL equations_mapping_create_start(equations,equations_mapping,err,error,*999)
967  CALL equationsmapping_linearmatricesnumberset(equations_mapping,1,err,error,*999)
968  CALL equationsmapping_linearmatricesvariabletypesset(equations_mapping,(/field_u_variable_type/), &
969  & err,error,*999)
970  CALL equations_mapping_rhs_variable_type_set(equations_mapping,field_deludeln_variable_type,err,error,*999)
971  CALL equations_mapping_create_finish(equations_mapping,err,error,*999)
972  !Create the equations matrices
973  CALL equations_matrices_create_start(equations,equations_matrices,err,error,*999)
974  SELECT CASE(equations%SPARSITY_TYPE)
977  & err,error,*999)
980  & err,error,*999)
982  & err,error,*999)
983  CASE DEFAULT
984  local_error="The equations matrices sparsity type of "// &
985  & trim(number_to_vstring(equations%SPARSITY_TYPE,"*",err,error))//" is invalid."
986  CALL flagerror(local_error,err,error,*999)
987  END SELECT
988  CALL equations_matrices_create_finish(equations_matrices,err,error,*999)
990  CALL flagerror("Not implemented.",err,error,*999)
992  CALL flagerror("Not implemented.",err,error,*999)
994  CALL flagerror("Not implemented.",err,error,*999)
996  CALL flagerror("Not implemented.",err,error,*999)
998  CALL flagerror("Not implemented.",err,error,*999)
999  CASE DEFAULT
1000  local_error="The solution method of "//trim(number_to_vstring(equations_set%SOLUTION_METHOD,"*",err,error))// &
1001  & " is invalid."
1002  CALL flagerror(local_error,err,error,*999)
1003  END SELECT
1004  CASE DEFAULT
1005  local_error="The action type of "//trim(number_to_vstring(equations_set_setup%ACTION_TYPE,"*",err,error))// &
1006  & " for a setup type of "//trim(number_to_vstring(equations_set_setup%SETUP_TYPE,"*",err,error))// &
1007  & " is invalid for a standard Helmholtz equation."
1008  CALL flagerror(local_error,err,error,*999)
1009  END SELECT
1010  CASE DEFAULT
1011  local_error="The setup type of "//trim(number_to_vstring(equations_set_setup%SETUP_TYPE,"*",err,error))// &
1012  & " is invalid for a standard Helmholtz equation."
1013  CALL flagerror(local_error,err,error,*999)
1014  END SELECT
1015  ELSE
1016  local_error="The equations set subtype of "//trim(number_to_vstring(equations_set%SPECIFICATION(3),"*",err,error))// &
1017  & " does not equal a standard Helmholtz equation subtype."
1018  CALL flagerror(local_error,err,error,*999)
1019  ENDIF
1020  ELSE
1021  CALL flagerror("Equations set is not associated.",err,error,*999)
1022  ENDIF
1023 
1024  exits("Helmholtz_EquationsSetStandardSetup")
1025  RETURN
1026 999 errorsexits("Helmholtz_EquationsSetStandardSetup",err,error)
1027  RETURN 1
1028 
1029  END SUBROUTINE helmholtz_equationssetstandardsetup
1030 
1031  !
1032  !================================================================================================================================
1033  !
1034 
1036  SUBROUTINE helmholtz_equation_problem_setup(PROBLEM,PROBLEM_SETUP,ERR,ERROR,*)
1038  !Argument variables
1039  TYPE(problem_type), POINTER :: PROBLEM
1040  TYPE(problem_setup_type), INTENT(INOUT) :: PROBLEM_SETUP
1041  INTEGER(INTG), INTENT(OUT) :: ERR
1042  TYPE(varying_string), INTENT(OUT) :: ERROR
1043  !Local Variables
1044  TYPE(varying_string) :: LOCAL_ERROR
1045 
1046  enters("HELMHOLTZ_EQUATION_PROBLEM_SETUP",err,error,*999)
1047 
1048  IF(ASSOCIATED(problem)) THEN
1049  IF(.NOT.ALLOCATED(problem%SPECIFICATION)) THEN
1050  CALL flagerror("Problem specification is not allocated.",err,error,*999)
1051  ELSE IF(SIZE(problem%SPECIFICATION,1)<3) THEN
1052  CALL flagerror("Problem specification must have three entries for a Helmholtz equation problem.",err,error,*999)
1053  END IF
1054  SELECT CASE(problem%SPECIFICATION(3))
1056  CALL helmholtz_equation_problem_standard_setup(problem,problem_setup,err,error,*999)
1058  CALL flagerror("Not implemented.",err,error,*999)
1059  CASE DEFAULT
1060  local_error="Problem subtype "//trim(number_to_vstring(problem%SPECIFICATION(3),"*",err,error))// &
1061  & " is not valid for a Helmholtz equation type of a classical field problem class."
1062  CALL flagerror(local_error,err,error,*999)
1063  END SELECT
1064  ELSE
1065  CALL flagerror("Problem is not associated.",err,error,*999)
1066  ENDIF
1067 
1068  exits("HELMHOLTZ_EQUATION_PROBLEM_SETUP")
1069  RETURN
1070 999 errorsexits("HELMHOLTZ_EQUATION_PROBLEM_SETUP",err,error)
1071  RETURN 1
1072  END SUBROUTINE helmholtz_equation_problem_setup
1073 
1074  !
1075  !================================================================================================================================
1076  !
1077 
1079  SUBROUTINE helmholtz_problemspecificationset(problem,problemSpecification,err,error,*)
1081  !Argument variables
1082  TYPE(problem_type), POINTER :: problem
1083  INTEGER(INTG), INTENT(IN) :: problemSpecification(:)
1084  INTEGER(INTG), INTENT(OUT) :: err
1085  TYPE(varying_string), INTENT(OUT) :: error
1086  !Local Variables
1087  TYPE(varying_string) :: localError
1088  INTEGER(INTG) :: problemSubtype
1089 
1090  CALL enters("Helmholtz_ProblemSpecificationSet",err,error,*999)
1091 
1092  IF(ASSOCIATED(problem)) THEN
1093  IF(SIZE(problemspecification,1)==3) THEN
1094  problemsubtype=problemspecification(3)
1095  SELECT CASE(problemsubtype)
1097  !ok
1099  CALL flagerror("Not implemented.",err,error,*999)
1100  CASE DEFAULT
1101  localerror="The third problem specification of "//trim(numbertovstring(problemsubtype,"*",err,error))// &
1102  & " is not valid for a Helmholtz equation type of a classical field problem class."
1103  CALL flagerror(localerror,err,error,*999)
1104  END SELECT
1105  IF(ALLOCATED(problem%specification)) THEN
1106  CALL flagerror("Problem specification is already allocated.",err,error,*999)
1107  ELSE
1108  ALLOCATE(problem%specification(3),stat=err)
1109  IF(err/=0) CALL flagerror("Could not allocate problem specification.",err,error,*999)
1110  END IF
1111  problem%specification(1:3)=[problem_classical_field_class,problem_helmholtz_equation_type,problemsubtype]
1112  ELSE
1113  CALL flagerror("Helmholtz equation problem specification must have three entries.",err,error,*999)
1114  END IF
1115  ELSE
1116  CALL flagerror("Problem is not associated.",err,error,*999)
1117  END IF
1118 
1119  CALL exits("Helmholtz_ProblemSpecificationSet")
1120  RETURN
1121 999 CALL errors("Helmholtz_ProblemSpecificationSet",err,error)
1122  CALL exits("Helmholtz_ProblemSpecificationSet")
1123  RETURN 1
1124 
1125  END SUBROUTINE helmholtz_problemspecificationset
1126 
1127  !
1128  !================================================================================================================================
1129  !
1130 
1132  SUBROUTINE helmholtz_equation_problem_standard_setup(PROBLEM,PROBLEM_SETUP,ERR,ERROR,*)
1134  !Argument variables
1135  TYPE(problem_type), POINTER :: PROBLEM
1136  TYPE(problem_setup_type), INTENT(INOUT) :: PROBLEM_SETUP
1137  INTEGER(INTG), INTENT(OUT) :: ERR
1138  TYPE(varying_string), INTENT(OUT) :: ERROR
1139  !Local Variables
1140  TYPE(control_loop_type), POINTER :: CONTROL_LOOP,CONTROL_LOOP_ROOT
1141  TYPE(solver_type), POINTER :: SOLVER
1142  TYPE(solver_equations_type), POINTER :: SOLVER_EQUATIONS
1143  TYPE(solvers_type), POINTER :: SOLVERS
1144  TYPE(varying_string) :: LOCAL_ERROR
1145 
1146  enters("HELMHOLTZ_EQUATION_PROBLEM_STANDARD_SETUP",err,error,*999)
1147 
1148  NULLIFY(control_loop)
1149  NULLIFY(solver)
1150  NULLIFY(solver_equations)
1151  NULLIFY(solvers)
1152  IF(ASSOCIATED(problem)) THEN
1153  IF(.NOT.ALLOCATED(problem%SPECIFICATION)) THEN
1154  CALL flagerror("Problem specification is not allocated.",err,error,*999)
1155  ELSE IF(SIZE(problem%SPECIFICATION,1)<3) THEN
1156  CALL flagerror("Problem specification must have three entries for a Helmholtz equation problem.",err,error,*999)
1157  END IF
1158  IF(problem%SPECIFICATION(3)==problem_standard_helmholtz_subtype) THEN
1159  SELECT CASE(problem_setup%SETUP_TYPE)
1161  SELECT CASE(problem_setup%ACTION_TYPE)
1163  !Do nothing????
1165  !Do nothing???
1166  CASE DEFAULT
1167  local_error="The action type of "//trim(number_to_vstring(problem_setup%ACTION_TYPE,"*",err,error))// &
1168  & " for a setup type of "//trim(number_to_vstring(problem_setup%SETUP_TYPE,"*",err,error))// &
1169  & " is invalid for a standard Helmholtz equation."
1170  CALL flagerror(local_error,err,error,*999)
1171  END SELECT
1173  SELECT CASE(problem_setup%ACTION_TYPE)
1175  !Set up a simple control loop
1176  CALL control_loop_create_start(problem,control_loop,err,error,*999)
1178  !Finish the control loops
1179  control_loop_root=>problem%CONTROL_LOOP
1180  CALL control_loop_get(control_loop_root,control_loop_node,control_loop,err,error,*999)
1181  CALL control_loop_create_finish(control_loop,err,error,*999)
1182  CASE DEFAULT
1183  local_error="The action type of "//trim(number_to_vstring(problem_setup%ACTION_TYPE,"*",err,error))// &
1184  & " for a setup type of "//trim(number_to_vstring(problem_setup%SETUP_TYPE,"*",err,error))// &
1185  & " is invalid for a standard Helmholtz equation."
1186  CALL flagerror(local_error,err,error,*999)
1187  END SELECT
1189  !Get the control loop
1190  control_loop_root=>problem%CONTROL_LOOP
1191  CALL control_loop_get(control_loop_root,control_loop_node,control_loop,err,error,*999)
1192  SELECT CASE(problem_setup%ACTION_TYPE)
1194  !Start the solvers creation
1195  CALL solvers_create_start(control_loop,solvers,err,error,*999)
1196  CALL solvers_number_set(solvers,1,err,error,*999)
1197  !Set the solver to be a linear solver
1198  CALL solvers_solver_get(solvers,1,solver,err,error,*999)
1199  CALL solver_type_set(solver,solver_linear_type,err,error,*999)
1200  !Set solver defaults
1201  CALL solver_library_type_set(solver,solver_petsc_library,err,error,*999)
1203  !Get the solvers
1204  CALL control_loop_solvers_get(control_loop,solvers,err,error,*999)
1205  !Finish the solvers creation
1206  CALL solvers_create_finish(solvers,err,error,*999)
1207  CASE DEFAULT
1208  local_error="The action type of "//trim(number_to_vstring(problem_setup%ACTION_TYPE,"*",err,error))// &
1209  & " for a setup type of "//trim(number_to_vstring(problem_setup%SETUP_TYPE,"*",err,error))// &
1210  & " is invalid for a standard Helmholtz equation."
1211  CALL flagerror(local_error,err,error,*999)
1212  END SELECT
1214  SELECT CASE(problem_setup%ACTION_TYPE)
1216  !Get the control loop
1217  control_loop_root=>problem%CONTROL_LOOP
1218  CALL control_loop_get(control_loop_root,control_loop_node,control_loop,err,error,*999)
1219  !Get the solver
1220  CALL control_loop_solvers_get(control_loop,solvers,err,error,*999)
1221  CALL solvers_solver_get(solvers,1,solver,err,error,*999)
1222  !Create the solver equations
1223  CALL solver_equations_create_start(solver,solver_equations,err,error,*999)
1224  CALL solver_equations_linearity_type_set(solver_equations,solver_equations_linear,err,error,*999)
1225  CALL solver_equations_time_dependence_type_set(solver_equations,solver_equations_static,err,error,*999)
1226  CALL solver_equations_sparsity_type_set(solver_equations,solver_sparse_matrices,err,error,*999)
1228  !Get the control loop
1229  control_loop_root=>problem%CONTROL_LOOP
1230  CALL control_loop_get(control_loop_root,control_loop_node,control_loop,err,error,*999)
1231  !Get the solver equations
1232  CALL control_loop_solvers_get(control_loop,solvers,err,error,*999)
1233  CALL solvers_solver_get(solvers,1,solver,err,error,*999)
1234  CALL solver_solver_equations_get(solver,solver_equations,err,error,*999)
1235  !Finish the solver equations creation
1236  CALL solver_equations_create_finish(solver_equations,err,error,*999)
1237  CASE DEFAULT
1238  local_error="The action type of "//trim(number_to_vstring(problem_setup%ACTION_TYPE,"*",err,error))// &
1239  & " for a setup type of "//trim(number_to_vstring(problem_setup%SETUP_TYPE,"*",err,error))// &
1240  & " is invalid for a standard Helmholtz equation."
1241  CALL flagerror(local_error,err,error,*999)
1242  END SELECT
1243  CASE DEFAULT
1244  local_error="The setup type of "//trim(number_to_vstring(problem_setup%SETUP_TYPE,"*",err,error))// &
1245  & " is invalid for a standard Helmholtz equation."
1246  CALL flagerror(local_error,err,error,*999)
1247  END SELECT
1248  ELSE
1249  local_error="The problem subtype of "//trim(number_to_vstring(problem%SPECIFICATION(3),"*",err,error))// &
1250  & " does not equal a standard Helmholtz equation subtype."
1251  CALL flagerror(local_error,err,error,*999)
1252  ENDIF
1253  ELSE
1254  CALL flagerror("Problem is not associated.",err,error,*999)
1255  ENDIF
1256 
1257  exits("HELMHOLTZ_EQUATION_PROBLEM_STANDARD_SETUP")
1258  RETURN
1259 999 errorsexits("HELMHOLTZ_EQUATION_PROBLEM_STANDARD_SETUP",err,error)
1260  RETURN 1
1261  END SUBROUTINE helmholtz_equation_problem_standard_setup
1262 
1263  !
1264  !================================================================================================================================
1265  !
1266 
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.
Definition: types.f90:1780
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
subroutine, public solvers_create_finish(SOLVERS, ERR, ERROR,)
Finish the creation of solvers.
Contains information on the equations mapping i.e., how field variable DOFS are mapped to the rows an...
Definition: types.f90:1681
Contains information about the equations in an equations set.
Definition: types.f90:1735
integer(intg), parameter equations_set_gfem_solution_method
Grid-based Finite Element Method solution method.
integer(intg), parameter problem_setup_control_type
Solver setup for a problem.
This module handles all problem wide constants.
integer(intg), parameter, public control_loop_node
The identifier for a each "leaf" node in a control loop.
integer(intg), parameter no_global_deriv
No global derivative i.e., u.
Definition: constants.f90:213
Converts a number to its equivalent varying string representation.
Definition: strings.f90:161
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.
Definition: types.f90:1063
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.
Definition: types.f90:2777
integer(intg), parameter, public solver_petsc_library
PETSc solver library.
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.
Definition: constants.f90:177
This module handles all equations matrix and rhs routines.
subroutine, public solver_type_set(SOLVER, SOLVE_TYPE, ERR, ERROR,)
Sets/changes the type for a solver.
integer(intg), parameter equations_static
The equations are static and have no time dependence.
Contains information on an equations set.
Definition: types.f90:1941
This module handles all equations routines.
integer(intg), parameter equations_set_setup_source_type
Source setup.
This module contains all string manipulation and transformation routines.
Definition: strings.f90:45
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.
Definition: types.f90:2805
integer(intg), parameter first_part_deriv
First partial derivative i.e., du/ds.
Definition: constants.f90:178
This module contains routines for timing the program.
Definition: timer_f.f90:45
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.
subroutine, public solver_equations_sparsity_type_set(SOLVER_EQUATIONS, SPARSITY_TYPE, ERR, ERROR,)
Sets/changes the sparsity type for solver equations.
subroutine, public solvers_solver_get(SOLVERS, SOLVER_INDEX, SOLVER, ERR, ERROR,)
Returns a pointer to the specified solver in the list of solvers.
Contains information for a field defined on a region.
Definition: types.f90:1346
integer(intg), parameter, public equations_matrices_full_matrices
Use fully populated equation matrices.
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.
Definition: constants.f90:215
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 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 solver_equations_create_start(SOLVER, SOLVER_EQUATIONS, ERR, ERROR,)
Starts the process of creating solver equations.
integer(intg), parameter, public basis_default_quadrature_scheme
Identifier for the default quadrature scheme.
integer(intg), parameter problem_generalised_helmholtz_subtype
integer(intg), parameter problem_setup_solvers_type
Solver setup for a problem.
integer(intg), parameter equations_set_setup_equations_type
Equations setup.
This module contains all program wide constants.
Definition: constants.f90:45
subroutine, public solver_library_type_set(SOLVER, SOLVER_LIBRARY_TYPE, ERR, ERROR,)
Sets/changes the type of library type to use for the solver.
subroutine, public equationsmapping_linearmatricesnumberset(EQUATIONS_MAPPING, NUMBER_OF_LINEAR_EQUATIONS_MATRICES, ERR, ERROR,)
Sets/changes the number of linear equations matrices.
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 solver_equations_linearity_type_set(SOLVER_EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for solver equations.
integer(intg), parameter equations_set_setup_start_action
Start setup action.
integer(intg), parameter problem_classical_field_class
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.
Definition: types.f90:70
Contains information on the equations matrices and vectors.
Definition: types.f90:1520
integer(intg), parameter, public equations_matrix_fem_structure
Finite element matrix structure.
integer(intg), parameter equations_set_helmholtz_equation_type
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
integer(intg), parameter equations_set_helmholtz_equation_two_dim_1
u=cos(sqrt(2)*k*x)*sin(sqrt(2)*k*y)
Contains information of the linear matrices for equations matrices.
Definition: types.f90:1479
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.
Returns the specified control loop as indexed by the control loop identifier from the control loop ro...
This module handles all Helmholtz equations routines.
subroutine, public equations_set_equations_get(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Gets the equations for an equations set.
integer(intg), dimension(4) partial_derivative_first_derivative_map
PARTIAL_DERIVATIVE_FIRST_DERIVATIVE_MAP(nic) gives the partial derivative index for the first derivat...
Definition: constants.f90:254
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.
Definition: types.f90:2452
integer(intg), parameter, public matrix_compressed_row_storage_type
Matrix compressed row storage type.
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.
Definition: constants.f90:216
Contains information for a problem.
Definition: types.f90:3221
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.
Definition: types.f90:713
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 global_deriv_s1
First global derivative in the s1 direction i.e., du/ds1.
Definition: constants.f90:214
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 problem_helmholtz_equation_type
Contains information about an equations matrix.
Definition: types.f90:1429
Contains information for a particular quadrature scheme.
Definition: types.f90:141
This module contains all routines dealing with (non-distributed) matrix and vectors types...
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 problem_setup_solver_equations_type
Solver equations setup for a problem.
Sets a boundary condition on the specified local DOF.
Contains information for a field variable defined on a field.
Definition: types.f90:1289
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.
Definition: types.f90:1866
A pointer to the domain decomposition for this domain.
Definition: types.f90:938
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 problem_standard_helmholtz_subtype
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.
Contains all information about a basis .
Definition: types.f90:184
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_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.
Contains information of the RHS vector for equations matrices.
Definition: types.f90:1500
integer(intg), parameter equations_set_standard_helmholtz_subtype
Contains information for mapping field variables to the linear matrices in the equations set of the m...
Definition: types.f90:1587
This module contains all kind definitions.
Definition: kinds.f90:45
integer(intg), parameter equations_set_setup_finish_action
Finish setup action.
integer(intg), parameter equations_set_generalised_helmholtz_subtype
This module handles all formating and input and output.