120 INTEGER(INTG),
INTENT(OUT) :: ERR
123 INTEGER(INTG) :: component_idx,deriv_idx,dim_idx,local_ny,node_idx,NUMBER_OF_DIMENSIONS,variable_idx,variable_type
124 REAL(DP) ::
VALUE,X(3),VALUE_SOURCE,VALUE_INDEPENDENT,VALUE_MATERIAL
125 REAL(DP),
POINTER :: GEOMETRIC_PARAMETERS(:)
128 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,INDEPENDENT_FIELD,SOURCE_FIELD,MATERIALS_FIELD
131 REAL(DP) :: alpha, phi, Peclet,tanphi
133 enters(
"AdvectionDiffusion_BoundaryConditionsAnalyticCalculate",err,error,*999)
135 NULLIFY(geometric_variable)
136 NULLIFY(geometric_parameters)
144 IF(
ASSOCIATED(equations_set))
THEN 145 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 146 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
147 IF(
ASSOCIATED(dependent_field))
THEN 148 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
149 IF(
ASSOCIATED(geometric_field))
THEN 150 CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
151 CALL field_variable_get(geometric_field,field_u_variable_type,geometric_variable,err,error,*999)
152 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type,field_values_set_type,geometric_parameters, &
154 IF(
ASSOCIATED(boundary_conditions))
THEN 155 DO variable_idx=1,dependent_field%NUMBER_OF_VARIABLES
156 variable_type=dependent_field%VARIABLES(variable_idx)%VARIABLE_TYPE
157 field_variable=>dependent_field%VARIABLE_TYPE_MAP(variable_type)%PTR
158 IF(
ASSOCIATED(field_variable))
THEN 159 CALL field_parameter_set_create(dependent_field,variable_type,field_analytic_values_set_type,err,error,*999)
160 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
161 IF(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 162 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
163 IF(
ASSOCIATED(domain))
THEN 164 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 165 domain_nodes=>domain%TOPOLOGY%NODES
166 IF(
ASSOCIATED(domain_nodes))
THEN 168 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
170 DO dim_idx=1,number_of_dimensions
172 local_ny=geometric_variable%COMPONENTS(dim_idx)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP% &
173 & nodes(node_idx)%DERIVATIVES(1)%VERSIONS(1)
174 x(dim_idx)=geometric_parameters(local_ny)
177 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
178 SELECT CASE(equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE)
183 SELECT CASE(variable_type)
184 CASE(field_u_variable_type)
185 SELECT CASE(domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX)
187 VALUE=tanh(1.0-alpha*(x(1)*tanphi-x(2)))
189 CALL flagerror(
"Not implemented.",err,error,*999)
191 CALL flagerror(
"Not implemented.",err,error,*999)
193 CALL flagerror(
"Not implmented.",err,error,*999)
196 domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX,
"*", &
197 & err,error))//
" is invalid." 198 CALL flagerror(local_error,err,error,*999)
200 CASE(field_deludeln_variable_type)
201 SELECT CASE(domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX)
205 CALL flagerror(
"Not implemented.",err,error,*999)
207 CALL flagerror(
"Not implemented.",err,error,*999)
209 CALL flagerror(
"Not implemented.",err,error,*999)
212 & domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX,
"*", &
213 & err,error))//
" is invalid." 214 CALL flagerror(local_error,err,error,*999)
219 CALL flagerror(local_error,err,error,*999)
222 local_error=
"The analytic function type of "// &
225 CALL flagerror(local_error,err,error,*999)
228 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
229 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
230 CALL field_parameter_set_update_local_dof(dependent_field,variable_type, &
231 & field_analytic_values_set_type,local_ny,
VALUE,err,error,*999)
232 IF(variable_type==field_u_variable_type)
THEN 233 IF(domain_nodes%NODES(node_idx)%BOUNDARY_NODE)
THEN 242 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
245 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
248 CALL flagerror(
"Domain is not associated.",err,error,*999)
251 CALL flagerror(
"Only node based interpolation is implemented.",err,error,*999)
254 CALL field_parameter_set_update_start(dependent_field,variable_type,field_analytic_values_set_type, &
256 CALL field_parameter_set_update_finish(dependent_field,variable_type,field_analytic_values_set_type, &
259 CALL flagerror(
"Field variable is not associated.",err,error,*999)
263 CALL field_parameter_set_data_restore(geometric_field,field_u_variable_type,field_values_set_type, &
264 & geometric_parameters,err,error,*999)
266 CALL flagerror(
"Boundary conditions is not associated.",err,error,*999)
269 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
272 CALL flagerror(
"Equations set dependent field is not associated.",err,error,*999)
275 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
278 CALL flagerror(
"Equations set is not associated.",err,error,*999)
282 IF(
ASSOCIATED(equations_set))
THEN 283 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 284 independent_field=>equations_set%INDEPENDENT%INDEPENDENT_FIELD
285 IF(
ASSOCIATED(independent_field))
THEN 286 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
287 IF(
ASSOCIATED(geometric_field))
THEN 288 CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
289 NULLIFY(geometric_variable)
290 CALL field_variable_get(geometric_field,field_u_variable_type,geometric_variable,err,error,*999)
291 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type,field_values_set_type,geometric_parameters, &
293 DO variable_idx=1,independent_field%NUMBER_OF_VARIABLES
294 variable_type=independent_field%VARIABLES(variable_idx)%VARIABLE_TYPE
295 field_variable=>independent_field%VARIABLE_TYPE_MAP(variable_type)%PTR
296 IF(
ASSOCIATED(field_variable))
THEN 297 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
298 IF(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 299 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
300 IF(
ASSOCIATED(domain))
THEN 301 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 302 domain_nodes=>domain%TOPOLOGY%NODES
303 IF(
ASSOCIATED(domain_nodes))
THEN 305 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
307 DO dim_idx=1,number_of_dimensions
309 local_ny=geometric_variable%COMPONENTS(dim_idx)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP% &
310 & nodes(node_idx)%DERIVATIVES(1)%VERSIONS(1)
311 x(dim_idx)=geometric_parameters(local_ny)
314 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
315 SELECT CASE(equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE)
318 IF(component_idx==1)
THEN 319 value_independent=sin(6*x(1))
321 value_independent=cos(6*x(2))
324 local_error=
"The analytic function type of "// &
327 CALL flagerror(local_error,err,error,*999)
330 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
331 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
332 CALL field_parameter_set_update_local_dof(independent_field,field_u_variable_type, &
333 & field_values_set_type,local_ny,value_independent,err,error,*999)
337 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
340 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
343 CALL flagerror(
"Domain is not associated.",err,error,*999)
346 CALL flagerror(
"Only node based interpolation is implemented.",err,error,*999)
349 CALL field_parameter_set_update_start(independent_field,field_u_variable_type,field_values_set_type, &
351 CALL field_parameter_set_update_finish(independent_field,field_u_variable_type,field_values_set_type, &
354 CALL flagerror(
"Field variable is not associated.",err,error,*999)
358 CALL field_parameter_set_data_restore(geometric_field,field_u_variable_type,field_values_set_type, &
359 & geometric_parameters,err,error,*999)
361 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
364 CALL flagerror(
"Equations set independent field is not associated.",err,error,*999)
367 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
370 CALL flagerror(
"Equations set is not associated.",err,error,*999)
374 IF(
ASSOCIATED(equations_set))
THEN 375 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 376 source_field=>equations_set%SOURCE%SOURCE_FIELD
377 IF(
ASSOCIATED(source_field))
THEN 378 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
379 IF(
ASSOCIATED(geometric_field))
THEN 380 CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
381 NULLIFY(geometric_variable)
382 CALL field_variable_get(geometric_field,field_u_variable_type,geometric_variable,err,error,*999)
383 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type,field_values_set_type,geometric_parameters, &
385 DO variable_idx=1,source_field%NUMBER_OF_VARIABLES
386 variable_type=source_field%VARIABLES(variable_idx)%VARIABLE_TYPE
387 field_variable=>source_field%VARIABLE_TYPE_MAP(variable_type)%PTR
388 IF(
ASSOCIATED(field_variable))
THEN 389 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
390 IF(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 391 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
392 IF(
ASSOCIATED(domain))
THEN 393 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 394 domain_nodes=>domain%TOPOLOGY%NODES
395 IF(
ASSOCIATED(domain_nodes))
THEN 397 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
399 DO dim_idx=1,number_of_dimensions
401 local_ny=geometric_variable%COMPONENTS(dim_idx)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP% &
402 & nodes(node_idx)%DERIVATIVES(1)%VERSIONS(1)
403 x(dim_idx)=geometric_parameters(local_ny)
406 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
407 SELECT CASE(equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE)
409 value_source= (1.0/peclet)*(2.0*tanh(-0.1e1+alpha*(tanphi*x(1)-x(2)))*(1.0-(tanh(-0.1e1+alpha*( &
410 & tanphi*x(1)-x(2)))**2))*alpha*alpha*tanphi*tanphi+2.0*tanh(-0.1e1+alpha*(tanphi*x(1)-x(2)) &
411 & )*(1.0-(tanh(-0.1e1+alpha*(tanphi*x(1)-x(2)))**2))*alpha*alpha-peclet*(-sin(6.0*x(2) &
412 & )*(1.0-(tanh(-0.1e1+alpha*(tanphi*x(1)-x(2)))**2))*alpha*tanphi+cos(6.0*x(1))*(1.0- &
413 & (tanh(-0.1e1+alpha*(tanphi*x(1)-x(2)))**2))*alpha))
415 local_error=
"The analytic function type of "// &
418 CALL flagerror(local_error,err,error,*999)
421 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
422 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
423 CALL field_parameter_set_update_local_dof(source_field,field_u_variable_type, &
424 & field_values_set_type,local_ny,value_source,err,error,*999)
428 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
431 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
434 CALL flagerror(
"Domain is not associated.",err,error,*999)
437 CALL flagerror(
"Only node based interpolation is implemented.",err,error,*999)
440 CALL field_parameter_set_update_start(source_field,field_u_variable_type,field_values_set_type, &
442 CALL field_parameter_set_update_finish(source_field,field_u_variable_type,field_values_set_type, &
445 CALL flagerror(
"Field variable is not associated.",err,error,*999)
448 CALL field_parameter_set_data_restore(geometric_field,field_u_variable_type,field_values_set_type, &
449 & geometric_parameters,err,error,*999)
451 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
454 CALL flagerror(
"Equations set source field is not associated.",err,error,*999)
457 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
460 CALL flagerror(
"Equations set is not associated.",err,error,*999)
464 IF(
ASSOCIATED(equations_set))
THEN 465 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 466 materials_field=>equations_set%MATERIALS%MATERIALS_FIELD
467 IF(
ASSOCIATED(materials_field))
THEN 468 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
469 IF(
ASSOCIATED(geometric_field))
THEN 470 CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
471 NULLIFY(geometric_variable)
472 CALL field_variable_get(geometric_field,field_u_variable_type,geometric_variable,err,error,*999)
473 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type,field_values_set_type,geometric_parameters, &
475 DO variable_idx=1,materials_field%NUMBER_OF_VARIABLES
476 variable_type=materials_field%VARIABLES(variable_idx)%VARIABLE_TYPE
477 field_variable=>materials_field%VARIABLE_TYPE_MAP(variable_type)%PTR
478 IF(
ASSOCIATED(field_variable))
THEN 479 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
480 SELECT CASE(equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE)
482 value_material= (1.0/peclet)
484 local_error=
"The analytic function type of "// &
487 CALL flagerror(local_error,err,error,*999)
489 CALL field_parameter_set_update_constant(materials_field,field_u_variable_type, &
490 & field_values_set_type,component_idx,value_material,err,error,*999)
492 CALL field_parameter_set_update_start(materials_field,field_u_variable_type,field_values_set_type, &
494 CALL field_parameter_set_update_finish(materials_field,field_u_variable_type,field_values_set_type, &
497 CALL flagerror(
"Field variable is not associated.",err,error,*999)
500 CALL field_parameter_set_data_restore(geometric_field,field_u_variable_type,field_values_set_type, &
501 & geometric_parameters,err,error,*999)
503 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
506 CALL flagerror(
"Equations set material field is not associated.",err,error,*999)
509 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
512 CALL flagerror(
"Equations set is not associated.",err,error,*999)
516 exits(
"AdvectionDiffusion_BoundaryConditionsAnalyticCalculate")
518 999
errors(
"AdvectionDiffusion_BoundaryConditionsAnalyticCalculate",err,error)
519 exits(
"AdvectionDiffusion_BoundaryConditionsAnalyticCalculate")
535 INTEGER(INTG),
INTENT(OUT) :: ERR
540 enters(
"AdvectionDiffusion_EquationsSetSetup",err,error,*999)
542 IF(
ASSOCIATED(equations_set))
THEN 543 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 544 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
545 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<3)
THEN 546 CALL flagerror(
"Equations set specification does not have a subtype set.",err,error,*999)
548 SELECT CASE(equations_set%SPECIFICATION(3))
557 CALL flagerror(
"Not implemented.",err,error,*999)
560 CALL flagerror(
"Not implemented.",err,error,*999)
570 CALL flagerror(
"Not implemented.",err,error,*999)
573 CALL flagerror(
"Not implemented.",err,error,*999)
583 CALL flagerror(
"Not implemented.",err,error,*999)
586 CALL flagerror(
"Not implemented.",err,error,*999)
603 CALL flagerror(
"Not implemented.",err,error,*999)
606 CALL flagerror(
"Not implemented.",err,error,*999)
622 local_error=
"Equations set subtype "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
623 &
" is not valid for an advection-diffusion equation type of a classical field equation set class." 624 CALL flagerror(local_error,err,error,*999)
627 CALL flagerror(
"Equations set is not associated.",err,error,*999)
630 exits(
"AdvectionDiffusion_EquationsSetSetup")
632 999
errors(
"AdvectionDiffusion_EquationsSetSetup",err,error)
633 exits(
"AdvectionDiffusion_EquationsSetSetup")
647 INTEGER(INTG),
INTENT(IN) :: SOLUTION_METHOD
648 INTEGER(INTG),
INTENT(OUT) :: ERR
653 enters(
"AdvectionDiffusion_EquationsSetSolnMethodSet",err,error,*999)
655 IF(
ASSOCIATED(equations_set))
THEN 656 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 657 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
658 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<3)
THEN 659 CALL flagerror(
"Equations set specification does not have a subtype set.",err,error,*999)
661 SELECT CASE(equations_set%SPECIFICATION(3))
684 SELECT CASE(solution_method)
688 CALL flagerror(
"Not implemented.",err,error,*999)
690 CALL flagerror(
"Not implemented.",err,error,*999)
692 CALL flagerror(
"Not implemented.",err,error,*999)
694 CALL flagerror(
"Not implemented.",err,error,*999)
696 CALL flagerror(
"Not implemented.",err,error,*999)
698 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 699 CALL flagerror(local_error,err,error,*999)
702 local_error=
"Equations set subtype of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
703 &
" is not valid for an advection-diffusion equation type of an classical field equations set class." 704 CALL flagerror(local_error,err,error,*999)
707 CALL flagerror(
"Equations set is not associated.",err,error,*999)
710 exits(
"AdvectionDiffusion_EquationsSetSolnMethodSet")
712 999
errors(
"AdvectionDiffusion_EquationsSetSolnMethodSet",err,error)
713 exits(
"AdvectionDiffusion_EquationsSetSolnMethodSet")
726 INTEGER(INTG),
INTENT(IN) :: specification(:)
727 INTEGER(INTG),
INTENT(OUT) :: err
731 INTEGER(INTG) :: subtype
733 enters(
"AdvectionDiffusion_EquationsSetSpecificationSet",err,error,*999)
735 IF(
ASSOCIATED(equationsset))
THEN 736 IF(
SIZE(specification,1)/=3)
THEN 737 CALL flagerror(
"Equations set specification must have three entries for an advection-diffusion type equations set.", &
740 subtype=specification(3)
773 localerror=
"The third equations set specification of "//
trim(
numbertovstring(subtype,
"*",err,error))// &
774 &
" is not valid for an advection-diffusion type of a classical field equations set." 775 CALL flagerror(localerror,err,error,*999)
778 IF(
ALLOCATED(equationsset%specification))
THEN 779 CALL flagerror(
"Equations set specification is already allocated.",err,error,*999)
781 ALLOCATE(equationsset%specification(3),stat=err)
782 IF(err/=0)
CALL flagerror(
"Could not allocate equations set specification.",err,error,*999)
786 CALL flagerror(
"Equations set is not associated.",err,error,*999)
789 exits(
"AdvectionDiffusion_EquationsSetSpecificationSet")
791 999
errors(
"AdvectionDiffusion_EquationsSetSpecificationSet",err,error)
792 exits(
"AdvectionDiffusion_EquationsSetSpecificationSet")
807 INTEGER(INTG),
INTENT(OUT) :: ERR
810 INTEGER(INTG) :: component_idx,GEOMETRIC_MESH_COMPONENT,GEOMETRIC_SCALING_TYPE,NUMBER_OF_DIMENSIONS, &
811 & NUMBER_OF_MATERIALS_COMPONENTS, NUMBER_OF_SOURCE_COMPONENTS, NUMBER_OF_INDEPENDENT_COMPONENTS,imy_matrix,Ncompartments,&
812 & GEOMETRIC_COMPONENT_NUMBER,NUMBER_OF_INDEPENDENT_U_VAR_COMPONENTS,NUMBER_OF_INDEPENDENT_V_VAR_COMPONENTS
821 TYPE(
field_type),
POINTER :: ANALYTIC_FIELD,DEPENDENT_FIELD,GEOMETRIC_FIELD,EQUATIONS_SET_FIELD_FIELD
823 INTEGER(INTG) :: num_var,num_var_count,NUMBER_OF_MATERIALS_COUPLING_COMPONENTS
824 INTEGER(INTG) :: EQUATIONS_SET_FIELD_NUMBER_OF_VARIABLES,EQUATIONS_SET_FIELD_NUMBER_OF_COMPONENTS
825 INTEGER(INTG),
POINTER :: EQUATIONS_SET_FIELD_DATA(:)
826 INTEGER(INTG),
ALLOCATABLE :: VARIABLE_TYPES(:),VARIABLE_U_TYPES(:),COUPLING_MATRIX_STORAGE_TYPE(:), &
827 & COUPLING_MATRIX_STRUCTURE_TYPE(:)
828 INTEGER(INTG) :: EQUATIONS_SET_SUBTYPE
830 enters(
"ADVECTION_DIFFUSION_EQUATION_EQUATION_SET_LINEAR_SETUP",err,error,*999)
833 NULLIFY(equations_mapping)
834 NULLIFY(equations_matrices)
835 NULLIFY(geometric_decomposition)
837 IF(
ASSOCIATED(equations_set))
THEN 838 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 839 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
840 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<3)
THEN 841 CALL flagerror(
"Equations set specification does not have a subtype set.",err,error,*999)
843 equations_set_subtype=equations_set%SPECIFICATION(3)
865 SELECT CASE(equations_set_setup%SETUP_TYPE)
867 SELECT CASE(equations_set_setup%ACTION_TYPE)
873 equations_set_field_number_of_variables = 1
874 equations_set_field_number_of_components = 2
875 equations_equations_set_field=>equations_set%EQUATIONS_SET_FIELD
876 IF(equations_equations_set_field%EQUATIONS_SET_FIELD_AUTO_CREATED)
THEN 878 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION, &
879 & equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,err,error,*999)
880 CALL field_label_set(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,
"Equations Set Field",err,error,*999)
881 CALL field_type_set_and_lock(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,field_general_type,&
883 CALL field_dependent_type_set_and_lock(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,&
884 & field_independent_type,err,error,*999)
885 CALL field_number_of_variables_set(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD, &
886 & equations_set_field_number_of_variables,err,error,*999)
887 CALL field_variable_types_set_and_lock(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,&
888 & [field_u_variable_type],err,error,*999)
889 CALL field_dimension_set_and_lock(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,field_u_variable_type, &
890 & field_vector_dimension_type,err,error,*999)
891 CALL field_data_type_set_and_lock(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,field_u_variable_type, &
892 & field_intg_type,err,error,*999)
893 CALL field_number_of_components_set_and_lock(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,&
894 & field_u_variable_type,equations_set_field_number_of_components,err,error,*999)
897 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
898 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
899 CALL field_number_of_variables_check(equations_set_setup%FIELD,equations_set_field_number_of_variables, &
901 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
902 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
904 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_intg_type,err,error,*999)
905 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
906 & equations_set_field_number_of_components,err,error,*999)
912 IF(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_AUTO_CREATED)
THEN 913 CALL field_create_finish(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD,err,error,*999)
914 CALL field_component_values_initialise(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD,&
915 & field_u_variable_type,field_values_set_type, 1, 1_intg, err, error, *999)
916 CALL field_component_values_initialise(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD,&
917 & field_u_variable_type,field_values_set_type, 2, 1_intg, err, error, *999)
922 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
924 &
" is invalid for a linear advection-diffusion equation." 925 CALL flagerror(local_error,err,error,*999)
929 SELECT CASE(equations_set_subtype)
934 SELECT CASE(equations_set_setup%ACTION_TYPE)
936 equations_set_field_number_of_components = 2
937 equations_equations_set_field=>equations_set%EQUATIONS_SET_FIELD
938 IF(equations_equations_set_field%EQUATIONS_SET_FIELD_AUTO_CREATED)
THEN 939 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
940 CALL field_mesh_decomposition_set_and_lock(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,&
941 & geometric_decomposition,err,error,*999)
942 CALL field_geometric_field_set_and_lock(equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,&
943 & equations_set%GEOMETRY%GEOMETRIC_FIELD,err,error,*999)
944 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
945 & 1,geometric_component_number,err,error,*999)
946 DO component_idx = 1, equations_set_field_number_of_components
947 CALL field_component_mesh_component_set_and_lock(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD, &
948 & field_u_variable_type,component_idx,geometric_component_number,err,error,*999)
949 CALL field_component_interpolation_set_and_lock(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD, &
950 & field_u_variable_type,component_idx,field_constant_interpolation,err,error,*999)
953 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
954 CALL field_scaling_type_set(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD,geometric_scaling_type, &
962 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
964 &
" is invalid for a linear advection-diffusion equation." 965 CALL flagerror(local_error,err,error,*999)
974 CALL field_parameter_set_create(equations_set%GEOMETRY%GEOMETRIC_FIELD, field_u_variable_type, &
975 & field_mesh_displacement_set_type, err, error, *999)
976 CALL field_parameter_set_create(equations_set%GEOMETRY%GEOMETRIC_FIELD, field_u_variable_type, &
977 & field_mesh_velocity_set_type, err, error, *999)
983 SELECT CASE(equations_set_setup%ACTION_TYPE)
985 SELECT CASE(equations_set_subtype)
1006 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 1008 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
1009 & dependent_field,err,error,*999)
1010 CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
1011 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
1012 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
1013 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
1014 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
1016 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
1017 & geometric_field,err,error,*999)
1018 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,2,err,error,*999)
1019 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
1020 & field_deludeln_variable_type],err,error,*999)
1021 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
1022 & field_scalar_dimension_type,err,error,*999)
1023 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
1024 & field_scalar_dimension_type,err,error,*999)
1025 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
1026 & field_dp_type,err,error,*999)
1027 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
1028 & field_dp_type,err,error,*999)
1029 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
1031 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1032 & field_deludeln_variable_type,1,err,error,*999)
1034 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
1035 & geometric_mesh_component,err,error,*999)
1036 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
1037 & geometric_mesh_component,err,error,*999)
1038 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
1039 & geometric_mesh_component,err,error,*999)
1040 SELECT CASE(equations_set%SOLUTION_METHOD)
1042 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1043 & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
1044 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1045 & field_deludeln_variable_type,1,field_node_based_interpolation,err,error,*999)
1047 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
1048 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
1050 CALL flagerror(
"Not implemented.",err,error,*999)
1052 CALL flagerror(
"Not implemented.",err,error,*999)
1054 CALL flagerror(
"Not implemented.",err,error,*999)
1056 CALL flagerror(
"Not implemented.",err,error,*999)
1058 CALL flagerror(
"Not implemented.",err,error,*999)
1060 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1062 CALL flagerror(local_error,err,error,*999)
1065 SELECT CASE(equations_set_subtype)
1069 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
1070 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
1071 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
1072 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
1073 & field_values_set_type,equations_set_field_data,err,error,*999)
1074 ncompartments=equations_set_field_data(2)
1075 CALL field_number_of_variables_check(equations_set_setup%FIELD,2*ncompartments,err,error,*999)
1077 ALLOCATE(variable_types(2*ncompartments))
1078 DO num_var=1,ncompartments
1079 variable_types(2*num_var-1)=field_u_variable_type+(field_number_of_variable_subtypes*(num_var-1))
1080 variable_types(2*num_var)=field_deludeln_variable_type+(field_number_of_variable_subtypes*(num_var-1))
1082 CALL field_variable_types_check(equations_set_setup%FIELD,variable_types,err,error,*999)
1084 DO num_var=1,2*ncompartments
1085 CALL field_dimension_check(equations_set_setup%FIELD,variable_types(num_var), &
1086 & field_scalar_dimension_type,err,error,*999)
1087 CALL field_data_type_check(equations_set_setup%FIELD,variable_types(num_var),field_dp_type,err,error,*999)
1088 CALL field_number_of_components_check(equations_set_setup%FIELD,variable_types(num_var),1, &
1091 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1092 & number_of_dimensions,err,error,*999)
1093 SELECT CASE(equations_set%SOLUTION_METHOD)
1096 DO num_var=1,2*ncompartments
1097 CALL field_component_interpolation_check(equations_set_setup%FIELD,variable_types(num_var),component_idx, &
1098 & field_node_based_interpolation,err,error,*999)
1101 CALL flagerror(
"Not implemented.",err,error,*999)
1103 CALL flagerror(
"Not implemented.",err,error,*999)
1105 CALL flagerror(
"Not implemented.",err,error,*999)
1107 CALL flagerror(
"Not implemented.",err,error,*999)
1109 CALL flagerror(
"Not implemented.",err,error,*999)
1111 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1113 CALL flagerror(local_error,err,error,*999)
1117 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
1118 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
1119 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
1120 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type], &
1122 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type, &
1124 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_scalar_dimension_type, &
1126 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1127 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
1128 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1129 & number_of_dimensions,err,error,*999)
1130 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_dimensions, &
1132 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
1133 & number_of_dimensions,err,error,*999)
1134 SELECT CASE(equations_set%SOLUTION_METHOD)
1138 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,component_idx, &
1139 & field_node_based_interpolation,err,error,*999)
1140 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
1141 & component_idx,field_node_based_interpolation,err,error,*999)
1144 CALL flagerror(
"Not implemented.",err,error,*999)
1146 CALL flagerror(
"Not implemented.",err,error,*999)
1148 CALL flagerror(
"Not implemented.",err,error,*999)
1150 CALL flagerror(
"Not implemented.",err,error,*999)
1152 CALL flagerror(
"Not implemented.",err,error,*999)
1154 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1156 CALL flagerror(local_error,err,error,*999)
1162 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 1164 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
1165 & dependent_field,err,error,*999)
1166 CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
1167 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
1168 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
1169 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
1170 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
1172 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
1173 & geometric_field,err,error,*999)
1174 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,4,err,error,*999)
1175 CALL field_variable_types_set_and_lock(equations_set_setup%FIELD,[field_u_variable_type, &
1176 & field_deludeln_variable_type,field_v_variable_type,field_delvdeln_variable_type],err,error,*999)
1177 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
1178 & field_scalar_dimension_type,err,error,*999)
1179 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
1180 & field_scalar_dimension_type,err,error,*999)
1181 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
1182 & field_scalar_dimension_type,err,error,*999)
1183 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
1184 & field_scalar_dimension_type,err,error,*999)
1185 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
1186 & field_dp_type,err,error,*999)
1187 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
1188 & field_dp_type,err,error,*999)
1189 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
1190 & field_dp_type,err,error,*999)
1191 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
1192 & field_dp_type,err,error,*999)
1194 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
1196 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1197 & field_deludeln_variable_type,1,err,error,*999)
1198 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
1200 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
1203 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
1204 & geometric_mesh_component,err,error,*999)
1205 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
1206 & geometric_mesh_component,err,error,*999)
1207 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
1208 & geometric_mesh_component,err,error,*999)
1209 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
1210 & geometric_mesh_component,err,error,*999)
1211 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type,1, &
1212 & geometric_mesh_component,err,error,*999)
1213 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type,1, &
1214 & geometric_mesh_component,err,error,*999)
1215 SELECT CASE(equations_set%SOLUTION_METHOD)
1217 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1218 & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
1219 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1220 & field_deludeln_variable_type,1,field_node_based_interpolation,err,error,*999)
1221 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1222 & field_v_variable_type,1,field_node_based_interpolation,err,error,*999)
1223 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1224 & field_delvdeln_variable_type,1,field_node_based_interpolation,err,error,*999)
1226 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
1227 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
1229 CALL flagerror(
"Not implemented.",err,error,*999)
1231 CALL flagerror(
"Not implemented.",err,error,*999)
1233 CALL flagerror(
"Not implemented.",err,error,*999)
1235 CALL flagerror(
"Not implemented.",err,error,*999)
1237 CALL flagerror(
"Not implemented.",err,error,*999)
1239 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1241 CALL flagerror(local_error,err,error,*999)
1245 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
1246 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
1247 CALL field_number_of_variables_check(equations_set_setup%FIELD,4,err,error,*999)
1248 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type,&
1249 & field_v_variable_type,field_delvdeln_variable_type],err,error,*999)
1251 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type, &
1253 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_scalar_dimension_type, &
1255 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_scalar_dimension_type, &
1257 CALL field_dimension_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_scalar_dimension_type, &
1259 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1260 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
1261 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
1262 CALL field_data_type_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_dp_type,err,error,*999)
1263 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1264 & number_of_dimensions,err,error,*999)
1265 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1, &
1267 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
1269 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type,1, &
1271 CALL field_number_of_components_check(equations_set_setup%FIELD,field_delvdeln_variable_type, &
1273 SELECT CASE(equations_set%SOLUTION_METHOD)
1277 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,component_idx, &
1278 & field_node_based_interpolation,err,error,*999)
1279 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
1280 & component_idx,field_node_based_interpolation,err,error,*999)
1281 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,component_idx, &
1282 & field_node_based_interpolation,err,error,*999)
1283 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_delvdeln_variable_type, &
1284 & component_idx,field_node_based_interpolation,err,error,*999)
1287 CALL flagerror(
"Not implemented.",err,error,*999)
1289 CALL flagerror(
"Not implemented.",err,error,*999)
1291 CALL flagerror(
"Not implemented.",err,error,*999)
1293 CALL flagerror(
"Not implemented.",err,error,*999)
1295 CALL flagerror(
"Not implemented.",err,error,*999)
1297 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1299 CALL flagerror(local_error,err,error,*999)
1304 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 1305 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
1306 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
1307 & field_boundary_conditions_set_type,err,error,*999)
1310 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1311 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1312 &
" is invalid for a linear advection-diffusion equation" 1313 CALL flagerror(local_error,err,error,*999)
1319 SELECT CASE(equations_set_setup%ACTION_TYPE)
1321 equations_materials=>equations_set%MATERIALS
1322 IF(
ASSOCIATED(equations_materials))
THEN 1323 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 1326 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_materials% &
1327 & materials_field,err,error,*999)
1328 CALL field_label_set(equations_materials%MATERIALS_FIELD,
"Materials Field",err,error,*999)
1329 CALL field_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_material_type,err,error,*999)
1330 CALL field_dependent_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_independent_type,err,error,*999)
1331 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
1332 CALL field_mesh_decomposition_set_and_lock(equations_materials%MATERIALS_FIELD,geometric_decomposition, &
1334 CALL field_geometric_field_set_and_lock(equations_materials%MATERIALS_FIELD,equations_set%GEOMETRY% &
1335 & geometric_field,err,error,*999)
1336 CALL field_number_of_variables_set_and_lock(equations_materials%MATERIALS_FIELD,2,err,error,*999)
1337 CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,[field_u_variable_type, &
1338 & field_v_variable_type], &
1340 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1341 & field_vector_dimension_type,err,error,*999)
1342 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1343 & field_dp_type,err,error,*999)
1344 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
1345 & field_vector_dimension_type,err,error,*999)
1346 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
1347 & field_dp_type,err,error,*999)
1348 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1349 & number_of_dimensions,err,error,*999)
1350 number_of_materials_components=number_of_dimensions
1352 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1353 & number_of_materials_components,err,error,*999)
1354 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
1355 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
1356 & field_values_set_type,equations_set_field_data,err,error,*999)
1357 ncompartments=equations_set_field_data(2)
1358 number_of_materials_coupling_components=ncompartments
1359 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
1360 & number_of_materials_coupling_components,err,error,*999)
1362 DO component_idx=1,number_of_dimensions
1363 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1364 & component_idx,geometric_mesh_component,err,error,*999)
1365 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1366 & component_idx,field_constant_interpolation,err,error,*999)
1367 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1368 & component_idx,geometric_mesh_component,err,error,*999)
1370 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1371 & 1,geometric_mesh_component,err,error,*999)
1372 DO component_idx=1,number_of_materials_coupling_components
1373 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
1374 & component_idx,field_constant_interpolation,err,error,*999)
1375 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
1376 & component_idx,geometric_mesh_component,err,error,*999)
1379 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
1380 CALL field_scaling_type_set(equations_materials%MATERIALS_FIELD,geometric_scaling_type,err,error,*999)
1383 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_materials% &
1384 & materials_field,err,error,*999)
1385 CALL field_label_set(equations_materials%MATERIALS_FIELD,
"Materials Field",err,error,*999)
1386 CALL field_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_material_type,err,error,*999)
1387 CALL field_dependent_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_independent_type,err,error,*999)
1388 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
1389 CALL field_mesh_decomposition_set_and_lock(equations_materials%MATERIALS_FIELD,geometric_decomposition, &
1391 CALL field_geometric_field_set_and_lock(equations_materials%MATERIALS_FIELD,equations_set%GEOMETRY% &
1392 & geometric_field,err,error,*999)
1393 CALL field_number_of_variables_set_and_lock(equations_materials%MATERIALS_FIELD,1,err,error,*999)
1394 CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,[field_u_variable_type], &
1396 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1397 & field_vector_dimension_type,err,error,*999)
1398 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1399 & field_dp_type,err,error,*999)
1400 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1401 & number_of_dimensions,err,error,*999)
1414 number_of_materials_components=number_of_dimensions
1423 number_of_materials_components=number_of_dimensions+1
1425 number_of_materials_components=number_of_dimensions
1428 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1429 & number_of_materials_components,err,error,*999)
1431 DO component_idx=1,number_of_dimensions
1432 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1433 & component_idx,geometric_mesh_component,err,error,*999)
1434 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1435 & component_idx,field_constant_interpolation,err,error,*999)
1436 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1437 & component_idx,geometric_mesh_component,err,error,*999)
1442 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1443 & 1,geometric_mesh_component,err,error,*999)
1444 DO component_idx=number_of_dimensions+1,number_of_materials_components
1445 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1446 & component_idx,field_constant_interpolation,err,error,*999)
1447 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1448 & component_idx,geometric_mesh_component,err,error,*999)
1452 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
1453 CALL field_scaling_type_set(equations_materials%MATERIALS_FIELD,geometric_scaling_type,err,error,*999)
1458 CALL field_type_check(equations_set_setup%FIELD,field_material_type,err,error,*999)
1459 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
1460 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
1461 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type, &
1462 & field_v_variable_type],err,error,*999)
1463 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
1465 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1466 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_vector_dimension_type, &
1468 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
1469 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1470 & number_of_dimensions,err,error,*999)
1471 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_dimensions, &
1473 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
1474 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
1475 & field_values_set_type,equations_set_field_data,err,error,*999)
1476 ncompartments=equations_set_field_data(2)
1477 number_of_materials_coupling_components=ncompartments
1478 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type, &
1479 & number_of_materials_coupling_components,err,error,*999)
1482 CALL field_type_check(equations_set_setup%FIELD,field_material_type,err,error,*999)
1483 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
1484 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
1485 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
1486 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
1488 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1489 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1490 & number_of_dimensions,err,error,*999)
1503 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_dimensions, &
1511 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_dimensions+1, &
1517 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
1520 equations_materials=>equations_set%MATERIALS
1521 IF(
ASSOCIATED(equations_materials))
THEN 1522 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 1524 CALL field_create_finish(equations_materials%MATERIALS_FIELD,err,error,*999)
1526 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1527 & number_of_dimensions,err,error,*999)
1542 number_of_materials_components=number_of_dimensions
1551 number_of_materials_components=number_of_dimensions+1
1553 number_of_materials_components=number_of_dimensions
1556 DO component_idx=1,number_of_dimensions
1558 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1559 & field_values_set_type,component_idx,1.0_dp,err,error,*999)
1563 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
1564 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
1565 & field_values_set_type,equations_set_field_data,err,error,*999)
1566 ncompartments=equations_set_field_data(2)
1567 DO component_idx=1,ncompartments
1568 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
1569 & field_values_set_type,component_idx,0.0_dp,err,error,*999)
1579 DO component_idx=number_of_dimensions+1,number_of_materials_components
1580 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1581 & field_values_set_type,component_idx,1.0_dp,err,error,*999)
1586 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
1589 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1590 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1591 &
" is invalid for a linear advection-diffusion equation." 1592 CALL flagerror(local_error,err,error,*999)
1598 SELECT CASE(equations_set_setup%ACTION_TYPE)
1600 equations_source=>equations_set%SOURCE
1601 IF(
ASSOCIATED(equations_source))
THEN 1602 IF(equations_source%SOURCE_FIELD_AUTO_CREATED)
THEN 1604 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_source% &
1606 CALL field_label_set(equations_source%SOURCE_FIELD,
"Source Field",err,error,*999)
1607 CALL field_type_set_and_lock(equations_source%SOURCE_FIELD,field_general_type,err,error,*999)
1608 CALL field_dependent_type_set_and_lock(equations_source%SOURCE_FIELD,field_independent_type,err,error,*999)
1609 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
1610 CALL field_mesh_decomposition_set_and_lock(equations_source%SOURCE_FIELD,geometric_decomposition, &
1612 CALL field_geometric_field_set_and_lock(equations_source%SOURCE_FIELD,equations_set%GEOMETRY% &
1613 & geometric_field,err,error,*999)
1614 CALL field_number_of_variables_set_and_lock(equations_source%SOURCE_FIELD,1,err,error,*999)
1615 CALL field_variable_types_set_and_lock(equations_source%SOURCE_FIELD,[field_u_variable_type], &
1617 CALL field_dimension_set_and_lock(equations_source%SOURCE_FIELD,field_u_variable_type, &
1618 & field_scalar_dimension_type,err,error,*999)
1619 CALL field_data_type_set_and_lock(equations_source%SOURCE_FIELD,field_u_variable_type, &
1620 & field_dp_type,err,error,*999)
1621 number_of_source_components=1
1623 CALL field_number_of_components_set_and_lock(equations_source%SOURCE_FIELD,field_u_variable_type, &
1624 & number_of_source_components,err,error,*999)
1640 DO component_idx=1,number_of_source_components
1641 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1642 & component_idx,geometric_mesh_component,err,error,*999)
1643 CALL field_component_mesh_component_set(equations_source%SOURCE_FIELD,field_u_variable_type, &
1644 & component_idx,geometric_mesh_component,err,error,*999)
1645 CALL field_component_interpolation_set(equations_source%SOURCE_FIELD,field_u_variable_type, &
1646 & component_idx,field_node_based_interpolation,err,error,*999)
1650 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
1651 CALL field_scaling_type_set(equations_source%SOURCE_FIELD,geometric_scaling_type,err,error,*999)
1654 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
1655 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
1656 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
1657 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
1658 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type, &
1660 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1661 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1, &
1665 CALL flagerror(
"Equations set source is not associated.",err,error,*999)
1668 equations_source=>equations_set%SOURCE
1669 IF(
ASSOCIATED(equations_source))
THEN 1670 IF(equations_source%SOURCE_FIELD_AUTO_CREATED)
THEN 1672 CALL field_create_finish(equations_source%SOURCE_FIELD,err,error,*999)
1674 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1675 & number_of_dimensions,err,error,*999)
1690 number_of_source_components=1
1692 number_of_source_components=0
1695 DO component_idx=1,number_of_source_components
1696 CALL field_component_values_initialise(equations_source%SOURCE_FIELD,field_u_variable_type, &
1697 & field_values_set_type,component_idx,1.0_dp,err,error,*999)
1701 CALL flagerror(
"Equations set source is not associated.",err,error,*999)
1704 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1705 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1706 &
" is invalid for a linear advection-diffusion equation." 1707 CALL flagerror(local_error,err,error,*999)
1714 SELECT CASE(equations_set_setup%ACTION_TYPE)
1716 equations_independent=>equations_set%INDEPENDENT
1717 IF(
ASSOCIATED(equations_independent))
THEN 1720 IF(equations_independent%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 1722 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_independent% &
1723 & independent_field,err,error,*999)
1724 CALL field_label_set(equations_independent%INDEPENDENT_FIELD,
"Independent Field",err,error,*999)
1725 CALL field_type_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_general_type,err,error,*999)
1726 CALL field_dependent_type_set_and_lock(equations_independent%INDEPENDENT_FIELD, &
1727 & field_independent_type,err,error,*999)
1728 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
1729 CALL field_mesh_decomposition_set_and_lock(equations_independent%INDEPENDENT_FIELD,geometric_decomposition, &
1731 CALL field_geometric_field_set_and_lock(equations_independent%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
1732 & geometric_field,err,error,*999)
1733 CALL field_number_of_variables_set_and_lock(equations_independent%INDEPENDENT_FIELD,2,err,error,*999)
1734 CALL field_variable_types_set_and_lock(equations_independent%INDEPENDENT_FIELD,[field_u_variable_type, &
1735 & field_v_variable_type],err,error,*999)
1736 CALL field_dimension_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_u_variable_type, &
1737 & field_vector_dimension_type,err,error,*999)
1738 CALL field_data_type_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_u_variable_type, &
1739 & field_dp_type,err,error,*999)
1740 CALL field_dimension_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_v_variable_type, &
1741 & field_vector_dimension_type,err,error,*999)
1742 CALL field_data_type_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_v_variable_type, &
1743 & field_dp_type,err,error,*999)
1744 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1745 & number_of_dimensions,err,error,*999)
1746 number_of_independent_u_var_components=number_of_dimensions
1747 CALL field_number_of_components_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_u_variable_type, &
1748 & number_of_independent_u_var_components,err,error,*999)
1749 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
1750 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
1751 & field_values_set_type,equations_set_field_data,err,error,*999)
1752 ncompartments=equations_set_field_data(2)
1753 number_of_independent_v_var_components=ncompartments-1
1755 CALL field_number_of_components_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_v_variable_type, &
1756 & number_of_independent_v_var_components,err,error,*999)
1758 DO component_idx=1,number_of_independent_u_var_components
1759 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1760 & component_idx,geometric_mesh_component,err,error,*999)
1761 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
1762 & field_u_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
1763 CALL field_component_mesh_component_set(equations_independent%INDEPENDENT_FIELD,field_u_variable_type, &
1764 & component_idx,geometric_mesh_component,err,error,*999)
1766 DO component_idx=1,number_of_independent_v_var_components
1767 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1768 & 1,geometric_mesh_component,err,error,*999)
1769 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
1770 & field_v_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
1771 CALL field_component_mesh_component_set(equations_independent%INDEPENDENT_FIELD,field_v_variable_type, &
1772 & component_idx,geometric_mesh_component,err,error,*999)
1775 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
1776 CALL field_scaling_type_set(equations_independent%INDEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
1779 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
1780 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
1781 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
1782 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_v_variable_type],&
1784 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
1786 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_vector_dimension_type, &
1788 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1789 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
1790 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1791 & number_of_dimensions,err,error,*999)
1792 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_dimensions, &
1794 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
1795 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
1796 & field_values_set_type,equations_set_field_data,err,error,*999)
1797 ncompartments=equations_set_field_data(2)
1798 number_of_independent_v_var_components=ncompartments-1
1799 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
1800 & number_of_independent_v_var_components,err,error,*999)
1801 DO component_idx=1,number_of_independent_u_var_components
1802 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
1803 & field_node_based_interpolation,err,error,*999)
1805 DO component_idx=1,number_of_independent_v_var_components
1806 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,component_idx, &
1807 & field_node_based_interpolation,err,error,*999)
1811 IF(equations_independent%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 1813 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_independent% &
1814 & independent_field,err,error,*999)
1815 CALL field_label_set(equations_independent%INDEPENDENT_FIELD,
"Independent Field",err,error,*999)
1816 CALL field_type_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_general_type,err,error,*999)
1817 CALL field_dependent_type_set_and_lock(equations_independent%INDEPENDENT_FIELD, &
1818 & field_independent_type,err,error,*999)
1819 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
1820 CALL field_mesh_decomposition_set_and_lock(equations_independent%INDEPENDENT_FIELD,geometric_decomposition, &
1822 CALL field_geometric_field_set_and_lock(equations_independent%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
1823 & geometric_field,err,error,*999)
1824 CALL field_number_of_variables_set_and_lock(equations_independent%INDEPENDENT_FIELD,1,err,error,*999)
1825 CALL field_variable_types_set_and_lock(equations_independent%INDEPENDENT_FIELD,[field_u_variable_type], &
1827 CALL field_dimension_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_u_variable_type, &
1828 & field_vector_dimension_type,err,error,*999)
1829 CALL field_data_type_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_u_variable_type, &
1830 & field_dp_type,err,error,*999)
1831 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1832 & number_of_dimensions,err,error,*999)
1833 number_of_independent_components=number_of_dimensions
1835 CALL field_number_of_components_set_and_lock(equations_independent%INDEPENDENT_FIELD,field_u_variable_type, &
1836 & number_of_independent_components,err,error,*999)
1838 DO component_idx=1,number_of_dimensions
1839 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1840 & component_idx,geometric_mesh_component,err,error,*999)
1841 CALL field_component_mesh_component_set(equations_independent%INDEPENDENT_FIELD,field_u_variable_type, &
1842 & component_idx,geometric_mesh_component,err,error,*999)
1843 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
1844 & field_u_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
1847 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
1848 CALL field_scaling_type_set(equations_independent%INDEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
1851 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
1852 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
1853 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
1854 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
1855 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
1857 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1858 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1859 & number_of_dimensions,err,error,*999)
1860 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_dimensions, &
1862 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
1863 & field_node_based_interpolation,err,error,*999)
1867 CALL flagerror(
"Equations set independent is not associated.",err,error,*999)
1870 equations_independent=>equations_set%INDEPENDENT
1871 IF(
ASSOCIATED(equations_independent))
THEN 1872 IF(equations_independent%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 1874 CALL field_create_finish(equations_independent%INDEPENDENT_FIELD,err,error,*999)
1876 CALL field_parameter_set_create(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
1877 & field_input_data1_set_type,err,error,*999)
1894 CALL flagerror(
"Equations set independent is not associated.",err,error,*999)
1897 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1898 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1899 &
" is invalid for a linear advection-diffusion equation." 1900 CALL flagerror(local_error,err,error,*999)
1906 SELECT CASE(equations_set_setup%ACTION_TYPE)
1908 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 1909 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
1910 IF(
ASSOCIATED(dependent_field))
THEN 1911 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
1912 IF(
ASSOCIATED(geometric_field))
THEN 1913 CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
1914 SELECT CASE(equations_set_setup%ANALYTIC_FUNCTION_TYPE)
1916 IF(number_of_dimensions/=2)
THEN 1917 local_error=
"The number of geometric dimensions of "// &
1919 &
" is invalid. The analytic function type of "// &
1921 &
" requires that there be 2 geometric dimensions." 1922 CALL flagerror(local_error,err,error,*999)
1924 equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE= &
1927 local_error=
"The specified analytic function type of "// &
1929 &
" is invalid for a linear advection-diffusion equation." 1930 CALL flagerror(local_error,err,error,*999)
1933 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
1936 CALL flagerror(
"Equations set dependent field is not associated.",err,error,*999)
1939 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
1942 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 1943 analytic_field=>equations_set%ANALYTIC%ANALYTIC_FIELD
1944 IF(
ASSOCIATED(analytic_field))
THEN 1945 IF(equations_set%ANALYTIC%ANALYTIC_FIELD_AUTO_CREATED)
THEN 1946 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
1950 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
1953 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1954 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1955 &
" is invalid for a linear advection-diffusion equation." 1956 CALL flagerror(local_error,err,error,*999)
1962 SELECT CASE(equations_set_setup%ACTION_TYPE)
1964 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 1991 CALL flagerror(
"Equations set subtype not valid.",err,error,*999)
1994 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
1997 SELECT CASE(equations_set%SOLUTION_METHOD)
2018 SELECT CASE(equations_set_subtype)
2047 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
2048 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
2049 & field_values_set_type,equations_set_field_data,err,error,*999)
2050 imy_matrix = equations_set_field_data(1)
2051 ncompartments = equations_set_field_data(2)
2056 ALLOCATE(variable_types(2*ncompartments))
2057 ALLOCATE(variable_u_types(ncompartments-1))
2058 DO num_var=1,ncompartments
2059 variable_types(2*num_var-1)=field_u_variable_type+(field_number_of_variable_subtypes*(num_var-1))
2060 variable_types(2*num_var)=field_deludeln_variable_type+(field_number_of_variable_subtypes*(num_var-1))
2063 DO num_var=1,ncompartments
2064 IF(num_var/=imy_matrix)
THEN 2065 num_var_count=num_var_count+1
2066 variable_u_types(num_var_count)=variable_types(2*num_var-1)
2087 SELECT CASE(equations%SPARSITY_TYPE)
2099 ALLOCATE(coupling_matrix_storage_type(ncompartments-1))
2100 ALLOCATE(coupling_matrix_structure_type(ncompartments-1))
2101 DO num_var=1,ncompartments-1
2106 & coupling_matrix_storage_type, &
2109 coupling_matrix_structure_type,err,error,*999)
2112 local_error=
"The equations matrices sparsity type of "// &
2114 CALL flagerror(local_error,err,error,*999)
2142 SELECT CASE(equations%SPARSITY_TYPE)
2152 local_error=
"The equations matrices sparsity type of "// &
2154 CALL flagerror(local_error,err,error,*999)
2159 CALL flagerror(
"Not implemented.",err,error,*999)
2161 CALL flagerror(
"Not implemented.",err,error,*999)
2163 CALL flagerror(
"Not implemented.",err,error,*999)
2165 CALL flagerror(
"Not implemented.",err,error,*999)
2167 CALL flagerror(
"Not implemented.",err,error,*999)
2169 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
2171 CALL flagerror(local_error,err,error,*999)
2174 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2175 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2176 &
" is invalid for a linear advection-diffusion equation." 2177 CALL flagerror(local_error,err,error,*999)
2180 local_error=
"The setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2181 &
" is invalid for a linear advection-diffusion equation." 2182 CALL flagerror(local_error,err,error,*999)
2185 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set_subtype,
"*",err,error))// &
2186 &
" is not a linear advection-diffusion equation subtype." 2187 CALL flagerror(local_error,err,error,*999)
2190 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2193 exits(
"AdvectionDiffusion_EquationsSetLinearSetup")
2195 999
errors(
"AdvectionDiffusion_EquationsSetLinearSetup",err,error)
2196 exits(
"AdvectionDiffusion_EquationsSetLinearSetup")
2229 INTEGER(INTG),
INTENT(OUT) :: ERR
2234 enters(
"ADVECTION_DIFFUSION_EQUATION_PROBLEM_SETUP",err,error,*999)
2236 IF(
ASSOCIATED(problem))
THEN 2237 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 2238 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
2239 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 2240 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
2242 SELECT CASE(problem%SPECIFICATION(3))
2248 CALL flagerror(
"Not implemented.",err,error,*999)
2255 CALL flagerror(
"Not implemented.",err,error,*999)
2262 CALL flagerror(
"Not implemented.",err,error,*999)
2266 &
" is not valid for an advection-diffusion equation type of a classical field problem class." 2267 CALL flagerror(local_error,err,error,*999)
2270 CALL flagerror(
"Problem is not associated.",err,error,*999)
2273 exits(
"ADVECTION_DIFFUSION_EQUATION_PROBLEM_SETUP")
2275 999 errorsexits(
"ADVECTION_DIFFUSION_EQUATION_PROBLEM_SETUP",err,error)
2288 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
2289 INTEGER(INTG),
INTENT(OUT) :: ERR
2292 INTEGER(INTG) mh,mhs,ms,ng,nh,nhs,ni,nj,ns,FIELD_VAR_TYPE,my_compartment,Ncompartments,imatrix,num_var_count
2293 INTEGER(INTG) :: MESH_COMPONENT_1, MESH_COMPONENT_2
2294 REAL(DP) :: C_PARAM,K_PARAM,RWG,SUM,PGMJ(3),PGNJ(3),ADVEC_VEL,A_PARAM,COUPLING_PARAM,PGM,PGN
2295 TYPE(
basis_type),
POINTER :: DEPENDENT_BASIS,GEOMETRIC_BASIS
2296 TYPE(
basis_type),
POINTER :: DEPENDENT_BASIS_1, DEPENDENT_BASIS_2
2307 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,MATERIALS_FIELD,SOURCE_FIELD,INDEPENDENT_FIELD,EQUATIONS_SET_FIELD
2311 INTEGER(INTG) :: FIELD_VAR_TYPES(99)
2317 INTEGER(INTG),
POINTER :: EQUATIONS_SET_FIELD_DATA(:)
2318 LOGICAL :: UPDATE_DAMPING_MATRIX,UPDATE_STIFFNESS_MATRIX,UPDATE_RHS_VECTOR,UPDATE_SOURCE_VECTOR
2319 INTEGER(INTG) :: EQUATIONS_SET_SUBTYPE
2321 update_damping_matrix = .false.
2322 update_stiffness_matrix = .false.
2323 update_rhs_vector = .false.
2324 update_source_vector = .false.
2326 enters(
"AdvectionDiffusion_FiniteElementCalculate",err,error,*999)
2328 IF(
ASSOCIATED(equations_set))
THEN 2329 equations=>equations_set%EQUATIONS
2331 IF(
ASSOCIATED(equations))
THEN 2332 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 2333 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
2334 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<3)
THEN 2335 CALL flagerror(
"Equations set specification does not have a subtype set.",err,error,*999)
2337 equations_set_subtype=equations_set%SPECIFICATION(3)
2338 SELECT CASE(equations_set_subtype)
2359 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
2360 geometric_field=>equations%INTERPOLATION%GEOMETRIC_FIELD
2361 materials_field=>equations%INTERPOLATION%MATERIALS_FIELD
2362 independent_field=>equations%INTERPOLATION%INDEPENDENT_FIELD
2378 source_field=>equations%INTERPOLATION%SOURCE_FIELD
2380 equations_matrices=>equations%EQUATIONS_MATRICES
2396 dynamic_matrices=>equations_matrices%DYNAMIC_MATRICES
2397 stiffness_matrix=>dynamic_matrices%MATRICES(1)%PTR
2398 damping_matrix=>dynamic_matrices%MATRICES(2)%PTR
2405 linear_matrices=>equations_matrices%LINEAR_MATRICES
2406 stiffness_matrix=>linear_matrices%MATRICES(1)%PTR
2410 rhs_vector=>equations_matrices%RHS_VECTOR
2426 source_vector=>equations_matrices%SOURCE_VECTOR
2443 IF(
ASSOCIATED(damping_matrix)) update_damping_matrix=damping_matrix%UPDATE_MATRIX
2445 IF(
ASSOCIATED(stiffness_matrix)) update_stiffness_matrix=stiffness_matrix%UPDATE_MATRIX
2446 IF(
ASSOCIATED(rhs_vector)) update_rhs_vector=rhs_vector%UPDATE_VECTOR
2462 IF(
ASSOCIATED(source_vector)) update_source_vector=source_vector%UPDATE_VECTOR
2464 equations_mapping=>equations%EQUATIONS_MAPPING
2467 equations_set_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
2468 CALL field_parameter_set_data_get(equations_set_field,field_u_variable_type, &
2469 & field_values_set_type,equations_set_field_data,err,error,*999)
2470 my_compartment = equations_set_field_data(1)
2471 ncompartments = equations_set_field_data(2)
2472 linear_matrices=>equations_matrices%LINEAR_MATRICES
2473 linear_mapping=>equations_mapping%LINEAR_MAPPING
2475 DO imatrix = 1,ncompartments
2476 IF(imatrix/=my_compartment)
THEN 2477 num_var_count=num_var_count+1
2478 coupling_matrices(num_var_count)%PTR=>linear_matrices%MATRICES(num_var_count)%PTR
2479 field_variables(num_var_count)%PTR=>linear_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(num_var_count)%VARIABLE
2480 field_var_types(num_var_count)=field_variables(num_var_count)%PTR%VARIABLE_TYPE
2481 coupling_matrices(num_var_count)%PTR%ELEMENT_MATRIX%MATRIX=0.0_dp
2500 dynamic_mapping=>equations_mapping%DYNAMIC_MAPPING
2501 field_variable=>dynamic_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
2508 linear_mapping=>equations_mapping%LINEAR_MAPPING
2509 field_variable=>linear_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
2513 field_var_type=field_variable%VARIABLE_TYPE
2514 geometric_variable=>geometric_field%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR
2515 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(dependent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
2516 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2517 geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
2518 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2520 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
2521 & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
2522 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
2523 & materials_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
2525 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
2526 & materials_interp_parameters(field_v_variable_type)%PTR,err,error,*999)
2543 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
2544 & source_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
2547 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
2548 & independent_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
2550 diffusion_dependent_previous_interpolation_parameters=> &
2551 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_v_variable_type)%PTR
2552 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
2553 & diffusion_dependent_previous_interpolation_parameters,err,error,*999)
2554 diffusion_dependent_previous_interpolated_point=> &
2555 & equations%INTERPOLATION%DEPENDENT_INTERP_POINT(field_v_variable_type)%PTR
2560 SELECT CASE(equations_set_subtype)
2572 DO ng=1,quadrature_scheme%NUMBER_OF_GAUSS
2574 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
2575 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
2576 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
2578 & materials_interp_point(field_u_variable_type)%PTR,err,error,*999)
2581 & independent_interp_point(field_u_variable_type)%PTR,err,error,*999)
2590 & source_interp_point(field_u_variable_type)%PTR,err,error,*999)
2594 & materials_interp_point(field_v_variable_type)%PTR,err,error,*999)
2598 rwg=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
2599 & quadrature_scheme%GAUSS_WEIGHTS(ng)
2603 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2605 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2608 IF(update_stiffness_matrix .OR. update_damping_matrix)
THEN 2610 DO nh=1,field_variable%NUMBER_OF_COMPONENTS
2611 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2613 IF(update_stiffness_matrix)
THEN 2615 DO nj=1,geometric_variable%NUMBER_OF_COMPONENTS
2618 DO ni=1,dependent_basis%NUMBER_OF_XI
2619 pgmj(nj)=pgmj(nj)+ &
2621 & equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%DXI_DX(ni,nj)
2622 pgnj(nj)=pgnj(nj)+ &
2624 & equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%DXI_DX(ni,nj)
2626 k_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR% &
2628 sum=sum+k_param*pgmj(nj)*pgnj(nj)
2630 advec_vel=equations%INTERPOLATION%INDEPENDENT_INTERP_POINT(field_u_variable_type)%PTR% &
2632 sum=sum+advec_vel*quadrature_scheme%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)*pgnj(nj)
2640 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+sum*rwg
2645 a_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR% &
2646 & values(geometric_variable%NUMBER_OF_COMPONENTS,
no_part_deriv)
2647 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+sum*rwg- &
2648 & a_param*quadrature_scheme%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)* &
2649 & quadrature_scheme%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)*rwg
2653 coupling_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_v_variable_type)%PTR% &
2655 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+ &
2656 & sum*rwg + quadrature_scheme%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)* &
2657 & quadrature_scheme%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)*rwg*coupling_param
2668 IF(update_damping_matrix)
THEN 2669 damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+ &
2671 & quadrature_scheme%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)*rwg
2686 IF(update_source_vector)
THEN 2687 c_param=equations%INTERPOLATION%SOURCE_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,
no_part_deriv)
2689 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2692 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2694 source_vector%ELEMENT_VECTOR%VECTOR(mhs)=source_vector%ELEMENT_VECTOR%VECTOR(mhs)+ &
2695 & quadrature_scheme%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)*c_param*rwg
2700 IF(update_source_vector)
THEN 2702 & diffusion_dependent_previous_interpolated_point,err,error,*999)
2703 c_param=diffusion_dependent_previous_interpolated_point%VALUES(1,
no_part_deriv)
2705 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2708 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2710 source_vector%ELEMENT_VECTOR%VECTOR(mhs)=source_vector%ELEMENT_VECTOR%VECTOR(mhs)+ &
2711 & quadrature_scheme%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)*c_param*rwg
2716 IF(update_rhs_vector) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=0.0_dp
2723 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2725 mesh_component_1 = field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
2726 dependent_basis_1 => dependent_field%DECOMPOSITION%DOMAIN(mesh_component_1)%PTR% &
2727 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2728 quadrature_scheme_1 => dependent_basis_1%QUADRATURE% &
2730 rwg = equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN * &
2731 & quadrature_scheme_1%GAUSS_WEIGHTS(ng)
2733 DO ms=1,dependent_basis_1%NUMBER_OF_ELEMENT_PARAMETERS
2737 DO imatrix = 1,ncompartments
2738 IF(imatrix/=my_compartment)
THEN 2739 num_var_count=num_var_count+1
2743 IF(coupling_matrices(num_var_count)%PTR%UPDATE_MATRIX)
THEN 2748 DO nh=1,field_variables(num_var_count)%PTR%NUMBER_OF_COMPONENTS
2750 mesh_component_2 = field_variable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
2751 dependent_basis_2 => dependent_field%DECOMPOSITION%DOMAIN(mesh_component_2)%PTR% &
2752 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2754 quadrature_scheme_2 => dependent_basis_2%QUADRATURE% &
2759 DO ns=1,dependent_basis_2%NUMBER_OF_ELEMENT_PARAMETERS
2769 pgm=quadrature_scheme_1%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)
2770 pgn=quadrature_scheme_2%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)
2773 coupling_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_v_variable_type)%PTR% &
2778 coupling_matrices(num_var_count)%PTR%ELEMENT_MATRIX%MATRIX(mhs,nhs) = &
2779 & coupling_matrices(num_var_count)%PTR%ELEMENT_MATRIX%MATRIX(mhs,nhs) + &
2780 & coupling_param * pgm * pgn * rwg
2796 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 2797 CALL field_interpolationparametersscalefactorselementget(element_number,equations%INTERPOLATION% &
2798 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
2800 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2802 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2805 IF(update_stiffness_matrix .OR. update_damping_matrix)
THEN 2807 DO nh=1,field_variable%NUMBER_OF_COMPONENTS
2808 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2810 IF(update_stiffness_matrix)
THEN 2811 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
2812 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
2813 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
2823 IF(update_damping_matrix)
THEN 2824 damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
2825 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
2826 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
2832 IF(update_rhs_vector) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
2833 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
2842 IF(update_source_vector) source_vector%ELEMENT_VECTOR%VECTOR(mhs)=source_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
2843 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
2858 CALL flagerror(
"Not implemented.",err,error,*999)
2860 DO ng=1,quadrature_scheme%NUMBER_OF_GAUSS
2862 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
2863 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
2864 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
2866 & materials_interp_point(field_u_variable_type)%PTR,err,error,*999)
2869 & independent_interp_point(field_u_variable_type)%PTR,err,error,*999)
2872 rwg=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
2873 & quadrature_scheme%GAUSS_WEIGHTS(ng)
2876 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2878 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2881 IF(update_stiffness_matrix .OR. update_damping_matrix)
THEN 2883 DO nh=1,field_variable%NUMBER_OF_COMPONENTS
2884 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2886 IF(update_stiffness_matrix)
THEN 2888 DO nj=1,geometric_variable%NUMBER_OF_COMPONENTS
2891 DO ni=1,dependent_basis%NUMBER_OF_XI
2892 pgmj(nj)=pgmj(nj)+ &
2894 & equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%DXI_DX(ni,nj)
2895 pgnj(nj)=pgnj(nj)+ &
2897 & equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%DXI_DX(ni,nj)
2899 k_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR% &
2901 sum=sum+k_param*pgmj(nj)*pgnj(nj)
2903 advec_vel=equations%INTERPOLATION%INDEPENDENT_INTERP_POINT(field_u_variable_type)%PTR% &
2905 sum=sum+advec_vel*quadrature_scheme%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)*pgnj(nj)
2913 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+sum*rwg
2917 a_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR% &
2918 & values(geometric_variable%NUMBER_OF_COMPONENTS,
no_part_deriv)
2919 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+sum*rwg- &
2920 & a_param*quadrature_scheme%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)* &
2921 & quadrature_scheme%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)*rwg
2931 IF(update_damping_matrix)
THEN 2932 damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+ &
2934 & quadrature_scheme%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)*rwg
2948 IF(update_source_vector)
THEN 2949 c_param=equations%INTERPOLATION%SOURCE_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,
no_part_deriv)
2951 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2954 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2956 source_vector%ELEMENT_VECTOR%VECTOR(mhs)=source_vector%ELEMENT_VECTOR%VECTOR(mhs)+ &
2957 & quadrature_scheme%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)*c_param*rwg
2962 IF(update_rhs_vector) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=0.0_dp
2966 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 2967 CALL field_interpolationparametersscalefactorselementget(element_number,equations%INTERPOLATION% &
2968 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
2970 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2972 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2975 IF(update_stiffness_matrix .OR. update_damping_matrix)
THEN 2977 DO nh=1,field_variable%NUMBER_OF_COMPONENTS
2978 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2980 IF(update_stiffness_matrix)
THEN 2981 stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=stiffness_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
2982 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
2983 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
2991 IF(update_damping_matrix)
THEN 2992 damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=damping_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
2993 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
2994 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
3000 IF(update_rhs_vector) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
3001 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
3008 IF(update_source_vector) source_vector%ELEMENT_VECTOR%VECTOR(mhs)=source_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
3009 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
3015 local_error=
"Equations set subtype "//
trim(
number_to_vstring(equations_set_subtype,
"*",err,error))// &
3016 &
" is not valid for an advection-diffusion equation type of a classical field equations set class." 3017 CALL flagerror(local_error,err,error,*999)
3027 CALL flagerror(
"Can not calculate finite element stiffness matrices for a nonlinear source.",err,error,*999)
3029 local_error=
"Equations set subtype "//
trim(
number_to_vstring(equations_set_subtype,
"*",err,error))// &
3030 &
" is not valid for an advection-diffusion equation type of a classical field equations set class." 3031 CALL flagerror(local_error,err,error,*999)
3034 CALL flagerror(
"Equations set equations is not associated.",err,error,*999)
3037 CALL flagerror(
"Equations set is not associated.",err,error,*999)
3040 exits(
"AdvectionDiffusion_FiniteElementCalculate")
3042 999
errors(
"AdvectionDiffusion_FiniteElementCalculate",err,error)
3043 exits(
"AdvectionDiffusion_FiniteElementCalculate")
3063 INTEGER(INTG),
INTENT(IN) :: problemSpecification(:)
3064 INTEGER(INTG),
INTENT(OUT) :: err
3068 INTEGER(INTG) :: problemSubtype
3070 enters(
"AdvectionDiffusion_ProblemSpecificationSet",err,error,*999)
3072 IF(
ASSOCIATED(problem))
THEN 3073 IF(
SIZE(problemspecification,1)==3)
THEN 3074 problemsubtype=problemspecification(3)
3075 SELECT CASE(problemsubtype)
3087 localerror=
"The third problem specification of "//
trim(
numbertovstring(problemsubtype,
"*",err,error))// &
3088 &
" is not valid for an advection-diffusion type of a classical field problem." 3089 CALL flagerror(localerror,err,error,*999)
3091 IF(
ALLOCATED(problem%specification))
THEN 3092 CALL flagerror(
"Problem specification is already allocated.",err,error,*999)
3094 ALLOCATE(problem%specification(3),stat=err)
3095 IF(err/=0)
CALL flagerror(
"Could not allocate problem specification.",err,error,*999)
3099 CALL flagerror(
"Advection-diffusion problem specification must have three entries.",err,error,*999)
3102 CALL flagerror(
"Problem is not associated.",err,error,*999)
3105 exits(
"AdvectionDiffusion_ProblemSpecificationSet")
3107 999
errors(
"AdvectionDiffusion_ProblemSpecificationSet",err,error)
3108 exits(
"AdvectionDiffusion_ProblemSpecificationSet")
3123 INTEGER(INTG),
INTENT(OUT) :: ERR
3131 INTEGER(INTG) :: PROBLEM_SUBTYPE
3133 enters(
"AdvectionDiffusion_ProblemLinearSetup",err,error,*999)
3135 NULLIFY(control_loop)
3137 NULLIFY(solver_equations)
3139 IF(
ASSOCIATED(problem))
THEN 3140 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 3141 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3142 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 3143 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
3145 problem_subtype=problem%SPECIFICATION(3)
3150 SELECT CASE(problem_setup%SETUP_TYPE)
3152 SELECT CASE(problem_setup%ACTION_TYPE)
3158 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3160 &
" is invalid for a linear advection-diffusion equation." 3161 CALL flagerror(local_error,err,error,*999)
3164 SELECT CASE(problem_setup%ACTION_TYPE)
3171 control_loop_root=>problem%CONTROL_LOOP
3175 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3177 &
" is invalid for a linear advection-diffusion equation." 3178 CALL flagerror(local_error,err,error,*999)
3182 control_loop_root=>problem%CONTROL_LOOP
3184 SELECT CASE(problem_setup%ACTION_TYPE)
3203 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3205 &
" is invalid for a linear advection-diffusion equation." 3206 CALL flagerror(local_error,err,error,*999)
3209 SELECT CASE(problem_setup%ACTION_TYPE)
3212 control_loop_root=>problem%CONTROL_LOOP
3224 control_loop_root=>problem%CONTROL_LOOP
3233 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3235 &
" is invalid for a linear advection-diffusion equation." 3236 CALL flagerror(local_error,err,error,*999)
3239 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
3240 &
" is invalid for a linear advection-diffusion equation." 3241 CALL flagerror(local_error,err,error,*999)
3245 SELECT CASE(problem_setup%SETUP_TYPE)
3247 SELECT CASE(problem_setup%ACTION_TYPE)
3253 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3255 &
" is invalid for a linear static advection-diffusion equation." 3256 CALL flagerror(local_error,err,error,*999)
3259 SELECT CASE(problem_setup%ACTION_TYPE)
3265 control_loop_root=>problem%CONTROL_LOOP
3269 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3271 &
" is invalid for a linear static advection-diffusion equation." 3272 CALL flagerror(local_error,err,error,*999)
3276 control_loop_root=>problem%CONTROL_LOOP
3278 SELECT CASE(problem_setup%ACTION_TYPE)
3295 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3297 &
" is invalid for a linear static advection-diffusion equation." 3298 CALL flagerror(local_error,err,error,*999)
3301 SELECT CASE(problem_setup%ACTION_TYPE)
3304 control_loop_root=>problem%CONTROL_LOOP
3316 control_loop_root=>problem%CONTROL_LOOP
3325 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3327 &
" is invalid for a linear static advection-diffusion equation." 3328 CALL flagerror(local_error,err,error,*999)
3331 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
3332 &
" is invalid for a linear static advection-diffusion equation." 3333 CALL flagerror(local_error,err,error,*999)
3337 &
" does not equal a linear advection-diffusion equation subtype." 3338 CALL flagerror(local_error,err,error,*999)
3341 CALL flagerror(
"Problem is not associated.",err,error,*999)
3344 exits(
"AdvectionDiffusion_ProblemLinearSetup")
3346 999
errors(
"AdvectionDiffusion_ProblemLinearSetup",err,error)
3347 exits(
"AdvectionDiffusion_ProblemLinearSetup")
3383 INTEGER(INTG),
INTENT(OUT) :: ERR
3388 INTEGER(INTG) :: PROBLEM_SUBTYPE
3390 enters(
"ADVECTION_DIFFUSION_PRE_SOLVE",err,error,*999)
3393 IF(
ASSOCIATED(control_loop))
THEN 3394 IF(
ASSOCIATED(solver))
THEN 3395 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 3396 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 3397 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3398 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 3399 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
3401 problem_subtype=control_loop%PROBLEM%SPECIFICATION(3)
3417 CALL flagerror(
"Not implemented.",err,error,*999)
3422 local_error=
"The third problem specification of "// &
3424 &
" is not valid for a advection-diffusion type of a classical field problem." 3425 CALL flagerror(local_error,err,error,*999)
3428 CALL flagerror(
"Problem is not associated.",err,error,*999)
3431 CALL flagerror(
"Solver is not associated.",err,error,*999)
3434 CALL flagerror(
"Control loop is not associated.",err,error,*999)
3437 exits(
"ADVECTION_DIFFUSION_PRE_SOLVE")
3439 999 errorsexits(
"ADVECTION_DIFFUSION_PRE_SOLVE",err,error)
3451 INTEGER(INTG),
INTENT(OUT) :: ERR
3455 TYPE(
solver_type),
POINTER :: SOLVER_ALE_DIFFUSION
3461 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT,ALPHA
3462 REAL(DP),
POINTER :: MESH_DISPLACEMENT_VALUES(:)
3464 INTEGER(INTG) :: dof_number,TOTAL_NUMBER_OF_DOFS,NDOFS_TO_PRINT
3466 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS
3467 INTEGER(INTG) :: INPUT_TYPE,INPUT_OPTION
3468 REAL(DP),
POINTER :: INPUT_DATA1(:)
3470 enters(
"AdvectionDiffusion_PreSolveALEUpdateMesh",err,error,*999)
3472 NULLIFY(solver_ale_diffusion)
3473 NULLIFY(solver_equations)
3474 NULLIFY(solver_mapping)
3475 NULLIFY(equations_set)
3477 IF(
ASSOCIATED(control_loop))
THEN 3480 ELSE IF(control_loop%CONTROL_LOOP_LEVEL>1)
THEN 3483 IF(
ASSOCIATED(solver))
THEN 3484 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 3485 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 3486 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3487 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 3488 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
3490 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
3496 solver_equations=>solver%SOLVER_EQUATIONS
3497 IF(
ASSOCIATED(solver_equations))
THEN 3498 solver_mapping=>solver_equations%SOLVER_MAPPING
3499 IF(
ASSOCIATED(solver_mapping))
THEN 3500 equations_set=>solver_mapping%EQUATIONS_SETS(1)%PTR
3501 IF(
ASSOCIATED(equations_set))
THEN 3502 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 3503 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
3504 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<3)
THEN 3505 CALL flagerror(
"Equations set specification does not have a subtype set.",err,error,*999)
3507 SELECT CASE(equations_set%SPECIFICATION(3))
3525 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
3526 IF(
ASSOCIATED(geometric_field))
THEN 3529 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3530 & number_of_dimensions,err,error,*999)
3534 NULLIFY(input_data1)
3538 & number_of_dimensions,input_type,input_option,control_loop%TIME_LOOP%ITERATION_NUMBER,1.0_dp)
3540 NULLIFY(mesh_displacement_values)
3541 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type, &
3542 & field_mesh_displacement_set_type,mesh_displacement_values,err,error,*999)
3544 ndofs_to_print =
SIZE(mesh_displacement_values,1)
3546 & mesh_displacement_values,
'(" MESH_DISPLACEMENT_VALUES = ",3(X,E13.6))',
'3(3(X,E13.6))', &
3551 & number_of_dimensions,input_type,input_option,control_loop%TIME_LOOP%ITERATION_NUMBER,1.0_dp)
3553 total_number_of_dofs = geometric_field%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR% &
3554 & total_number_of_dofs
3557 DO dof_number=1,total_number_of_dofs
3558 CALL field_parameter_set_add_local_dof(geometric_field, &
3559 & field_u_variable_type,field_values_set_type,dof_number, &
3560 & mesh_displacement_values(dof_number), &
3563 CALL field_parameter_set_update_start(geometric_field, &
3564 & field_u_variable_type, field_values_set_type,err,error,*999)
3565 CALL field_parameter_set_update_finish(geometric_field, &
3566 & field_u_variable_type, field_values_set_type,err,error,*999)
3569 alpha=1.0_dp/time_increment
3570 CALL field_parameter_sets_copy(geometric_field,field_u_variable_type, &
3571 & field_mesh_displacement_set_type,field_mesh_velocity_set_type,alpha,err,error,*999)
3572 CALL field_parameter_set_data_restore(geometric_field,field_u_variable_type, &
3573 & field_mesh_displacement_set_type,mesh_displacement_values,err,error,*999)
3575 CALL flagerror(
"Geometric field is not associated.",err,error,*999)
3578 local_error=
"Equations set subtype " &
3580 &
" is not valid for an advection-diffusion equation type of a classical field problem class." 3581 CALL flagerror(local_error,err,error,*999)
3584 CALL flagerror(
"Equations set is not associated.",err,error,*999)
3587 CALL flagerror(
"Solver mapping is not associated.",err,error,*999)
3590 CALL flagerror(
"Solver equations is not associated.",err,error,*999)
3593 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
3594 &
" is not valid for an advection-diffusion equation type of a classical field problem class." 3595 CALL flagerror(local_error,err,error,*999)
3598 CALL flagerror(
"Problem is not associated.",err,error,*999)
3601 CALL flagerror(
"Solver is not associated.",err,error,*999)
3604 CALL flagerror(
"Control loop is not associated.",err,error,*999)
3607 exits(
"AdvectionDiffusion_PreSolveALEUpdateMesh")
3609 999
errors(
"AdvectionDiffusion_PreSolveALEUpdateMesh",err,error)
3610 exits(
"AdvectionDiffusion_PreSolveALEUpdateMesh")
3624 INTEGER(INTG),
INTENT(OUT) :: ERR
3628 TYPE(
solver_type),
POINTER :: SOLVER_ADVECTION_DIFFUSION
3629 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD_ADVECTION_DIFFUSION
3635 INTEGER(INTG) :: NUMBER_OF_COMPONENTS_DEPENDENT_FIELD_ADVECTION_DIFFUSION
3638 enters(
"AdvectionDiffusion_PreSolveStoreCurrentSoln",err,error,*999)
3640 IF(
ASSOCIATED(control_loop))
THEN 3642 NULLIFY(solver_advection_diffusion)
3644 IF(
ASSOCIATED(solver))
THEN 3645 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 3646 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 3647 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3648 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 3649 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
3651 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
3662 IF(solver%GLOBAL_NUMBER==1)
THEN 3665 & (dependent field - U variable_type) at time, t ... ",err,error,*999)
3667 solver_equations_advection_diffusion=>solver_advection_diffusion%SOLVER_EQUATIONS
3668 IF(
ASSOCIATED(solver_equations_advection_diffusion))
THEN 3669 solver_mapping_advection_diffusion=>solver_equations_advection_diffusion%SOLVER_MAPPING
3670 IF(
ASSOCIATED(solver_mapping_advection_diffusion))
THEN 3671 equations_set_advection_diffusion=>solver_mapping_advection_diffusion%EQUATIONS_SETS(1)%PTR
3672 IF(
ASSOCIATED(equations_set_advection_diffusion))
THEN 3673 dependent_field_advection_diffusion=>equations_set_advection_diffusion%DEPENDENT%DEPENDENT_FIELD
3674 IF(
ASSOCIATED(dependent_field_advection_diffusion))
THEN 3675 CALL field_number_of_components_get(dependent_field_advection_diffusion, &
3676 & field_u_variable_type,number_of_components_dependent_field_advection_diffusion,err,error,*999)
3678 CALL flagerror(
"DEPENDENT_FIELD_ADVECTION_DIFFUSIONE is not associated.",err,error,*999)
3681 CALL flagerror(
"Advection-diffusion equations set is not associated.",err,error,*999)
3684 CALL flagerror(
"Advection-diffusion solver mapping is not associated.",err,error,*999)
3687 CALL flagerror(
"Advection-diffusion solver equations are not associated.",err,error,*999)
3691 DO i=1,number_of_components_dependent_field_advection_diffusion
3692 CALL field_parameterstofieldparameterscopy(dependent_field_advection_diffusion, &
3693 & field_u_variable_type,field_values_set_type,i,dependent_field_advection_diffusion, &
3694 & field_u_variable_type,field_previous_values_set_type,i,err,error,*999)
3711 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
3712 &
" is not valid for an advection-diffusion equation type of a classical field problem class." 3713 CALL flagerror(local_error,err,error,*999)
3716 CALL flagerror(
"Problem is not associated.",err,error,*999)
3719 CALL flagerror(
"Solver is not associated.",err,error,*999)
3722 CALL flagerror(
"Control loop is not associated.",err,error,*999)
3725 exits(
"AdvectionDiffusion_PreSolveStoreCurrentSoln")
3727 999
errors(
"AdvectionDiffusion_PreSolveStoreCurrentSoln",err,error)
3728 exits(
"AdvectionDiffusion_PreSolveStoreCurrentSoln")
3740 INTEGER(INTG),
INTENT(OUT) :: ERR
3744 TYPE(
solver_type),
POINTER :: SOLVER_ADVECTION_DIFFUSION, SOLVER_DIFFUSION
3745 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD_DIFFUSION, SOURCE_FIELD_ADVECTION_DIFFUSION
3746 TYPE(
solver_equations_type),
POINTER :: SOLVER_EQUATIONS_ADVECTION_DIFFUSION, SOLVER_EQUATIONS_DIFFUSION
3747 TYPE(
solver_mapping_type),
POINTER :: SOLVER_MAPPING_ADVECTION_DIFFUSION, SOLVER_MAPPING_DIFFUSION
3748 TYPE(
equations_set_type),
POINTER :: EQUATIONS_SET_ADVECTION_DIFFUSION, EQUATIONS_SET_DIFFUSION
3751 INTEGER(INTG) :: NUMBER_OF_COMPONENTS_DEPENDENT_FIELD_DIFFUSION,NUMBER_OF_COMPONENTS_SOURCE_FIELD_ADVECTION_DIFFUSION
3755 enters(
"AdvectionDiffusion_PreSolveGetSourceValue",err,error,*999)
3757 IF(
ASSOCIATED(control_loop))
THEN 3759 NULLIFY(solver_advection_diffusion)
3760 NULLIFY(solver_diffusion)
3762 IF(
ASSOCIATED(solver))
THEN 3763 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 3764 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 3765 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3766 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 3767 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
3769 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
3780 IF(solver%GLOBAL_NUMBER==1)
THEN 3784 solver_equations_diffusion=>solver_diffusion%SOLVER_EQUATIONS
3785 IF(
ASSOCIATED(solver_equations_diffusion))
THEN 3786 solver_mapping_diffusion=>solver_equations_diffusion%SOLVER_MAPPING
3787 IF(
ASSOCIATED(solver_mapping_diffusion))
THEN 3788 equations_set_diffusion=>solver_mapping_diffusion%EQUATIONS_SETS(1)%PTR
3789 IF(
ASSOCIATED(equations_set_diffusion))
THEN 3790 dependent_field_diffusion=>equations_set_diffusion%DEPENDENT%DEPENDENT_FIELD
3791 IF(
ASSOCIATED(dependent_field_diffusion))
THEN 3792 CALL field_number_of_components_get(dependent_field_diffusion, &
3793 & field_u_variable_type,number_of_components_dependent_field_diffusion,err,error,*999)
3795 CALL flagerror(
"DEPENDENT_FIELD_DIFFUSION is not associated.",err,error,*999)
3798 CALL flagerror(
"Diffusion equations set is not associated.",err,error,*999)
3801 CALL flagerror(
"Diffusion solver mapping is not associated.",err,error,*999)
3804 CALL flagerror(
"Diffusion solver equations are not associated.",err,error,*999)
3810 solver_equations_advection_diffusion=>solver_advection_diffusion%SOLVER_EQUATIONS
3811 IF(
ASSOCIATED(solver_equations_advection_diffusion))
THEN 3812 solver_mapping_advection_diffusion=>solver_equations_advection_diffusion%SOLVER_MAPPING
3813 IF(
ASSOCIATED(solver_mapping_advection_diffusion))
THEN 3814 equations_set_advection_diffusion=>solver_mapping_advection_diffusion%EQUATIONS_SETS(1)%PTR
3815 IF(
ASSOCIATED(equations_set_advection_diffusion))
THEN 3816 source_field_advection_diffusion=>equations_set_advection_diffusion%SOURCE%SOURCE_FIELD
3817 IF(
ASSOCIATED(source_field_advection_diffusion))
THEN 3818 CALL field_number_of_components_get(source_field_advection_diffusion, &
3819 & field_u_variable_type,number_of_components_source_field_advection_diffusion,err,error,*999)
3821 CALL flagerror(
"SOURCE_FIELD_ADVECTION_DIFFUSION is not associated.",err,error,*999)
3824 CALL flagerror(
"Advection-diffusion equations set is not associated.",err,error,*999)
3827 CALL flagerror(
"Advection-diffusion solver mapping is not associated.",err,error,*999)
3830 CALL flagerror(
"Advection-diffusion solver equations are not associated.",err,error,*999)
3834 IF(number_of_components_source_field_advection_diffusion==number_of_components_dependent_field_diffusion)
THEN 3835 DO i=1,number_of_components_source_field_advection_diffusion
3836 CALL field_parameterstofieldparameterscopy(dependent_field_diffusion, &
3837 & field_u_variable_type,field_values_set_type,i,source_field_advection_diffusion, &
3838 & field_u_variable_type,field_values_set_type,i,err,error,*999)
3841 local_error=
"Number of components of diffusion dependent field "// &
3842 &
"is not consistent with advection-diffusion equation source field." 3843 CALL flagerror(local_error,err,error,*999)
3860 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
3861 &
" is not valid for an advection-diffusion equation type of a classical field problem class." 3862 CALL flagerror(local_error,err,error,*999)
3865 CALL flagerror(
"Problem is not associated.",err,error,*999)
3868 CALL flagerror(
"Solver is not associated.",err,error,*999)
3871 CALL flagerror(
"Control loop is not associated.",err,error,*999)
3874 exits(
"AdvectionDiffusion_PreSolveGetSourceValue")
3876 999
errors(
"AdvectionDiffusion_PreSolveGetSourceValue",err,error)
3877 exits(
"AdvectionDiffusion_PreSolveGetSourceValue")
3890 INTEGER(INTG),
INTENT(OUT) :: ERR
3898 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS
3899 INTEGER(INTG) :: INPUT_TYPE,INPUT_OPTION
3900 REAL(DP),
POINTER :: INPUT_DATA1(:)
3901 INTEGER(INTG) :: PROBLEM_SUBTYPE
3903 enters(
"AdvectionDiffusion_PreSolveUpdateInputData",err,error,*999)
3905 IF(
ASSOCIATED(control_loop))
THEN 3906 IF(
ASSOCIATED(solver))
THEN 3907 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 3908 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 3909 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3910 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 3911 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
3913 problem_subtype=control_loop%PROBLEM%SPECIFICATION(3)
3921 solver_equations=>solver%SOLVER_EQUATIONS
3922 IF(
ASSOCIATED(solver_equations))
THEN 3923 solver_mapping=>solver_equations%SOLVER_MAPPING
3924 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
3925 IF(
ASSOCIATED(equations))
THEN 3926 equations_set=>equations%EQUATIONS_SET
3927 IF(
ASSOCIATED(equations_set))
THEN 3929 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3930 & number_of_dimensions,err,error,*999)
3934 NULLIFY(input_data1)
3935 CALL field_parameter_set_data_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
3936 & field_values_set_type,input_data1,err,error,*999)
3938 & number_of_dimensions,input_type,input_option,control_loop%TIME_LOOP%ITERATION_NUMBER,1.0_dp)
3941 CALL flagerror(
"Equations set is not associated.",err,error,*999)
3945 CALL flagerror(
"Equations are not associated.",err,error,*999)
3948 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
3952 CALL flagerror(
"Not implemented.",err,error,*999)
3955 CALL field_parameter_set_update_start(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
3956 & field_values_set_type,err,error,*999)
3957 CALL field_parameter_set_update_finish(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
3958 & field_values_set_type,err,error,*999)
3961 CALL flagerror(
"Problem is not associated.",err,error,*999)
3964 CALL flagerror(
"Solver is not associated.",err,error,*999)
3967 CALL flagerror(
"Control loop is not associated.",err,error,*999)
3970 exits(
"AdvectionDiffusion_PreSolveUpdateInputData")
3972 999
errors(
"AdvectionDiffusion_PreSolveUpdateInputData",err,error)
3973 exits(
"AdvectionDiffusion_PreSolveUpdateInputData")
3986 INTEGER(INTG),
INTENT(OUT) :: ERR
3998 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
4001 INTEGER(INTG) :: BOUNDARY_CONDITION_CHECK_VARIABLE,node_idx
4002 INTEGER(INTG) :: NUMBER_OF_COMPONENTS
4003 INTEGER(INTG) :: local_ny,global_ny
4004 REAL(DP),
POINTER :: BOUNDARY_VALUES(:)
4005 INTEGER(INTG),
POINTER :: BOUNDARY_NODES(:)
4007 enters(
"ADVECTION_DIFFUSION_PRE_SOLVE_UPDATE_BC",err,error,*999)
4009 IF(
ASSOCIATED(control_loop))
THEN 4011 WRITE (*,*) control_loop%TIME_LOOP%ITERATION_NUMBER
4012 IF(
ASSOCIATED(solver))
THEN 4013 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 4014 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 4015 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
4016 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 4017 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
4019 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
4023 solver_equations=>solver%SOLVER_EQUATIONS
4024 IF(
ASSOCIATED(solver_equations))
THEN 4025 solver_mapping=>solver_equations%SOLVER_MAPPING
4026 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
4027 IF(
ASSOCIATED(equations))
THEN 4028 equations_set=>equations%EQUATIONS_SET
4029 IF(
ASSOCIATED(equations_set))
THEN 4030 boundary_conditions=>solver_equations%BOUNDARY_CONDITIONS
4031 IF(
ASSOCIATED(boundary_conditions))
THEN 4032 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
4033 IF(
ASSOCIATED(dependent_field))
THEN 4034 CALL field_variable_get(dependent_field,field_u_variable_type,field_variable,err,error,*999)
4035 IF(
ASSOCIATED(field_variable))
THEN 4038 IF(
ASSOCIATED(boundary_conditions_variable))
THEN 4039 CALL field_number_of_components_get(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
4040 & number_of_components,err,error,*999)
4041 NULLIFY(boundary_values)
4042 NULLIFY(boundary_nodes)
4045 & control_loop%TIME_LOOP%ITERATION_NUMBER)
4046 WRITE(*,*)
SIZE(boundary_values)
4047 DO node_idx=1,
SIZE(boundary_values)
4049 CALL field_component_dof_get_user_node(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
4051 & 1,local_ny,global_ny,err,error,*999)
4052 boundary_condition_check_variable=boundary_conditions_variable% &
4053 & condition_types(local_ny)
4055 CALL field_parameter_set_update_local_dof(equations_set%DEPENDENT%DEPENDENT_FIELD, &
4056 & field_u_variable_type,field_values_set_type,local_ny, &
4057 & boundary_values(node_idx),err,error,*999)
4061 CALL flagerror(
"Boundary condition variable is not associated.",err,error,*999)
4064 CALL flagerror(
"Dependent field variable is not associated.",err,error,*999)
4067 CALL flagerror(
"Equations set dependent variable is not associated.",err,error,*999)
4070 CALL flagerror(
"Boundary conditions are not associated.",err,error,*999)
4073 CALL flagerror(
"Equations set is not associated.",err,error,*999)
4076 CALL flagerror(
"Equations are not associated.",err,error,*999)
4079 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
4081 CALL field_parameter_set_update_start(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
4082 & field_values_set_type,err,error,*999)
4083 CALL field_parameter_set_update_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
4084 & field_values_set_type,err,error,*999)
4086 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
4087 &
" is not valid for an advection-diffusion equation of a classical field problem class." 4088 CALL flagerror(local_error,err,error,*999)
4091 CALL flagerror(
"Problem is not associated.",err,error,*999)
4094 CALL flagerror(
"Solver is not associated.",err,error,*999)
4097 CALL flagerror(
"Control loop is not associated.",err,error,*999)
4100 exits(
"ADVECTION_DIFFUSION_PRE_SOLVE_UPDATE_BC")
4102 999 errorsexits(
"ADVECTION_DIFFUSION_PRE_SOLVE_UPDATE_BC",err,error)
4114 INTEGER(INTG),
INTENT(OUT) :: ERR
4120 enters(
"ADVECTION_DIFFUSION_POST_SOLVE",err,error,*999)
4123 IF(
ASSOCIATED(control_loop))
THEN 4124 IF(
ASSOCIATED(solver))
THEN 4125 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 4126 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 4127 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
4128 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 4129 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
4131 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
4140 local_error=
"The third problem specification of "// &
4142 &
" is not valid for an advection-diffusion type of a classical field problem." 4143 CALL flagerror(local_error,err,error,*999)
4146 CALL flagerror(
"Problem is not associated.",err,error,*999)
4149 CALL flagerror(
"Solver is not associated.",err,error,*999)
4152 CALL flagerror(
"Control loop is not associated.",err,error,*999)
4155 exits(
"ADVECTION_DIFFUSION_POST_SOLVE")
4157 999 errorsexits(
"ADVECTION_DIFFUSION_POST_SOLVE",err,error)
4168 INTEGER(INTG),
INTENT(OUT) :: ERR
4176 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
4177 INTEGER(INTG) :: EQUATIONS_SET_IDX,CURRENT_LOOP_ITERATION,OUTPUT_ITERATION_NUMBER
4179 CHARACTER(14) :: FILE
4180 CHARACTER(14) :: OUTPUT_FILE
4182 enters(
"ADVECTION_DIFFUSION_POST_SOLVE_OUTPUT_DATA",err,error,*999)
4184 IF(
ASSOCIATED(control_loop))
THEN 4185 IF(
ASSOCIATED(solver))
THEN 4186 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 4187 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 4188 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
4189 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 4190 CALL flagerror(
"Problem specification does not have a subtype set.",err,error,*999)
4192 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
4195 solver_equations=>solver%SOLVER_EQUATIONS
4196 IF(
ASSOCIATED(solver_equations))
THEN 4197 solver_mapping=>solver_equations%SOLVER_MAPPING
4198 IF(
ASSOCIATED(solver_mapping))
THEN 4200 DO equations_set_idx=1,solver_mapping%NUMBER_OF_EQUATIONS_SETS
4201 equations_set=>solver_mapping%EQUATIONS_SETS(equations_set_idx)%PTR
4203 current_loop_iteration=control_loop%TIME_LOOP%ITERATION_NUMBER
4204 output_iteration_number=control_loop%TIME_LOOP%OUTPUT_NUMBER
4206 IF(output_iteration_number/=0)
THEN 4207 IF(control_loop%TIME_LOOP%CURRENT_TIME<=control_loop%TIME_LOOP%STOP_TIME)
THEN 4208 IF(current_loop_iteration<10)
THEN 4209 WRITE(output_file,
'("TIME_STEP_000",I0)') current_loop_iteration
4210 ELSE IF(current_loop_iteration<100)
THEN 4211 WRITE(output_file,
'("TIME_STEP_00",I0)') current_loop_iteration
4212 ELSE IF(current_loop_iteration<1000)
THEN 4213 WRITE(output_file,
'("TIME_STEP_0",I0)') current_loop_iteration
4214 ELSE IF(current_loop_iteration<10000)
THEN 4215 WRITE(output_file,
'("TIME_STEP_",I0)') current_loop_iteration
4238 CALL flagerror(
"Not implemented.",err,error,*999)
4240 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
4241 &
" is not valid for an advection-diffusion equation type of a classical field problem class." 4242 CALL flagerror(local_error,err,error,*999)
4245 CALL flagerror(
"Problem is not associated.",err,error,*999)
4248 CALL flagerror(
"Solver is not associated.",err,error,*999)
4251 CALL flagerror(
"Control loop is not associated.",err,error,*999)
4254 exits(
"ADVECTION_DIFFUSION_POST_SOLVE_OUTPUT_DATA")
4256 999 errorsexits(
"ADVECTION_DIFFUSION_POST_SOLVE_OUTPUT_DATA",err,error)
integer(intg), parameter equations_set_setup_dependent_type
Dependent variables.
integer(intg), parameter equations_set_fem_solution_method
Finite Element Method solution method.
integer(intg), parameter equations_set_quad_source_advection_diff_supg_subtype
This module contains all basis function routines.
integer(intg), parameter equations_set_setup_materials_type
Materials setup.
Contains information on the boundary conditions for the solver equations.
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
subroutine, public solvers_create_finish(SOLVERS, ERR, ERROR,)
Finish the creation of solvers.
subroutine, public advectiondiffusion_finiteelementcalculate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Calculates the element stiffness matrices and RHS for a diffusion equation finite element equations s...
subroutine, public equations_mapping_dynamic_variable_type_set(EQUATIONS_MAPPING, DYNAMIC_VARIABLE_TYPE, ERR, ERROR,)
Sets the mapping between a dependent field variable and the equations set dynamic matrices...
integer(intg), parameter equations_set_constant_source_advection_diff_supg_subtype
Contains information on the equations mapping i.e., how field variable DOFS are mapped to the rows an...
Contains information about the equations in an equations set.
integer(intg), parameter equations_set_gfem_solution_method
Grid-based Finite Element Method solution method.
integer(intg), parameter problem_control_time_loop_type
Time control loop.
integer(intg), parameter problem_linear_source_advection_diffusion_subtype
integer(intg), parameter problem_setup_control_type
Solver setup for a problem.
integer(intg), parameter equations_set_linear_source_advection_diff_supg_subtype
This module handles all problem wide constants.
integer(intg), parameter solver_equations_first_order_dynamic
Solver equations are first order dynamic.
integer(intg), parameter, public control_loop_node
The identifier for a each "leaf" node in a control loop.
subroutine, public solver_dynamic_order_set(SOLVER, ORDER, ERR, ERROR,)
Sets/changes the order for a dynamic solver.
integer(intg), parameter no_global_deriv
No global derivative i.e., u.
integer(intg), parameter problem_nonlinear_source_static_advec_diff_subtype
Converts a number to its equivalent varying string representation.
subroutine, public equations_create_start(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Start the creation of equations for the equation set.
Contains information on the mesh decomposition.
integer(intg), parameter equations_set_linear_source_static_advec_diff_subtype
integer(intg), parameter problem_linear_source_static_advec_diff_subtype
Contains information on the independent variables for the equations set.
subroutine, public equations_matrices_create_start(EQUATIONS, EQUATIONS_MATRICES, ERR, ERROR,)
Starts the creation of the equations matrices and rhs for the the equations.
Contains information on the type of solver to be used.
integer(intg), parameter, public solver_petsc_library
PETSc solver library.
subroutine, public solvers_number_set(SOLVERS, NUMBER_OF_SOLVERS, ERR, ERROR,)
Sets/changes the number of solvers.
integer(intg), parameter no_part_deriv
No partial derivative i.e., u.
integer(intg), parameter, public solver_dynamic_crank_nicolson_scheme
Crank-Nicolson dynamic solver.
subroutine, public solver_dynamic_degree_set(SOLVER, DEGREE, ERR, ERROR,)
Sets/changes the degree of the polynomial used to interpolate time for a dynamic solver.
subroutine, public advectiondiffusion_equationssetsetup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the diffusion equation type of a classical field equations set class.
This module handles all equations matrix and rhs routines.
integer(intg), parameter, public solver_dynamic_first_order
Dynamic solver has first order terms.
subroutine, public solver_type_set(SOLVER, SOLVE_TYPE, ERR, ERROR,)
Sets/changes the type for a solver.
integer(intg), parameter equations_set_no_source_advection_diff_supg_subtype
integer(intg), parameter equations_static
The equations are static and have no time dependence.
Contains information on an equations set.
This module handles all equations routines.
integer(intg), parameter equations_set_setup_source_type
Source setup.
This module contains all string manipulation and transformation routines.
type(field_type), pointer source_field
subroutine, public solvers_create_start(CONTROL_LOOP, SOLVERS, ERR, ERROR,)
Start the creation of a solvers for the control loop.
integer(intg), parameter equations_set_linear_source_advection_diffusion_subtype
Contains information on the solvers to be used in a control loop.
integer(intg), parameter equations_set_constant_source_ale_advection_diff_supg_subtype
integer(intg), parameter equations_set_no_source_static_advec_diff_subtype
integer(intg), parameter first_part_deriv
First partial derivative i.e., du/ds.
integer(intg), parameter problem_nonlinear_source_ale_advection_diffusion_subtype
This module contains routines for timing the program.
subroutine, public control_loop_current_times_get(CONTROL_LOOP, CURRENT_TIME, TIME_INCREMENT, ERR, ERROR,)
Gets the current time parameters for a time control loop.
subroutine advectiondiffusion_problemlinearsetup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the diffusion equations.
Contains information of the source vector for equations matrices.
subroutine, public equations_matrices_dynamic_lumping_type_set(EQUATIONS_MATRICES, LUMPING_TYPE, ERR, ERROR,)
Sets the lumping of the linear equations matrices.
integer(intg), parameter solver_equations_static
Solver equations are static.
subroutine, public fluid_mechanics_io_write_cmgui(REGION, EQUATIONS_SET_GLOBAL_NUMBER, NAME, ERR, ERROR,)
Writes solution into cmgui formats exelem and exnode.
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.
This module handles all analytic analysis routines.
subroutine, public solvers_solver_get(SOLVERS, SOLVER_INDEX, SOLVER, ERR, ERROR,)
Returns a pointer to the specified solver in the list of solvers.
Contains information for a field defined on a region.
integer(intg), parameter, public equations_matrices_full_matrices
Use fully populated equation matrices.
subroutine, public advectiondiffusion_boundaryconditionsanalyticcalculate(EQUATIONS_SET, BOUNDARY_CONDITIONS, ERR, ERROR,)
Calculates the analytic solution and sets the boundary conditions for an analytic problem...
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.
integer(intg), parameter equations_set_linear_source_ale_advection_diff_supg_subtype
Contains information on a control loop.
subroutine, public advectiondiffusion_problemspecificationset(problem, problemSpecification, err, error,)
Sets the problem specification for an advection diffusion problem type.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
integer(intg), parameter equations_set_exponential_source_advection_diffusion_subtype
subroutine, public solver_equations_create_finish(SOLVER_EQUATIONS, ERR, ERROR,)
Finishes the process of creating solver equations.
integer(intg), parameter equations_set_no_source_advection_diffusion_subtype
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 solver_dynamic_type
A dynamic solver.
integer(intg), parameter equations_set_no_source_ale_advection_diffusion_subtype
integer(intg), parameter equations_set_advection_diffusion_equation_two_dim_1
u(x,y)=tanh(1 - alpha.(x.tan(Phi) - y)),this is a steady-state solution
integer(intg), parameter, public basis_default_quadrature_scheme
Identifier for the default quadrature scheme.
integer(intg), parameter problem_setup_solvers_type
Solver setup for a problem.
integer(intg), parameter equations_set_setup_equations_type
Equations setup.
Contains information for mapping field variables to the dynamic matrices in the equations set of the ...
integer(intg), parameter equations_set_setup_independent_type
Independent variables.
This module contains all program wide constants.
subroutine, public solver_library_type_set(SOLVER, SOLVER_LIBRARY_TYPE, ERR, ERROR,)
Sets/changes the type of library type to use for the solver.
subroutine, public equationsmapping_linearmatricesnumberset(EQUATIONS_MAPPING, NUMBER_OF_LINEAR_EQUATIONS_MATRICES, ERR, ERROR,)
Sets/changes the number of linear equations matrices.
integer(intg), parameter, public equations_lumped_matrices
The equations matrices are "mass" lumped.
integer(intg), parameter problem_setup_initial_type
Initial setup for a problem.
integer(intg), parameter problem_coupled_source_diffusion_advec_diffusion_subtype
subroutine, public equationsmapping_linearmatricesvariabletypesset(EQUATIONS_MAPPING, LINEAR_MATRIX_VARIABLE_TYPES, ERR, ERROR,)
Sets the mapping between the dependent field variable types and the linear equations matrices...
subroutine, public fluid_mechanics_io_read_data(SOLVER_TYPE, INPUT_VALUES, NUMBER_OF_DIMENSIONS, INPUT_TYPE, INPUT_OPTION, TIME_STEP, LENGTH_SCALE)
Reads input data from a file.
integer(intg), parameter problem_no_source_static_advec_diff_subtype
integer(intg), parameter equations_first_order_dynamic
The equations are first order dynamic.
Contains information on the boundary conditions for a dependent field variable.
subroutine, public advectiondiffusion_presolvegetsourcevalue(CONTROL_LOOP, SOLVER, ERR, ERROR,)
This module handles all advection-diffusion equation routines.
subroutine advectiondiffusion_equationssetlinearsetup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the linear advection-diffusion equation.
integer(intg), parameter equations_set_no_source_static_advec_diff_supg_subtype
subroutine, public solver_equations_linearity_type_set(SOLVER_EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for solver equations.
integer(intg), parameter equations_set_multi_comp_transport_advec_diff_supg_subtype
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.
integer(intg), parameter equations_set_constant_source_static_advec_diff_subtype
This module contains all type definitions in order to avoid cyclic module references.
Contains information on the equations matrices and vectors.
subroutine, public advectiondiffusion_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the equation specification for a diffusion equation type of a classical field equations set clas...
integer(intg), parameter, public equations_matrix_fem_structure
Finite element matrix structure.
integer(intg), parameter equations_set_constant_source_advection_diffusion_subtype
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
Contains information of the linear matrices for equations matrices.
subroutine, public advection_diffusion_pre_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the diffusion equations.
integer(intg), parameter, public general_output_type
General output type.
subroutine, public equationsmatrices_dynamicstructuretypeset(EQUATIONS_MATRICES, STRUCTURE_TYPE, ERR, ERROR,)
Sets the structure (sparsity) of the dynamic equations matrices.
integer(intg), parameter problem_linear_source_ale_advection_diffusion_subtype
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...
A buffer type to allow for an array of pointers to a FIELD_VARIABLE_TYPE.
subroutine, public control_loop_type_set(CONTROL_LOOP, LOOP_TYPE, ERR, ERROR,)
Sets/changes the control loop type.
integer(intg), parameter equations_set_linear_source_static_advec_diff_supg_subtype
subroutine, public equations_mapping_source_variable_type_set(EQUATIONS_MAPPING, SOURCE_VARIABLE_TYPE, ERR, ERROR,)
Sets the mapping between a source field variable and the equations set source vector.
Contains information on the source for the equations set.
subroutine, public equations_set_equations_get(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Gets the equations for an equations set.
integer(intg), parameter equations_set_quadratic_source_advection_diffusion_subtype
integer(intg), dimension(4) partial_derivative_first_derivative_map
PARTIAL_DERIVATIVE_FIRST_DERIVATIVE_MAP(nic) gives the partial derivative index for the first derivat...
subroutine, public equations_create_finish(EQUATIONS, ERR, ERROR,)
Finish the creation of equations.
This module handles all domain mappings routines.
integer(intg), parameter problem_setup_finish_action
Finish setup action.
This module handles all equations mapping routines.
Contains information about the solver equations for a solver.
integer(intg), parameter, public matrix_compressed_row_storage_type
Matrix compressed row storage type.
subroutine, public equations_matrices_dynamic_storage_type_set(EQUATIONS_MATRICES, STORAGE_TYPE, ERR, ERROR,)
Sets the storage type (sparsity) of the dynamic equations matrices.
integer(intg), parameter, public equations_matrix_diagonal_structure
Diagonal matrix structure.
integer(intg), parameter equations_set_gfv_solution_method
Grid-based Finite Volume solution method.
subroutine, private advection_diffusion_post_solve_output_data(CONTROL_LOOP, SOLVER, ERR, ERROR,)
integer(intg), parameter equations_set_setup_geometry_type
Geometry setup.
integer(intg), parameter global_deriv_s1_s2
Global Cross derivative in the s1 and s2 direction i.e., d^2u/ds1ds2.
Contains information for a problem.
integer(intg), parameter equations_set_classical_field_class
integer(intg), parameter equations_linear
The equations are linear.
Contains the topology information for the nodes of a domain.
subroutine, public equations_matrices_create_finish(EQUATIONS_MATRICES, ERR, ERROR,)
Finishes the creation of the equations matrices and RHS for the the equations.
subroutine, public advectiondiffusion_presolvestorecurrentsoln(CONTROL_LOOP, SOLVER, ERR, ERROR,)
integer(intg), parameter equations_set_coupled_source_diffusion_advec_diffusion_subtype
logical, save, public diagnostics1
.TRUE. if level 1 diagnostic output is active in the current routine
This module handles all distributed matrix vector routines.
integer(intg), parameter equations_set_constant_source_ale_advection_diffusion_subtype
integer(intg), parameter global_deriv_s1
First global derivative in the s1 direction i.e., du/ds1.
This module handles all boundary conditions routines.
integer(intg), parameter equations_set_multi_comp_transport_advec_diff_subtype
This module handles all solver routines.
subroutine, public equations_mapping_create_start(EQUATIONS, EQUATIONS_MAPPING, ERR, ERROR,)
Finishes the process of creating an equations mapping for a equations set equations.
Contains the interpolated value (and the derivatives wrt xi) of a field at a point. Old CMISS name XG.
integer(intg), parameter, public equations_matrix_unlumped
The matrix is not lumped.
Contains information about an equations matrix.
integer(intg), parameter equations_set_quadratic_source_ale_advection_diffusion_subtype
Contains information for a particular quadrature scheme.
integer(intg), parameter equations_set_no_source_ale_advection_diff_supg_subtype
integer(intg), parameter problem_no_source_ale_advection_diffusion_subtype
integer(intg), parameter problem_advection_diffusion_equation_type
This module contains all routines dealing with (non-distributed) matrix and vectors types...
integer(intg), parameter, public distributed_matrix_block_storage_type
Distributed matrix block storage type.
A buffer type to allow for an array of pointers to a EQUATIONS_MATRIX_TYPE.
integer(intg), parameter, public equations_matrix_lumped
The matrix is "mass" lumped.
subroutine, public equations_linearity_type_set(EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for equations.
subroutine advectiondiffusion_presolvealeupdatemesh(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Update mesh position and velocity for ALE advection-diffusion problem.
subroutine, public control_loop_create_start(PROBLEM, CONTROL_LOOP, ERR, ERROR,)
Start the process of creating a control loop for a problem.
subroutine, public advectiondiffusion_presolveupdateinputdata(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Update independent field (velocity) for advection-diffusion pre solve.
subroutine, public fluid_mechanics_io_read_boundary_conditions_iteration(SOLVER_TYPE, BOUNDARY_VALUES, BOUNDARY_NODES, NUMBER_OF_DIMENSIONS, BOUNDARY_CONDITION, OPTION, ITERATION)
Reads boundary conditions from a file.
integer(intg), parameter problem_setup_solver_equations_type
Solver equations setup for a problem.
integer(intg), parameter, public diagnostic_output_type
Diagnostic output type.
Sets a boundary condition on the specified local DOF.
Contains information on the solver mapping between the global equation sets and the solver matrices...
integer(intg), parameter equations_set_exp_source_ale_advection_diff_supg_subtype
subroutine, public solver_dynamic_scheme_set(SOLVER, SCHEME, ERR, ERROR,)
Sets/changes the scheme for a dynamic solver.
subroutine, public advection_diffusion_equation_problem_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the diffusion problem.
integer(intg), parameter equations_set_quad_source_ale_advection_diff_supg_subtype
Contains information for a field variable defined on a field.
integer(intg), parameter equations_set_fd_solution_method
Finite Difference solution method.
integer(intg), parameter, public equations_matrices_sparse_matrices
Use sparse equations matrices.
integer(intg), parameter equations_set_advection_diffusion_equation_type
Contains the parameters required to interpolate a field variable within an element. Old CMISS name XE.
Contains information on the setup information for an equations set.
A pointer to the domain decomposition for this domain.
integer(intg), parameter problem_setup_start_action
Start setup action.
subroutine, public solver_equations_time_dependence_type_set(SOLVER_EQUATIONS, TIME_DEPENDENCE_TYPE, ERR, ERROR,)
Sets/changes the time dependence type for solver equations.
integer(intg), parameter problem_nonlinear_source_advection_diffusion_subtype
This module handles all control loop routines.
integer(intg), parameter, public solver_cmiss_library
CMISS (internal) solver library.
integer(intg), parameter, public boundary_condition_fixed
The dof is fixed as a boundary condition.
integer(intg), parameter problem_no_source_advection_diffusion_subtype
subroutine, public errors(NAME, ERR, ERROR)
Records the exiting error of the subroutine.
This module defines all constants shared across equations set routines.
integer(intg), parameter equations_set_bem_solution_method
Boundary Element Method solution method.
subroutine, public solver_solver_equations_get(SOLVER, SOLVER_EQUATIONS, ERR, ERROR,)
Returns a pointer to the solver equations for a solver.
subroutine, public advectiondiffusion_equationssetsolnmethodset(EQUATIONS_SET, SOLUTION_METHOD, ERR, ERROR,)
Sets/changes the solution method for a diffusion equation type of an classical field equations set cl...
subroutine, public boundary_conditions_variable_get(BOUNDARY_CONDITIONS, FIELD_VARIABLE, BOUNDARY_CONDITIONS_VARIABLE, ERR, ERROR,)
Find the boundary conditions variable for a given field variable.
Contains all information about a basis .
integer(intg), parameter equations_set_fv_solution_method
Finite Volume solution method.
integer(intg), parameter, public matrix_block_storage_type
Matrix block storage type.
subroutine, public advection_diffusion_post_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
integer(intg), parameter, public solver_dynamic_first_degree
Dynamic solver uses a first degree polynomial for time interpolation.
integer(intg), parameter equations_set_linear_source_ale_advection_diffusion_subtype
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_exp_source_advection_diff_supg_subtype
subroutine advection_diffusion_pre_solve_update_bc(CONTROL_LOOP, SOLVER, ERR, ERROR,)
integer(intg), parameter equations_set_setup_analytic_type
Analytic setup.
Flags an error condition.
integer(intg), parameter, public solver_linear_type
A linear solver.
integer(intg), parameter equations_set_constant_source_static_advec_diff_supg_subtype
Contains information of the RHS vector for equations matrices.
integer(intg), parameter equations_set_exp_source_ale_advection_diffusion_subtype
integer(intg), parameter, public distributed_matrix_diagonal_storage_type
Distributed matrix diagonal storage type.
Contains information for mapping field variables to the linear matrices in the equations set of the m...
This module contains all kind definitions.
Temporary IO routines for fluid mechanics.
integer(intg), parameter equations_set_setup_finish_action
Finish setup action.
integer(intg), parameter, public distributed_matrix_compressed_row_storage_type
Distributed matrix compressed row storage type.
Contains information of the dynamic matrices for equations matrices.