429 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
430 INTEGER(INTG),
INTENT(OUT) :: ERR
433 INTEGER(INTG) :: FIELD_VAR_TYPE,ng,mh,mhs,ms,nh,nhs,ns,mi,ni
434 REAL(DP) :: RWG,SUM,jacobianGaussWeight
435 REAL(DP) :: PGM,PGN,PGMSI(3),PGNSI(3)
436 REAL(DP) :: U_VALUE(3)
440 TYPE(
basis_type),
POINTER :: DEPENDENT_BASIS,GEOMETRIC_BASIS,SOURCE_BASIS,DEPENDENT_BASIS1,DEPENDENT_BASIS2
449 TYPE(
field_type),
POINTER :: GEOMETRIC_FIELD,DEPENDENT_FIELD,MATERIALS_FIELD,SOURCE_FIELD
459 REAL(DP),
POINTER :: independentVectorParameters(:),independentWeightParameters(:)
460 REAL(DP),
ALLOCATABLE :: projectionXi(:)
461 REAL(DP):: POROSITY_0, POROSITY, PERM_OVER_VIS_PARAM_0, PERM_OVER_VIS_PARAM,TAU_PARAM,KAPPA_PARAM
462 REAL(DP):: tension,curvature
463 REAL(DP):: MATERIAL_FACT
464 REAL(DP):: DXDY(3,3), DXDXI(3,3), DYDXI(3,3), DXIDY(3,3), DXI_DX(3,3)
466 REAL(DP):: dataPointWeight,dataPointVector(3)
467 INTEGER(INTG) :: derivative_idx, component_idx, xi_idx, NUMBER_OF_DIMENSIONS
468 INTEGER(INTG) :: dataPointIdx,dataPointUserNumber,dataPointLocalNumber,dataPointGlobalNumber
469 INTEGER(INTG) :: numberOfXi
470 INTEGER(INTG) :: componentIdx
471 INTEGER(INTG) :: variableType,localDof
474 INTEGER(INTG) MESH_COMPONENT1,MESH_COMPONENT2
478 enters(
"FITTING_FINITE_ELEMENT_CALCULATE",err,error,*999)
480 NULLIFY(dependent_basis,geometric_basis)
482 NULLIFY(equations_mapping)
483 NULLIFY(linear_mapping)
484 NULLIFY(equations_matrices)
485 NULLIFY(linear_matrices)
487 NULLIFY(equations_matrix)
488 NULLIFY(dependent_field,geometric_field,materials_field)
490 NULLIFY(dataprojection)
491 NULLIFY(decompositiontopology)
492 NULLIFY(independentfield)
493 NULLIFY(independentvectorparameters)
494 NULLIFY(independentweightparameters)
495 NULLIFY(fieldvariable)
496 NULLIFY(mappingvariable)
497 NULLIFY(quadrature_scheme)
498 NULLIFY(geometric_interpolated_point,materials_interpolated_point)
500 datapointvector = 0.0_dp
502 IF(
ASSOCIATED(equations_set))
THEN 503 equations=>equations_set%EQUATIONS
504 IF(
ASSOCIATED(equations))
THEN 505 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 506 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
507 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 508 CALL flagerror(
"Equations set specification must have three entries for a fitting type equations set.", &
511 SELECT CASE(equations_set%SPECIFICATION(3))
514 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
515 independentfield=>equations%INTERPOLATION%INDEPENDENT_FIELD
516 dataprojection=>independentfield%dataProjection
517 IF(.NOT.
ASSOCIATED(dataprojection))
THEN 518 localerror=
"Data projection is not associated on independent field." 519 CALL flagerror(localerror,err,error,*999)
521 decompositiontopology=>independentfield%decomposition%topology
522 IF(
ASSOCIATED(decompositiontopology))
THEN 523 datapoints=>decompositiontopology%dataPoints
524 IF(.NOT.
ASSOCIATED(datapoints))
THEN 525 localerror=
"Data points are not associated on the decomposition topology of the independent field." 526 CALL flagerror(localerror,err,error,*999)
529 localerror=
"Decomposition topology is not associated on the independent field." 530 CALL flagerror(localerror,err,error,*999)
532 geometric_field=>equations%INTERPOLATION%GEOMETRIC_FIELD
533 materials_field=>equations%INTERPOLATION%MATERIALS_FIELD
534 equations_matrices=>equations%EQUATIONS_MATRICES
535 linear_matrices=>equations_matrices%LINEAR_MATRICES
536 equations_matrix=>linear_matrices%MATRICES(1)%PTR
537 rhs_vector=>equations_matrices%RHS_VECTOR
538 equations_mapping=>equations%EQUATIONS_MAPPING
539 linear_mapping=>equations_mapping%LINEAR_MAPPING
540 mappingvariable=>linear_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
541 field_var_type=mappingvariable%VARIABLE_TYPE
542 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(dependent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
543 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
544 geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
545 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
547 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
548 & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
549 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
550 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
551 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
552 & materials_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
553 CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
554 numberofxi = dependent_basis%NUMBER_OF_XI
555 ALLOCATE(projectionxi(numberofxi))
558 CALL field_parameter_set_data_get(independentfield,field_u_variable_type,field_values_set_type, &
559 & independentvectorparameters,err,error,*999)
561 CALL field_parameter_set_data_get(independentfield,field_v_variable_type,field_values_set_type, &
562 & independentweightparameters,err,error,*999)
568 DO datapointidx=1,datapoints%elementDataPoint(element_number)%numberOfProjectedData
569 datapointusernumber = datapoints%elementDataPoint(element_number)%dataIndices(datapointidx)%userNumber
570 datapointlocalnumber = datapoints%elementDataPoint(element_number)%dataIndices(datapointidx)%localNumber
571 datapointglobalnumber = datapoints%elementDataPoint(element_number)%dataIndices(datapointidx)%globalNumber
573 projectionxi = dataprojection%data_projection_results(datapointglobalnumber)%xi
574 CALL field_interpolate_xi(
first_part_deriv,projectionxi,equations%INTERPOLATION% &
575 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
576 CALL field_interpolate_xi(
first_part_deriv,projectionxi,equations%INTERPOLATION% &
577 & dependent_interp_point(field_u_variable_type)%PTR,err,error,*999)
578 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
579 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
582 variabletype=independentfield%VARIABLES(1)%VARIABLE_TYPE
583 fieldvariable=>independentfield%VARIABLE_TYPE_MAP(variabletype)%PTR
584 DO componentidx=1,numberofxi
585 localdof=fieldvariable%COMPONENTS(componentidx)%PARAM_TO_DOF_MAP% &
586 & data_point_param2dof_map%DATA_POINTS(datapointlocalnumber)
587 datapointvector(componentidx)=independentvectorparameters(localdof)
590 variabletype=independentfield%VARIABLES(2)%VARIABLE_TYPE
591 fieldvariable=>independentfield%VARIABLE_TYPE_MAP(variabletype)%PTR
592 localdof=fieldvariable%COMPONENTS(1)%PARAM_TO_DOF_MAP% &
593 & data_point_param2dof_map%DATA_POINTS(datapointlocalnumber)
594 datapointweight=independentweightparameters(localdof)
598 DO mh=1,mappingvariable%NUMBER_OF_COMPONENTS
599 mesh_component1=mappingvariable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
600 dependent_basis1=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component1)%PTR% &
601 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
602 DO ms=1,dependent_basis1%NUMBER_OF_ELEMENT_PARAMETERS
606 IF(equations_matrix%UPDATE_MATRIX)
THEN 608 DO nh=1,mappingvariable%NUMBER_OF_COMPONENTS
609 mesh_component2=mappingvariable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
610 dependent_basis2=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component2)%PTR% &
611 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
612 DO ns=1,dependent_basis2%NUMBER_OF_ELEMENT_PARAMETERS
617 sum = sum + pgm * pgn * datapointweight
619 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)+sum
624 IF(rhs_vector%UPDATE_VECTOR)
THEN 625 sum = sum + pgm*datapointvector(mh)*datapointweight
626 rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs) + sum
633 CALL field_parameter_set_data_restore(independentfield,field_u_variable_type,field_values_set_type, &
634 & independentvectorparameters,err,error,*999)
636 CALL field_parameter_set_data_restore(independentfield,field_v_variable_type,field_values_set_type, &
637 & independentweightparameters,err,error,*999)
643 DO ng=1,quadrature_scheme%NUMBER_OF_GAUSS
645 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
647 & dependent_interp_point(field_var_type)%PTR,err,error,*999)
649 & materials_interp_point(field_u_variable_type)%PTR,err,error,*999)
650 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
651 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
652 tau_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,
no_part_deriv)
653 kappa_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(2,
no_part_deriv)
655 jacobiangaussweight=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
656 & quadrature_scheme%GAUSS_WEIGHTS(ng)
659 DO mh=1,mappingvariable%NUMBER_OF_COMPONENTS
661 mesh_component1=mappingvariable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
662 dependent_basis1=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component1)%PTR% &
663 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
665 DO ms=1,dependent_basis1%NUMBER_OF_ELEMENT_PARAMETERS
668 IF(equations_matrix%UPDATE_MATRIX)
THEN 670 DO nh=1,mappingvariable%NUMBER_OF_COMPONENTS
671 mesh_component2=mappingvariable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
672 dependent_basis2=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component2)%PTR% &
673 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
674 quadrature_scheme2=>dependent_basis2%QUADRATURE%QUADRATURE_SCHEME_MAP &
676 DO ns=1,dependent_basis2%NUMBER_OF_ELEMENT_PARAMETERS
681 tension = tau_param*2.0_dp* ( &
684 curvature = kappa_param*2.0_dp* ( &
688 IF(mappingvariable%NUMBER_OF_COMPONENTS > 1)
THEN 689 tension = tension + tau_param*2.0_dp* ( &
692 curvature = curvature + kappa_param*2.0_dp* ( &
698 IF(mappingvariable%NUMBER_OF_COMPONENTS > 2)
THEN 699 tension = tension + tau_param*2.0_dp* ( &
702 curvature = curvature + kappa_param*2.0_dp* ( &
713 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) = &
714 & equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) + (tension + curvature) * jacobiangaussweight
724 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 725 CALL field_interpolationparametersscalefactorselementget(element_number,equations%INTERPOLATION% &
726 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
728 DO mh=1,mappingvariable%NUMBER_OF_COMPONENTS
730 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
733 IF(equations_matrix%UPDATE_MATRIX)
THEN 735 DO nh=1,mappingvariable%NUMBER_OF_COMPONENTS
736 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
738 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
739 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
740 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
744 IF(rhs_vector%UPDATE_VECTOR)
THEN 745 rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
746 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
755 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
756 geometric_field=>equations%INTERPOLATION%GEOMETRIC_FIELD
757 equations_matrices=>equations%EQUATIONS_MATRICES
758 linear_matrices=>equations_matrices%LINEAR_MATRICES
759 equations_matrix=>linear_matrices%MATRICES(1)%PTR
760 rhs_vector=>equations_matrices%RHS_VECTOR
761 equations_mapping=>equations%EQUATIONS_MAPPING
762 linear_mapping=>equations_mapping%LINEAR_MAPPING
763 fieldvariable=>linear_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
764 field_var_type=fieldvariable%VARIABLE_TYPE
765 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(dependent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
766 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
767 geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
768 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
770 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
771 & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
773 DO ng=1,quadrature_scheme%NUMBER_OF_GAUSS
775 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
776 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
777 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
780 rwg=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
781 & quadrature_scheme%GAUSS_WEIGHTS(ng)
784 DO mh=1,fieldvariable%NUMBER_OF_COMPONENTS
787 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
790 IF(equations_matrix%UPDATE_MATRIX)
THEN 792 DO nh=1,fieldvariable%NUMBER_OF_COMPONENTS
793 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
801 sum = sum + pgm * pgn
803 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) = &
804 & equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) + sum * rwg
808 IF(rhs_vector%UPDATE_VECTOR) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=0.0_dp
814 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 815 CALL field_interpolationparametersscalefactorselementget(element_number,equations%INTERPOLATION% &
816 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
818 DO mh=1,fieldvariable%NUMBER_OF_COMPONENTS
820 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
823 IF(equations_matrix%UPDATE_MATRIX)
THEN 825 DO nh=1,fieldvariable%NUMBER_OF_COMPONENTS
826 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
828 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
829 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
830 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
834 IF(rhs_vector%UPDATE_VECTOR) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
835 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
844 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
845 geometric_field=>equations%INTERPOLATION%GEOMETRIC_FIELD
846 materials_field=>equations%INTERPOLATION%MATERIALS_FIELD
848 equations_matrices=>equations%EQUATIONS_MATRICES
849 linear_matrices=>equations_matrices%LINEAR_MATRICES
850 equations_matrix=>linear_matrices%MATRICES(1)%PTR
851 rhs_vector=>equations_matrices%RHS_VECTOR
852 equations_mapping=>equations%EQUATIONS_MAPPING
853 linear_mapping=>equations_mapping%LINEAR_MAPPING
854 fieldvariable=>linear_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
855 field_var_type=fieldvariable%VARIABLE_TYPE
857 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(dependent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
858 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
859 geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
860 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
862 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
863 & equations%INTERPOLATION%GEOMETRIC_INTERP_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
864 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
865 & equations%INTERPOLATION%MATERIALS_INTERP_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
870 DO ng=1,quadrature_scheme%NUMBER_OF_GAUSS
873 CALL field_interpolation_parameters_element_get(field_initial_values_set_type,element_number, &
874 & equations%INTERPOLATION%GEOMETRIC_INTERP_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
875 reference_geometric_interpolated_point=>equations%INTERPOLATION%GEOMETRIC_INTERP_POINT(field_u_variable_type)%PTR
877 & reference_geometric_interpolated_point,err,error,*999)
879 DO component_idx=1,dependent_basis%NUMBER_OF_XI
880 DO xi_idx=1,dependent_basis%NUMBER_OF_XI
882 dydxi(component_idx,xi_idx)=reference_geometric_interpolated_point%VALUES(component_idx,derivative_idx)
887 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
888 & equations%INTERPOLATION%GEOMETRIC_INTERP_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
889 geometric_interpolated_point=>equations%INTERPOLATION%GEOMETRIC_INTERP_POINT(field_u_variable_type)%PTR
891 & geometric_interpolated_point,err,error,*999)
892 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI, &
893 & equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR,err,error,*999)
895 DO component_idx=1,dependent_basis%NUMBER_OF_XI
896 DO xi_idx=1,dependent_basis%NUMBER_OF_XI
898 dxdxi(component_idx,xi_idx)=geometric_interpolated_point%VALUES(component_idx,derivative_idx)
903 CALL invert(dydxi,dxidy,jyxi,err,error,*999)
908 materials_interpolated_point => equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR
910 & materials_interpolated_point,err,error,*999)
913 porosity_0 = materials_interpolated_point%VALUES(1,
no_part_deriv)
914 perm_over_vis_param_0 = materials_interpolated_point%VALUES(2,
no_part_deriv)
917 IF( abs(jxy) > 1.0e-10_dp )
THEN 918 porosity = 1.0_dp - ( 1.0_dp - porosity_0 ) / jxy
920 localerror=
"Jacobian Jxy is smaller than 1.0E-10_DP." 921 CALL flagerror(localerror,err,error,*999)
925 perm_over_vis_param = perm_over_vis_param_0
927 material_fact = ( jxy * porosity / porosity_0 )**2.0_dp
928 perm_over_vis_param = material_fact * perm_over_vis_param_0
935 & equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN,err,error,*999)
945 rwg=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
946 & quadrature_scheme%GAUSS_WEIGHTS(ng)
950 DO mh=1,fieldvariable%NUMBER_OF_COMPONENTS
953 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
956 IF(equations_matrix%UPDATE_MATRIX)
THEN 959 DO nh=1,fieldvariable%NUMBER_OF_COMPONENTS
960 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
968 sum = sum + pgm * pgn
970 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) = &
971 & equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) + sum * rwg
976 IF(rhs_vector%UPDATE_VECTOR)
THEN 981 sum = sum + pgm * porosity
983 sum = sum + pgm * perm_over_vis_param
985 rhs_vector%ELEMENT_VECTOR%VECTOR(mhs) = rhs_vector%ELEMENT_VECTOR%VECTOR(mhs) + sum * rwg
996 IF( element_number == 1 )
THEN 998 DO mh=1,fieldvariable%NUMBER_OF_COMPONENTS
999 mesh_component1 = fieldvariable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1000 dependent_basis1 => dependent_field%DECOMPOSITION%DOMAIN(mesh_component1)%PTR% &
1001 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1002 ndofs = ndofs + dependent_basis1%NUMBER_OF_ELEMENT_PARAMETERS
1009 & equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,:), &
1010 &
'("",4(X,E13.6))',
'4(4(X,E13.6))',err,error,*999)
1018 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 1019 CALL field_interpolationparametersscalefactorselementget(element_number,equations%INTERPOLATION% &
1020 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
1022 DO mh=1,fieldvariable%NUMBER_OF_COMPONENTS
1024 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1027 IF(equations_matrix%UPDATE_MATRIX)
THEN 1029 DO nh=1,fieldvariable%NUMBER_OF_COMPONENTS
1030 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1032 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
1033 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
1034 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
1038 IF(rhs_vector%UPDATE_VECTOR) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
1039 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
1046 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
1047 geometric_field=>equations%INTERPOLATION%GEOMETRIC_FIELD
1048 materials_field=>equations%INTERPOLATION%MATERIALS_FIELD
1049 source_field=>equations%INTERPOLATION%SOURCE_FIELD
1050 equations_matrices=>equations%EQUATIONS_MATRICES
1051 linear_matrices=>equations_matrices%LINEAR_MATRICES
1052 equations_matrix=>linear_matrices%MATRICES(1)%PTR
1053 rhs_vector=>equations_matrices%RHS_VECTOR
1054 source_vector=>equations_matrices%SOURCE_VECTOR
1055 equations_mapping=>equations%EQUATIONS_MAPPING
1056 linear_mapping=>equations_mapping%LINEAR_MAPPING
1057 fieldvariable=>linear_mapping%EQUATIONS_MATRIX_TO_VAR_MAPS(1)%VARIABLE
1058 field_var_type=fieldvariable%VARIABLE_TYPE
1059 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(dependent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
1060 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1061 geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
1062 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1063 source_basis=>source_field%DECOMPOSITION%DOMAIN(source_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
1064 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1066 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
1067 & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
1068 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
1069 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
1070 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
1071 & materials_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
1072 CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
1074 DO ng=1,quadrature_scheme%NUMBER_OF_GAUSS
1077 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
1079 & dependent_interp_point(field_var_type)%PTR,err,error,*999)
1081 & materials_interp_point(field_u_variable_type)%PTR,err,error,*999)
1082 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
1083 & geometric_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
1084 tau_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,
no_part_deriv)
1085 kappa_param=equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR%VALUES(2,
no_part_deriv)
1088 IF(source_vector%UPDATE_VECTOR)
THEN 1089 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
1090 & equations%INTERPOLATION%SOURCE_INTERP_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
1092 & source_interp_point(field_u_variable_type)%PTR,err,error,*999)
1093 u_value(1)=equations%INTERPOLATION%SOURCE_INTERP_POINT(field_u_variable_type)%PTR%VALUES(1,
no_part_deriv)
1094 u_value(2)=equations%INTERPOLATION%SOURCE_INTERP_POINT(field_u_variable_type)%PTR%VALUES(2,
no_part_deriv)
1095 IF(dependent_basis%NUMBER_OF_XI==3)
THEN 1096 u_value(3)=equations%INTERPOLATION%SOURCE_INTERP_POINT(field_u_variable_type)%PTR%VALUES(3,
no_part_deriv)
1100 rwg=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN* &
1101 & quadrature_scheme%GAUSS_WEIGHTS(ng)
1104 DO mh=1,fieldvariable%NUMBER_OF_COMPONENTS
1106 mesh_component1=fieldvariable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1107 dependent_basis1=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component1)%PTR% &
1108 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1110 DO ms=1,dependent_basis1%NUMBER_OF_ELEMENT_PARAMETERS
1113 IF(equations_matrix%UPDATE_MATRIX)
THEN 1115 DO nh=1,fieldvariable%NUMBER_OF_COMPONENTS
1116 mesh_component2=fieldvariable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
1117 dependent_basis2=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component2)%PTR% &
1118 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1119 quadrature_scheme2=>dependent_basis2%QUADRATURE%QUADRATURE_SCHEME_MAP &
1121 DO ns=1,dependent_basis2%NUMBER_OF_ELEMENT_PARAMETERS
1125 DO ni=1,dependent_basis2%NUMBER_OF_XI
1126 DO mi=1,dependent_basis1%NUMBER_OF_XI
1127 dxi_dx(mi,ni)=equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR% &
1139 sum = sum + pgm * pgn
1149 & tau_param*2.0_dp* ( &
1150 & quadrature_scheme1%GAUSS_BASIS_FNS(ms,
part_deriv_s1,ng)* &
1151 & quadrature_scheme2%GAUSS_BASIS_FNS(ns,
part_deriv_s1,ng)+ &
1152 & quadrature_scheme1%GAUSS_BASIS_FNS(ms,
part_deriv_s2,ng)* &
1153 & quadrature_scheme2%GAUSS_BASIS_FNS(ns,
part_deriv_s2,ng)+ &
1154 & quadrature_scheme1%GAUSS_BASIS_FNS(ms,
part_deriv_s3,ng)* &
1155 & quadrature_scheme2%GAUSS_BASIS_FNS(ns,
part_deriv_s3,ng)) +&
1156 & kappa_param*2.0_dp* ( &
1172 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) = &
1173 & equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) + sum
1177 IF(mh==nh.AND.mh<=number_of_dimensions)
THEN 1178 sum = sum + pgm * pgn
1185 & tau_param*2.0_dp* ( &
1186 & quadrature_scheme1%GAUSS_BASIS_FNS(ms,
part_deriv_s1,ng)* &
1187 & quadrature_scheme2%GAUSS_BASIS_FNS(ns,
part_deriv_s1,ng)+ &
1188 & quadrature_scheme1%GAUSS_BASIS_FNS(ms,
part_deriv_s2,ng)* &
1189 & quadrature_scheme2%GAUSS_BASIS_FNS(ns,
part_deriv_s2,ng)+ &
1190 & quadrature_scheme1%GAUSS_BASIS_FNS(ms,
part_deriv_s3,ng)* &
1191 & quadrature_scheme2%GAUSS_BASIS_FNS(ns,
part_deriv_s3,ng)) +&
1192 & kappa_param*2.0_dp* ( &
1208 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) = &
1209 & equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) + sum
1210 IF(nh==fieldvariable%NUMBER_OF_COMPONENTS.AND.mh<=number_of_dimensions)
THEN 1213 DO ni=1,dependent_basis1%NUMBER_OF_XI
1214 sum=sum+pgn*pgmsi(ni)*dxi_dx(ni,mh)
1216 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) = &
1217 & equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs) + sum * rwg
1218 equations_matrix%ELEMENT_MATRIX%MATRIX(nhs,mhs) = &
1219 & equations_matrix%ELEMENT_MATRIX%MATRIX(nhs,mhs) + sum * rwg
1226 IF(rhs_vector%UPDATE_VECTOR) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=0.0_dp
1227 IF(source_vector%UPDATE_VECTOR)
THEN 1234 source_vector%ELEMENT_VECTOR%VECTOR(mhs)=source_vector%ELEMENT_VECTOR%VECTOR(mhs)+sum
1237 IF(mh<=number_of_dimensions)
THEN 1242 source_vector%ELEMENT_VECTOR%VECTOR(mhs)=source_vector%ELEMENT_VECTOR%VECTOR(mhs)+sum
1250 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 1251 CALL field_interpolationparametersscalefactorselementget(element_number,equations%INTERPOLATION% &
1252 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
1254 DO mh=1,fieldvariable%NUMBER_OF_COMPONENTS
1256 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1259 IF(equations_matrix%UPDATE_MATRIX)
THEN 1261 DO nh=1,fieldvariable%NUMBER_OF_COMPONENTS
1262 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1264 equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)=equations_matrix%ELEMENT_MATRIX%MATRIX(mhs,nhs)* &
1265 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
1266 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
1270 IF(source_vector%UPDATE_VECTOR)
THEN 1271 source_vector%ELEMENT_VECTOR%VECTOR(mhs)=source_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
1272 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
1274 IF(rhs_vector%UPDATE_VECTOR)
THEN 1275 rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
1276 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
1282 CALL flagerror(
"Not implemented.",err,error,*999)
1284 localerror=
"Equations set subtype "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
1285 &
" is not valid for a Galerkin projection type of a data fitting equations set class." 1286 CALL flagerror(localerror,err,error,*999)
1290 CALL flagerror(
"Equations set equations is not associated.",err,error,*999)
1293 CALL flagerror(
"Equations set is not associated.",err,error,*999)
1296 exits(
"FITTING_FINITE_ELEMENT_CALCULATE")
1298 999 errorsexits(
"FITTING_FINITE_ELEMENT_CALCULATE",err,error)
1312 INTEGER(INTG),
INTENT(OUT) :: ERR
1315 INTEGER(INTG) :: GEOMETRIC_MESH_COMPONENT,GEOMETRIC_SCALING_TYPE,GEOMETRIC_COMPONENT_NUMBER,MATERIAL_FIELD_NUMBER_OF_COMPONENTS
1316 INTEGER(INTG) :: DEPENDENT_FIELD_NUMBER_OF_COMPONENTS,NUMBER_OF_DIMENSIONS,I,MATERIAL_FIELD_NUMBER_OF_VARIABLES
1317 INTEGER(INTG) :: INDEPENDENT_FIELD_NUMBER_OF_COMPONENTS,INDEPENDENT_FIELD_NUMBER_OF_VARIABLES
1326 enters(
"FITTING_EQUATIONS_SET_MAT_PROPERTIES_SETUP",err,error,*999)
1329 NULLIFY(equations_mapping)
1330 NULLIFY(equations_matrices)
1331 NULLIFY(geometric_decomposition)
1333 IF(
ASSOCIATED(equations_set))
THEN 1334 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 1335 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
1336 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 1337 CALL flagerror(
"Equations set specification must have three entries for a fitting type equations set.", &
1342 SELECT CASE(equations_set_setup%SETUP_TYPE)
1348 SELECT CASE(equations_set_setup%ACTION_TYPE)
1355 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1356 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1357 &
" is invalid for an update-materials Galerkin projection." 1358 CALL flagerror(local_error,err,error,*999)
1371 SELECT CASE(equations_set_setup%ACTION_TYPE)
1373 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 1375 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
1376 & dependent_field,err,error,*999)
1377 CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
1378 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
1379 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
1380 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
1381 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
1383 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
1384 & geometric_field,err,error,*999)
1387 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,2,err,error,*999)
1388 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,(/field_u_variable_type, &
1389 & field_deludeln_variable_type/),err,error,*999)
1390 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,
"Phi",err,error,*999)
1391 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,
"del Phi/del n", &
1394 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
1395 & field_vector_dimension_type,err,error,*999)
1396 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
1397 & field_vector_dimension_type,err,error,*999)
1398 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
1399 & field_dp_type,err,error,*999)
1400 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
1401 & field_dp_type,err,error,*999)
1402 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1403 & number_of_dimensions,err,error,*999)
1406 dependent_field_number_of_components=2
1407 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
1408 & dependent_field_number_of_components,err,error,*999)
1409 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
1410 & dependent_field_number_of_components,err,error,*999)
1412 DO i=1,dependent_field_number_of_components
1414 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,i, &
1415 & geometric_mesh_component,err,error,*999)
1416 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,i, &
1417 & geometric_mesh_component,err,error,*999)
1418 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,i, &
1419 & geometric_mesh_component,err,error,*999)
1423 SELECT CASE(equations_set%SOLUTION_METHOD)
1426 DO i=1,dependent_field_number_of_components
1427 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1428 & field_u_variable_type,i,field_node_based_interpolation,err,error,*999)
1429 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
1430 & field_deludeln_variable_type,i,field_node_based_interpolation,err,error,*999)
1432 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type, &
1434 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type, &
1438 CALL flagerror(
"Not implemented.",err,error,*999)
1440 CALL flagerror(
"Not implemented.",err,error,*999)
1442 CALL flagerror(
"Not implemented.",err,error,*999)
1444 CALL flagerror(
"Not implemented.",err,error,*999)
1446 CALL flagerror(
"Not implemented.",err,error,*999)
1448 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1450 CALL flagerror(local_error,err,error,*999)
1454 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
1455 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
1456 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
1457 CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type,field_deludeln_variable_type/), &
1459 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
1461 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_vector_dimension_type, &
1463 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1464 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
1466 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1467 & number_of_dimensions,err,error,*999)
1470 dependent_field_number_of_components=2
1471 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
1472 & dependent_field_number_of_components,err,error,*999)
1473 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
1474 & dependent_field_number_of_components,err,error,*999)
1475 SELECT CASE(equations_set%SOLUTION_METHOD)
1477 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
1478 & field_node_based_interpolation,err,error,*999)
1479 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
1480 & field_node_based_interpolation,err,error,*999)
1482 CALL flagerror(
"Not implemented.",err,error,*999)
1484 CALL flagerror(
"Not implemented.",err,error,*999)
1486 CALL flagerror(
"Not implemented.",err,error,*999)
1488 CALL flagerror(
"Not implemented.",err,error,*999)
1490 CALL flagerror(
"Not implemented.",err,error,*999)
1492 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1494 CALL flagerror(local_error,err,error,*999)
1498 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 1499 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
1502 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1503 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1504 &
" is invalid for an update-materials Galerkin projection" 1505 CALL flagerror(local_error,err,error,*999)
1512 SELECT CASE(equations_set_setup%ACTION_TYPE)
1515 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 1518 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION, &
1519 & equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
1521 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
1523 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
1524 & field_independent_type,err,error,*999)
1526 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
1529 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
1530 & geometric_decomposition,err,error,*999)
1532 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set% &
1533 & geometry%GEOMETRIC_FIELD,err,error,*999)
1535 independent_field_number_of_variables=1
1536 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
1537 & independent_field_number_of_variables,err,error,*999)
1538 CALL field_variable_types_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
1539 & (/field_u_variable_type/),err,error,*999)
1540 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
1541 & field_vector_dimension_type,err,error,*999)
1542 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
1543 & field_dp_type,err,error,*999)
1544 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1545 & number_of_dimensions,err,error,*999)
1547 independent_field_number_of_components=number_of_dimensions
1548 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
1549 & field_u_variable_type,independent_field_number_of_components,err,error,*999)
1550 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1551 & 1,geometric_mesh_component,err,error,*999)
1553 DO i=1,independent_field_number_of_components
1554 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
1555 & field_u_variable_type,i,geometric_mesh_component,err,error,*999)
1559 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
1560 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
1561 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
1562 CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type/),err,error,*999)
1563 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
1565 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1566 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1567 & number_of_dimensions,err,error,*999)
1569 independent_field_number_of_components=number_of_dimensions
1570 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
1571 & independent_field_number_of_components,err,error,*999)
1575 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 1576 CALL field_create_finish(equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
1578 CALL field_parameter_set_create(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
1579 & field_boundary_set_type,err,error,*999)
1581 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1582 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1583 &
" is invalid for an update-materials Galerkin projection" 1584 CALL flagerror(local_error,err,error,*999)
1591 SELECT CASE(equations_set_setup%ACTION_TYPE)
1594 material_field_number_of_variables=1
1595 material_field_number_of_components=2
1597 equations_materials=>equations_set%MATERIALS
1598 IF(
ASSOCIATED(equations_materials))
THEN 1599 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 1602 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set% &
1603 & materials%MATERIALS_FIELD,err,error,*999)
1604 CALL field_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_material_type,err,error,*999)
1605 CALL field_dependent_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_independent_type, &
1607 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
1610 CALL field_mesh_decomposition_set_and_lock(equations_set%MATERIALS%MATERIALS_FIELD, &
1611 & geometric_decomposition,err,error,*999)
1613 CALL field_geometric_field_set_and_lock(equations_materials%MATERIALS_FIELD,equations_set%GEOMETRY% &
1614 & geometric_field,err,error,*999)
1615 CALL field_number_of_variables_set(equations_materials%MATERIALS_FIELD, &
1616 & material_field_number_of_variables,err,error,*999)
1617 CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,(/field_u_variable_type/), &
1619 CALL field_variable_label_set(equations_materials%MATERIALS_FIELD,field_u_variable_type,
"Fitting Materials", &
1621 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1622 & field_vector_dimension_type,err,error,*999)
1623 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1624 & field_dp_type,err,error,*999)
1625 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1626 & material_field_number_of_components,err,error,*999)
1627 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1628 & 1,geometric_component_number,err,error,*999)
1629 DO i = 1, material_field_number_of_components
1630 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1631 & i,geometric_component_number,err,error,*999)
1632 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1633 & i,field_node_based_interpolation,err,error,*999)
1636 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
1637 CALL field_scaling_type_set(equations_materials%MATERIALS_FIELD,geometric_scaling_type,err,error,*999)
1640 CALL field_type_check(equations_set_setup%FIELD,field_material_type,err,error,*999)
1641 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
1642 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
1643 CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type/),err,error,*999)
1644 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
1646 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
1647 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
1648 & number_of_dimensions,err,error,*999)
1649 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
1652 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
1655 equations_materials=>equations_set%MATERIALS
1656 IF(
ASSOCIATED(equations_materials))
THEN 1657 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 1659 CALL field_create_finish(equations_materials%MATERIALS_FIELD,err,error,*999)
1661 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
1662 & field_values_set_type,1,1.0_dp,err,error,*999)
1665 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
1668 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1669 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1670 &
" is invalid for an update-materials Galerkin projection." 1671 CALL flagerror(local_error,err,error,*999)
1678 SELECT CASE(equations_set_setup%ACTION_TYPE)
1684 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1685 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1686 &
" is invalid for an update-materials Galerkin projection." 1687 CALL flagerror(local_error,err,error,*999)
1802 SELECT CASE(equations_set_setup%ACTION_TYPE)
1804 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 1809 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
1812 SELECT CASE(equations_set%SOLUTION_METHOD)
1826 SELECT CASE(equations%SPARSITY_TYPE)
1836 local_error=
"The equations matrices sparsity type of "// &
1838 CALL flagerror(local_error,err,error,*999)
1842 CALL flagerror(
"Not implemented.",err,error,*999)
1844 CALL flagerror(
"Not implemented.",err,error,*999)
1846 CALL flagerror(
"Not implemented.",err,error,*999)
1848 CALL flagerror(
"Not implemented.",err,error,*999)
1850 CALL flagerror(
"Not implemented.",err,error,*999)
1852 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
1854 CALL flagerror(local_error,err,error,*999)
1857 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
1858 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1859 &
" is invalid for an update-materials Galerkin projection." 1860 CALL flagerror(local_error,err,error,*999)
1867 local_error=
"The setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
1868 &
" is invalid for an update-materials Galerkin projection." 1869 CALL flagerror(local_error,err,error,*999)
1872 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
1873 &
" does not equal an update-materials Galerkin projection subtype." 1874 CALL flagerror(local_error,err,error,*999)
1877 CALL flagerror(
"Equations set is not associated.",err,error,*999)
1880 exits(
"FITTING_EQUATIONS_SET_MAT_PROPERTIES_SETUP")
1882 999 errorsexits(
"FITTING_EQUATIONS_SET_MAT_PROPERTIES_SETUP",err,error)
1896 INTEGER(INTG),
INTENT(OUT) :: ERR
1901 enters(
"FITTING_EQUATIONS_SET_SETUP",err,error,*999)
1903 IF(
ASSOCIATED(equations_set))
THEN 1904 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 1905 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
1906 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 1907 CALL flagerror(
"Equations set specification must have three entries for a fitting type equations set.", &
1910 SELECT CASE(equations_set%SPECIFICATION(3))
1924 CALL flagerror(
"Not implemented.",err,error,*999)
1926 local_error=
"Equations set subtype "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
1927 &
" is not valid for a Galerkin projection type of a data fitting equation set class." 1928 CALL flagerror(local_error,err,error,*999)
1931 CALL flagerror(
"Equations set is not associated.",err,error,*999)
1934 exits(
"FITTING_EQUATIONS_SET_SETUP")
1936 999 errorsexits(
"FITTING_EQUATIONS_SET_SETUP",err,error)
1949 INTEGER(INTG),
INTENT(IN) :: SOLUTION_METHOD
1950 INTEGER(INTG),
INTENT(OUT) :: ERR
1955 enters(
"FITTING_EQUATIONS_SET_SOLUTION_METHOD_SET",err,error,*999)
1957 IF(
ASSOCIATED(equations_set))
THEN 1958 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 1959 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
1960 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 1961 CALL flagerror(
"Equations set specification must have three entries for a fitting type equations set.", &
1964 SELECT CASE(equations_set%SPECIFICATION(3))
1966 SELECT CASE(solution_method)
1970 CALL flagerror(
"Not implemented.",err,error,*999)
1972 CALL flagerror(
"Not implemented.",err,error,*999)
1974 CALL flagerror(
"Not implemented.",err,error,*999)
1976 CALL flagerror(
"Not implemented.",err,error,*999)
1978 CALL flagerror(
"Not implemented.",err,error,*999)
1980 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 1981 CALL flagerror(local_error,err,error,*999)
1985 SELECT CASE(solution_method)
1989 CALL flagerror(
"Not implemented.",err,error,*999)
1991 CALL flagerror(
"Not implemented.",err,error,*999)
1993 CALL flagerror(
"Not implemented.",err,error,*999)
1995 CALL flagerror(
"Not implemented.",err,error,*999)
1997 CALL flagerror(
"Not implemented.",err,error,*999)
1999 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 2000 CALL flagerror(local_error,err,error,*999)
2003 SELECT CASE(solution_method)
2007 CALL flagerror(
"Not implemented.",err,error,*999)
2009 CALL flagerror(
"Not implemented.",err,error,*999)
2011 CALL flagerror(
"Not implemented.",err,error,*999)
2013 CALL flagerror(
"Not implemented.",err,error,*999)
2015 CALL flagerror(
"Not implemented.",err,error,*999)
2017 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 2018 CALL flagerror(local_error,err,error,*999)
2023 SELECT CASE(solution_method)
2027 CALL flagerror(
"Not implemented.",err,error,*999)
2029 CALL flagerror(
"Not implemented.",err,error,*999)
2031 CALL flagerror(
"Not implemented.",err,error,*999)
2033 CALL flagerror(
"Not implemented.",err,error,*999)
2035 CALL flagerror(
"Not implemented.",err,error,*999)
2037 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 2038 CALL flagerror(local_error,err,error,*999)
2041 local_error=
"Equations set subtype of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
2042 &
" is not valid for a Galerkin projection type of an data fitting equations set class." 2043 CALL flagerror(local_error,err,error,*999)
2046 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2049 exits(
"FITTING_EQUATIONS_SET_SOLUTION_METHOD_SET")
2051 999 errorsexits(
"FITTING_EQUATIONS_SET_SOLUTION_METHOD_SET",err,error)
2064 INTEGER(INTG),
INTENT(IN) :: specification(:)
2065 INTEGER(INTG),
INTENT(OUT) :: err
2069 INTEGER(INTG) :: equationsSetType,equationsSetSubtype
2071 enters(
"Fitting_EquationsSetSpecificationSet",err,error,*999)
2073 IF(
ASSOCIATED(equationsset))
THEN 2074 IF(
SIZE(specification,1)/=3)
THEN 2075 CALL flagerror(
"Equations set specification must have three entries for a fitting class equations set.", &
2078 equationssettype=specification(2)
2079 SELECT CASE(equationssettype)
2081 equationssetsubtype=specification(3)
2082 SELECT CASE(equationssetsubtype)
2094 CALL flagerror(
"Not implemented.",err,error,*999)
2096 localerror=
"The third equations set specifiction of "//
trim(
numbertovstring(equationssetsubtype,
"*",err,error))// &
2097 &
" is not valid for a Galerkin projection type of a data fitting equations set." 2098 CALL flagerror(localerror,err,error,*999)
2101 localerror=
"The second equations set specification of "//
trim(
numbertovstring(equationssettype,
"*",err,error))// &
2102 &
" is not valid for a data fitting equations set." 2103 CALL flagerror(localerror,err,error,*999)
2106 IF(
ALLOCATED(equationsset%specification))
THEN 2107 CALL flagerror(
"Equations set specification is already allocated.",err,error,*999)
2109 ALLOCATE(equationsset%specification(3),stat=err)
2110 IF(err/=0)
CALL flagerror(
"Could not allocate equations set specification.",err,error,*999)
2114 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2117 exits(
"Fitting_EquationsSetSpecificationSet")
2119 999
errors(
"Fitting_EquationsSetSpecificationSet",err,error)
2120 exits(
"Fitting_EquationsSetSpecificationSet")
2135 INTEGER(INTG),
INTENT(OUT) :: ERR
2138 INTEGER(INTG) :: GEOMETRIC_MESH_COMPONENT,GEOMETRIC_SCALING_TYPE
2147 enters(
"FITTING_EQUATION_SET_STANDARD_SETUP",err,error,*999)
2149 NULLIFY(boundary_conditions)
2151 NULLIFY(equations_mapping)
2152 NULLIFY(equations_matrices)
2153 NULLIFY(geometric_decomposition)
2155 IF(
ASSOCIATED(equations_set))
THEN 2156 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 2157 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
2158 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 2159 CALL flagerror(
"Equations set specification must have three entries for a fitting type equations set.", &
2163 SELECT CASE(equations_set_setup%SETUP_TYPE)
2169 SELECT CASE(equations_set_setup%ACTION_TYPE)
2176 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2177 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2178 &
" is invalid for a standard Galerkin projection." 2179 CALL flagerror(local_error,err,error,*999)
2192 SELECT CASE(equations_set_setup%ACTION_TYPE)
2194 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 2196 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
2197 & dependent_field,err,error,*999)
2198 CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
2199 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
2200 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
2201 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
2202 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
2204 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
2205 & geometric_field,err,error,*999)
2206 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,2,err,error,*999)
2207 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,(/field_u_variable_type, &
2208 & field_deludeln_variable_type/),err,error,*999)
2209 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,
"Phi",err,error,*999)
2210 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,
"del Phi/del n", &
2212 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2213 & field_scalar_dimension_type,err,error,*999)
2214 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
2215 & field_scalar_dimension_type,err,error,*999)
2216 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2217 & field_dp_type,err,error,*999)
2218 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
2219 & field_dp_type,err,error,*999)
2220 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
2222 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
2224 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1,
"Phi",err,error,*999)
2225 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
2226 &
"del Phi/del n",err,error,*999)
2228 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
2229 & geometric_mesh_component,err,error,*999)
2230 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1, &
2231 & geometric_mesh_component,err,error,*999)
2232 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
2233 & geometric_mesh_component,err,error,*999)
2234 SELECT CASE(equations_set%SOLUTION_METHOD)
2236 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2237 & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
2238 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2239 & field_deludeln_variable_type,1,field_node_based_interpolation,err,error,*999)
2241 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
2242 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
2244 CALL flagerror(
"Not implemented.",err,error,*999)
2246 CALL flagerror(
"Not implemented.",err,error,*999)
2248 CALL flagerror(
"Not implemented.",err,error,*999)
2250 CALL flagerror(
"Not implemented.",err,error,*999)
2252 CALL flagerror(
"Not implemented.",err,error,*999)
2254 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
2256 CALL flagerror(local_error,err,error,*999)
2260 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
2261 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
2262 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
2263 CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type,field_deludeln_variable_type/), &
2265 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type,err,error,*999)
2266 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_scalar_dimension_type, &
2268 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
2269 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
2270 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
2271 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type,1,err,error,*999)
2272 SELECT CASE(equations_set%SOLUTION_METHOD)
2274 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
2275 & field_node_based_interpolation,err,error,*999)
2276 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
2277 & field_node_based_interpolation,err,error,*999)
2279 CALL flagerror(
"Not implemented.",err,error,*999)
2281 CALL flagerror(
"Not implemented.",err,error,*999)
2283 CALL flagerror(
"Not implemented.",err,error,*999)
2285 CALL flagerror(
"Not implemented.",err,error,*999)
2287 CALL flagerror(
"Not implemented.",err,error,*999)
2289 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
2291 CALL flagerror(local_error,err,error,*999)
2295 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 2296 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
2299 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2300 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2301 &
" is invalid for a standard Galerkin projection" 2302 CALL flagerror(local_error,err,error,*999)
2309 SELECT CASE(equations_set_setup%ACTION_TYPE)
2315 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2316 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2317 &
" is invalid for a standard Galerkin projection." 2318 CALL flagerror(local_error,err,error,*999)
2325 SELECT CASE(equations_set_setup%ACTION_TYPE)
2331 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2332 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2333 &
" is invalid for a standard Galerkin projection." 2334 CALL flagerror(local_error,err,error,*999)
2449 SELECT CASE(equations_set_setup%ACTION_TYPE)
2451 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 2456 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
2459 SELECT CASE(equations_set%SOLUTION_METHOD)
2473 SELECT CASE(equations%SPARSITY_TYPE)
2483 local_error=
"The equations matrices sparsity type of "// &
2485 CALL flagerror(local_error,err,error,*999)
2489 CALL flagerror(
"Not implemented.",err,error,*999)
2491 CALL flagerror(
"Not implemented.",err,error,*999)
2493 CALL flagerror(
"Not implemented.",err,error,*999)
2495 CALL flagerror(
"Not implemented.",err,error,*999)
2497 CALL flagerror(
"Not implemented.",err,error,*999)
2499 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
2501 CALL flagerror(local_error,err,error,*999)
2504 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2505 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2506 &
" is invalid for a standard Galerkin projection." 2507 CALL flagerror(local_error,err,error,*999)
2514 local_error=
"The setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2515 &
" is invalid for a standard Galerkin projection." 2516 CALL flagerror(local_error,err,error,*999)
2519 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
2520 &
" does not equal a standard Galerkin projection subtype." 2521 CALL flagerror(local_error,err,error,*999)
2524 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2527 exits(
"FITTING_EQUATIONS_SET_STANDARD_SETUP")
2529 999 errorsexits(
"FITTING_EQUATIONS_SET_STANDARD_SETUP",err,error)
2543 INTEGER(INTG),
INTENT(OUT) :: ERR
2546 INTEGER(INTG) :: GEOMETRIC_MESH_COMPONENT,GEOMETRIC_SCALING_TYPE,GEOMETRIC_COMPONENT_NUMBER
2547 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS,I
2548 INTEGER(INTG) :: INDEPENDENT_FIELD_NUMBER_OF_COMPONENTS,INDEPENDENT_FIELD_NUMBER_OF_VARIABLES
2549 INTEGER(INTG) :: dependentFieldNumberOfVariables
2550 INTEGER(INTG) :: dimensionIdx
2560 enters(
"FITTING_EQUATION_SET_VECTORDATA_SETUP",err,error,*999)
2562 NULLIFY(boundary_conditions)
2564 NULLIFY(equations_mapping)
2565 NULLIFY(equations_matrices)
2566 NULLIFY(geometric_decomposition)
2568 IF(
ASSOCIATED(equations_set))
THEN 2569 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 2570 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
2571 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 2572 CALL flagerror(
"Equations set specification must have three entries for a fitting type equations set.", &
2575 SELECT CASE(equations_set%SPECIFICATION(3))
2580 SELECT CASE(equations_set_setup%SETUP_TYPE)
2585 SELECT CASE(equations_set_setup%ACTION_TYPE)
2592 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2593 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2594 &
" is invalid for a vector data Galerkin projection." 2595 CALL flagerror(local_error,err,error,*999)
2608 SELECT CASE(equations_set_setup%ACTION_TYPE)
2610 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 2612 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
2613 & dependent_field,err,error,*999)
2614 CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
2615 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
2616 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
2617 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
2618 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
2620 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
2621 & geometric_field,err,error,*999)
2622 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,2,err,error,*999)
2623 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,(/field_u_variable_type, &
2624 & field_deludeln_variable_type/),err,error,*999)
2625 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,
"Phi",err,error,*999)
2626 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,
"del Phi/del n", &
2628 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2629 & field_vector_dimension_type,err,error,*999)
2630 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
2631 & field_vector_dimension_type,err,error,*999)
2632 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2633 & field_dp_type,err,error,*999)
2634 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
2635 & field_dp_type,err,error,*999)
2636 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2637 & number_of_dimensions,err,error,*999)
2639 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
2640 & geometric_mesh_component,err,error,*999)
2643 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2644 & number_of_dimensions,err,error,*999)
2648 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
2649 & number_of_dimensions,err,error,*999)
2654 DO i=1,number_of_dimensions
2656 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,i, &
2657 & geometric_mesh_component,err,error,*999)
2658 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,i, &
2659 & geometric_mesh_component,err,error,*999)
2663 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
2664 & number_of_dimensions+1,err,error,*999)
2665 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
2666 & number_of_dimensions+1,err,error,*999)
2667 DO i=1,number_of_dimensions+1
2669 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,i, &
2670 & geometric_mesh_component,err,error,*999)
2671 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,i, &
2672 & geometric_mesh_component,err,error,*999)
2675 SELECT CASE(equations_set%SOLUTION_METHOD)
2680 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2681 & field_u_variable_type,i,field_node_based_interpolation,err,error,*999)
2682 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2683 & field_deludeln_variable_type,i,field_node_based_interpolation,err,error,*999)
2686 DO i=1,number_of_dimensions+1
2687 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2688 & field_u_variable_type,i,field_node_based_interpolation,err,error,*999)
2689 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2690 & field_deludeln_variable_type,i,field_node_based_interpolation,err,error,*999)
2693 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type, &
2695 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type, &
2699 CALL flagerror(
"Not implemented.",err,error,*999)
2701 CALL flagerror(
"Not implemented.",err,error,*999)
2703 CALL flagerror(
"Not implemented.",err,error,*999)
2705 CALL flagerror(
"Not implemented.",err,error,*999)
2707 CALL flagerror(
"Not implemented.",err,error,*999)
2709 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
2711 CALL flagerror(local_error,err,error,*999)
2715 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
2716 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
2717 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
2718 CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type,field_deludeln_variable_type/), &
2720 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
2722 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_vector_dimension_type, &
2724 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
2725 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
2726 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2727 & number_of_dimensions,err,error,*999)
2728 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
2729 & number_of_dimensions,err,error,*999)
2730 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
2731 & number_of_dimensions,err,error,*999)
2732 SELECT CASE(equations_set%SOLUTION_METHOD)
2735 DO i=1,number_of_dimensions
2736 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2737 & field_u_variable_type,i,field_node_based_interpolation,err,error,*999)
2738 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2739 & field_deludeln_variable_type,i,field_node_based_interpolation,err,error,*999)
2742 DO i=1,number_of_dimensions+1
2743 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2744 & field_u_variable_type,i,field_node_based_interpolation,err,error,*999)
2745 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
2746 & field_deludeln_variable_type,i,field_node_based_interpolation,err,error,*999)
2749 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type, &
2751 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type, &
2754 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
2755 & field_node_based_interpolation,err,error,*999)
2756 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
2757 & field_node_based_interpolation,err,error,*999)
2759 CALL flagerror(
"Not implemented.",err,error,*999)
2761 CALL flagerror(
"Not implemented.",err,error,*999)
2763 CALL flagerror(
"Not implemented.",err,error,*999)
2765 CALL flagerror(
"Not implemented.",err,error,*999)
2767 CALL flagerror(
"Not implemented.",err,error,*999)
2769 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
2771 CALL flagerror(local_error,err,error,*999)
2775 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 2776 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
2779 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2780 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2781 &
" is invalid for an update-materials Galerkin projection" 2782 CALL flagerror(local_error,err,error,*999)
2789 SELECT CASE(equations_set_setup%ACTION_TYPE)
2792 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 2795 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION, &
2796 & equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
2798 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
2800 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
2801 & field_independent_type,err,error,*999)
2803 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
2806 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
2807 & geometric_decomposition,err,error,*999)
2809 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set% &
2810 & geometry%GEOMETRIC_FIELD,err,error,*999)
2812 independent_field_number_of_variables=1
2813 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
2814 & independent_field_number_of_variables,err,error,*999)
2815 CALL field_variable_types_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
2816 & (/field_u_variable_type/),err,error,*999)
2817 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
2818 & field_vector_dimension_type,err,error,*999)
2819 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
2820 & field_dp_type,err,error,*999)
2821 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2822 & number_of_dimensions,err,error,*999)
2824 independent_field_number_of_components=number_of_dimensions
2825 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
2826 & field_u_variable_type,independent_field_number_of_components,err,error,*999)
2827 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2828 & 1,geometric_mesh_component,err,error,*999)
2830 DO i=1,independent_field_number_of_components
2831 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
2832 & field_u_variable_type,i,geometric_mesh_component,err,error,*999)
2836 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
2837 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
2838 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
2839 CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type/),err,error,*999)
2840 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
2842 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
2843 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2844 & number_of_dimensions,err,error,*999)
2846 independent_field_number_of_components=number_of_dimensions
2847 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
2848 & independent_field_number_of_components,err,error,*999)
2852 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 2853 CALL field_create_finish(equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
2855 CALL field_parameter_set_create(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
2856 & field_boundary_set_type,err,error,*999)
2858 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2859 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2860 &
" is invalid for an update-materials Galerkin projection" 2861 CALL flagerror(local_error,err,error,*999)
2868 SELECT CASE(equations_set_setup%ACTION_TYPE)
2871 equations_materials=>equations_set%MATERIALS
2872 IF(
ASSOCIATED(equations_materials))
THEN 2873 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 2876 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set% &
2877 & materials%MATERIALS_FIELD,err,error,*999)
2878 CALL field_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_material_type,err,error,*999)
2879 CALL field_dependent_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_independent_type, &
2881 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
2884 CALL field_mesh_decomposition_set_and_lock(equations_set%MATERIALS%MATERIALS_FIELD, &
2885 & geometric_decomposition,err,error,*999)
2887 CALL field_geometric_field_set_and_lock(equations_materials%MATERIALS_FIELD,equations_set%GEOMETRY% &
2888 & geometric_field,err,error,*999)
2889 CALL field_number_of_variables_set(equations_materials%MATERIALS_FIELD, &
2891 CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,(/field_u_variable_type/), &
2893 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
2894 & field_vector_dimension_type,err,error,*999)
2895 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
2896 & field_dp_type,err,error,*999)
2897 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
2899 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2900 & 1,geometric_component_number,err,error,*999)
2901 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
2902 & 1,geometric_component_number,err,error,*999)
2903 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
2904 & 2,geometric_component_number,err,error,*999)
2905 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
2906 & 1,field_node_based_interpolation,err,error,*999)
2907 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
2908 & 2,field_node_based_interpolation,err,error,*999)
2910 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
2911 CALL field_scaling_type_set(equations_materials%MATERIALS_FIELD,geometric_scaling_type,err,error,*999)
2914 CALL field_type_check(equations_set_setup%FIELD,field_material_type,err,error,*999)
2915 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
2916 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
2917 CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type/),err,error,*999)
2918 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
2920 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
2921 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2922 & number_of_dimensions,err,error,*999)
2923 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
2926 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
2929 equations_materials=>equations_set%MATERIALS
2930 IF(
ASSOCIATED(equations_materials))
THEN 2931 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 2933 CALL field_create_finish(equations_materials%MATERIALS_FIELD,err,error,*999)
2935 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
2936 & field_values_set_type,1,0.0_dp,err,error,*999)
2937 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
2938 & field_values_set_type,2,0.0_dp,err,error,*999)
2941 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
2944 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
2945 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
2946 &
" is invalid for an update-materials Galerkin projection." 2947 CALL flagerror(local_error,err,error,*999)
2954 SELECT CASE(equations_set%SPECIFICATION(3))
2957 SELECT CASE(equations_set_setup%ACTION_TYPE)
2960 IF(equations_set%SOURCE%SOURCE_FIELD_AUTO_CREATED)
THEN 2963 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION, &
2964 & equations_set%SOURCE%SOURCE_FIELD,err,error,*999)
2966 CALL field_type_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,field_general_type,err,error,*999)
2968 CALL field_label_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,
"Source Field",err,error, &
2971 CALL field_dependent_type_set_and_lock(equations_set%SOURCE%SOURCE_FIELD, &
2972 & field_independent_type,err,error,*999)
2974 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
2977 CALL field_mesh_decomposition_set_and_lock(equations_set%SOURCE%SOURCE_FIELD, &
2978 & geometric_decomposition,err,error,*999)
2980 CALL field_geometric_field_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,equations_set% &
2981 & geometry%GEOMETRIC_FIELD,err,error,*999)
2982 CALL field_number_of_variables_set_and_lock(equations_set%SOURCE%SOURCE_FIELD, &
2984 CALL field_variable_types_set_and_lock(equations_set%SOURCE%SOURCE_FIELD, &
2985 & (/field_u_variable_type/),err,error,*999)
2986 CALL field_dimension_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
2987 & field_vector_dimension_type,err,error,*999)
2988 CALL field_data_type_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
2989 & field_dp_type,err,error,*999)
2990 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2991 & number_of_dimensions,err,error,*999)
2992 CALL field_number_of_components_set_and_lock(equations_set%SOURCE%SOURCE_FIELD, &
2993 & field_u_variable_type,number_of_dimensions,err,error,*999)
2994 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
2995 & 1,geometric_mesh_component,err,error,*999)
2997 CALL field_component_mesh_component_set(equations_set%SOURCE%SOURCE_FIELD, &
2998 & field_u_variable_type,1,geometric_mesh_component,err,error,*999)
2999 SELECT CASE(equations_set%SOLUTION_METHOD)
3002 CALL field_component_interpolation_set_and_lock(equations_set%SOURCE%SOURCE_FIELD, &
3003 & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
3004 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type, &
3006 CALL field_scaling_type_set(equations_set%SOURCE%SOURCE_FIELD,geometric_scaling_type, &
3010 local_error=
"The solution method of " &
3012 CALL flagerror(local_error,err,error,*999)
3016 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
3017 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
3018 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
3019 CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type/),err,error,*999)
3020 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
3022 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
3023 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3024 & number_of_dimensions,err,error,*999)
3026 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
3027 & number_of_dimensions,err,error,*999)
3028 SELECT CASE(equations_set%SOLUTION_METHOD)
3030 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
3031 & field_node_based_interpolation,err,error,*999)
3032 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,1, &
3033 & field_node_based_interpolation,err,error,*999)
3036 &
"*",err,error))//
" is invalid." 3037 CALL flagerror(local_error,err,error,*999)
3042 IF(equations_set%SOURCE%SOURCE_FIELD_AUTO_CREATED)
THEN 3043 CALL field_create_finish(equations_set%SOURCE%SOURCE_FIELD,err,error,*999)
3056 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
3057 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
3058 &
" is invalid for a standard PEE problem" 3059 CALL flagerror(local_error,err,error,*999)
3062 local_error=
"The equation set subtype of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
3063 &
" for a setup sub type of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
3064 &
" is invalid for a PPE equation." 3065 CALL flagerror(local_error,err,error,*999)
3180 SELECT CASE(equations_set_setup%ACTION_TYPE)
3182 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 3187 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
3190 SELECT CASE(equations_set%SOLUTION_METHOD)
3205 SELECT CASE(equations%SPARSITY_TYPE)
3215 local_error=
"The equations matrices sparsity type of "// &
3217 CALL flagerror(local_error,err,error,*999)
3221 CALL flagerror(
"Not implemented.",err,error,*999)
3223 CALL flagerror(
"Not implemented.",err,error,*999)
3225 CALL flagerror(
"Not implemented.",err,error,*999)
3227 CALL flagerror(
"Not implemented.",err,error,*999)
3229 CALL flagerror(
"Not implemented.",err,error,*999)
3231 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
3233 CALL flagerror(local_error,err,error,*999)
3236 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
3237 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
3238 &
" is invalid for a vector data Galerkin projection." 3239 CALL flagerror(local_error,err,error,*999)
3242 local_error=
"The setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
3243 &
" is invalid for a vector data Galerkin projection." 3244 CALL flagerror(local_error,err,error,*999)
3249 SELECT CASE(equations_set_setup%SETUP_TYPE)
3254 SELECT CASE(equations_set_setup%ACTION_TYPE)
3261 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
3262 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
3263 &
" is invalid for a vector data Galerkin projection." 3264 CALL flagerror(local_error,err,error,*999)
3281 SELECT CASE(equations_set_setup%ACTION_TYPE)
3284 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 3287 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION, &
3288 & equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
3290 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
3292 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
3293 & field_dependent_type,err,error,*999)
3295 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
3298 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
3299 & geometric_decomposition,err,error,*999)
3301 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set% &
3302 & geometry%GEOMETRIC_FIELD,err,error,*999)
3304 dependentfieldnumberofvariables=2
3305 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
3306 & dependentfieldnumberofvariables,err,error,*999)
3307 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
3308 & [field_u_variable_type,field_deludeln_variable_type],err,error,*999)
3309 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,
"Phi",err,error,*999)
3310 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,
"del Phi/del n", &
3312 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
3313 & field_vector_dimension_type,err,error,*999)
3314 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
3315 & field_vector_dimension_type,err,error,*999)
3316 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
3317 & field_dp_type,err,error,*999)
3318 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
3319 & field_dp_type,err,error,*999)
3320 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3321 & number_of_dimensions,err,error,*999)
3323 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type,1, &
3324 & geometric_mesh_component,err,error,*999)
3325 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
3326 & number_of_dimensions,err,error,*999)
3327 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
3328 & number_of_dimensions,err,error,*999)
3329 DO i=1,number_of_dimensions
3331 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,i, &
3332 & geometric_mesh_component,err,error,*999)
3333 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,i, &
3334 & geometric_mesh_component,err,error,*999)
3336 SELECT CASE(equations_set%SOLUTION_METHOD)
3338 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
3339 & field_u_variable_type,1,field_node_based_interpolation,err,error,*999)
3340 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
3341 & field_deludeln_variable_type,1,field_node_based_interpolation,err,error,*999)
3342 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type, &
3344 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type, &
3348 CALL flagerror(
"Not implemented.",err,error,*999)
3350 CALL flagerror(
"Not implemented.",err,error,*999)
3352 CALL flagerror(
"Not implemented.",err,error,*999)
3354 CALL flagerror(
"Not implemented.",err,error,*999)
3356 CALL flagerror(
"Not implemented.",err,error,*999)
3358 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
3360 CALL flagerror(local_error,err,error,*999)
3364 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
3365 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
3366 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
3368 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
3369 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3370 & number_of_dimensions,err,error,*999)
3371 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
3372 & number_of_dimensions,err,error,*999)
3373 SELECT CASE(equations_set%SOLUTION_METHOD)
3375 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
3376 & field_node_based_interpolation,err,error,*999)
3378 CALL flagerror(
"Not implemented.",err,error,*999)
3380 CALL flagerror(
"Not implemented.",err,error,*999)
3382 CALL flagerror(
"Not implemented.",err,error,*999)
3384 CALL flagerror(
"Not implemented.",err,error,*999)
3386 CALL flagerror(
"Not implemented.",err,error,*999)
3388 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
3390 CALL flagerror(local_error,err,error,*999)
3394 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 3395 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
3398 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
3399 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
3400 &
" is invalid for an update-materials Galerkin projection" 3401 CALL flagerror(local_error,err,error,*999)
3407 SELECT CASE(equations_set_setup%ACTION_TYPE)
3409 equations_materials=>equations_set%MATERIALS
3410 IF(
ASSOCIATED(equations_materials))
THEN 3411 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 3414 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set% &
3415 & materials%MATERIALS_FIELD,err,error,*999)
3416 CALL field_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_material_type,err,error,*999)
3417 CALL field_dependent_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_independent_type, &
3419 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
3422 CALL field_mesh_decomposition_set_and_lock(equations_set%MATERIALS%MATERIALS_FIELD, &
3423 & geometric_decomposition,err,error,*999)
3425 CALL field_geometric_field_set_and_lock(equations_materials%MATERIALS_FIELD,equations_set%GEOMETRY% &
3426 & geometric_field,err,error,*999)
3427 CALL field_number_of_variables_set(equations_materials%MATERIALS_FIELD,1,err,error,*999)
3428 CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,[field_u_variable_type], &
3430 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
3431 & field_vector_dimension_type,err,error,*999)
3432 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
3433 & field_dp_type,err,error,*999)
3435 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
3437 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3438 & 1,geometric_component_number,err,error,*999)
3439 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
3440 & 1,geometric_component_number,err,error,*999)
3441 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
3442 & 2,geometric_component_number,err,error,*999)
3443 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
3444 & 1,field_constant_interpolation,err,error,*999)
3445 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
3446 & 2,field_constant_interpolation,err,error,*999)
3448 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
3449 CALL field_scaling_type_set(equations_materials%MATERIALS_FIELD,geometric_scaling_type,err,error,*999)
3452 CALL field_type_check(equations_set_setup%FIELD,field_material_type,err,error,*999)
3453 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
3454 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
3455 CALL field_variable_types_check(equations_set_setup%FIELD,(/field_u_variable_type/),err,error,*999)
3456 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
3458 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
3459 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3460 & number_of_dimensions,err,error,*999)
3461 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1,err,error,*999)
3464 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
3467 equations_materials=>equations_set%MATERIALS
3468 IF(
ASSOCIATED(equations_materials))
THEN 3469 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 3471 CALL field_create_finish(equations_materials%MATERIALS_FIELD,err,error,*999)
3473 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
3474 & field_values_set_type,1,0.0_dp,err,error,*999)
3475 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
3476 & field_values_set_type,2,0.0_dp,err,error,*999)
3479 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
3482 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
3483 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
3484 &
" is invalid for an update-materials Galerkin projection." 3485 CALL flagerror(local_error,err,error,*999)
3492 SELECT CASE(equations_set_setup%ACTION_TYPE)
3495 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 3498 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION, &
3499 & equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
3501 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
3503 CALL field_label_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,
"Independent Field",err,error, &
3506 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3507 & field_independent_type,err,error,*999)
3509 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition, &
3512 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3513 & geometric_decomposition,err,error,*999)
3515 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set% &
3516 & geometry%GEOMETRIC_FIELD,err,error,*999)
3517 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3519 CALL field_variable_types_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3520 & [field_u_variable_type,field_v_variable_type],err,error,*999)
3522 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
3523 & field_vector_dimension_type,err,error,*999)
3524 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
3525 & field_dp_type,err,error,*999)
3526 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3527 & number_of_dimensions,err,error,*999)
3528 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3529 & field_u_variable_type,number_of_dimensions,err,error,*999)
3530 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3531 & 1,geometric_mesh_component,err,error,*999)
3533 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3534 & field_u_variable_type,1,geometric_mesh_component,err,error,*999)
3536 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type, &
3537 & field_scalar_dimension_type,err,error,*999)
3538 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type, &
3539 & field_dp_type,err,error,*999)
3540 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3541 & field_v_variable_type,1,err,error,*999)
3542 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3543 & 1,geometric_mesh_component,err,error,*999)
3545 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3546 & field_v_variable_type,1,geometric_mesh_component,err,error,*999)
3547 SELECT CASE(equations_set%SOLUTION_METHOD)
3550 DO dimensionidx = 1,number_of_dimensions
3551 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3552 & field_u_variable_type,dimensionidx,field_data_point_based_interpolation,err,error,*999)
3554 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
3555 & field_v_variable_type,1,field_data_point_based_interpolation,err,error,*999)
3556 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type, &
3558 CALL field_scaling_type_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_scaling_type, &
3562 local_error=
"The solution method of " &
3564 CALL flagerror(local_error,err,error,*999)
3568 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
3569 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
3571 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
3573 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
3574 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
3575 & number_of_dimensions,err,error,*999)
3577 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
3578 & number_of_dimensions,err,error,*999)
3580 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_scalar_dimension_type, &
3582 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
3583 SELECT CASE(equations_set%SOLUTION_METHOD)
3585 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,1, &
3586 & field_data_point_based_interpolation,err,error,*999)
3587 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,1, &
3588 & field_data_point_based_interpolation,err,error,*999)
3591 &
"*",err,error))//
" is invalid." 3592 CALL flagerror(local_error,err,error,*999)
3597 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 3598 CALL field_create_finish(equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
3601 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
3602 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
3603 &
" is invalid for a standard PEE problem" 3604 CALL flagerror(local_error,err,error,*999)
3610 SELECT CASE(equations_set_setup%ACTION_TYPE)
3612 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 3621 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
3624 SELECT CASE(equations_set%SOLUTION_METHOD)
3638 SELECT CASE(equations%SPARSITY_TYPE)
3648 local_error=
"The equations matrices sparsity type of "// &
3650 CALL flagerror(local_error,err,error,*999)
3654 CALL flagerror(
"Not implemented.",err,error,*999)
3656 CALL flagerror(
"Not implemented.",err,error,*999)
3658 CALL flagerror(
"Not implemented.",err,error,*999)
3660 CALL flagerror(
"Not implemented.",err,error,*999)
3662 CALL flagerror(
"Not implemented.",err,error,*999)
3664 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
3666 CALL flagerror(local_error,err,error,*999)
3669 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
3670 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
3671 &
" is invalid for a vector data Galerkin projection." 3672 CALL flagerror(local_error,err,error,*999)
3675 local_error=
"The setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
3676 &
" is invalid for a vector data Galerkin projection." 3677 CALL flagerror(local_error,err,error,*999)
3680 local_error=
"The equations set subtype of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
3681 &
" does not equal a vector data Galerkin projection subtype." 3682 CALL flagerror(local_error,err,error,*999)
3685 CALL flagerror(
"Equations set is not associated.",err,error,*999)
3688 exits(
"FITTING_EQUATIONS_SET_VECTORDATA_SETUP")
3690 999 errorsexits(
"FITTING_EQUATIONS_SET_VECTORDATA_SETUP",err,error)
3704 INTEGER(INTG),
INTENT(OUT) :: ERR
3709 enters(
"FITTING_PROBLEM_SETUP",err,error,*999)
3711 IF(
ASSOCIATED(problem))
THEN 3712 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 3713 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3714 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 3715 CALL flagerror(
"Problem specification must have three entries for a fitting problem.",err,error,*999)
3717 SELECT CASE(problem%SPECIFICATION(3))
3729 CALL flagerror(
"Not implemented.",err,error,*999)
3732 &
" is not valid for a Galerkin projection type of a data fitting problem class." 3733 CALL flagerror(local_error,err,error,*999)
3736 CALL flagerror(
"Problem is not associated.",err,error,*999)
3739 exits(
"FITTING_PROBLEM_SETUP")
3741 999 errorsexits(
"FITTING_PROBLEM_SETUP",err,error)
3755 INTEGER(INTG),
INTENT(OUT) :: ERR
3764 enters(
"FITTING_PROBLEM_STANDARD_SETUP",err,error,*999)
3766 NULLIFY(control_loop)
3768 NULLIFY(solver_equations)
3770 IF(
ASSOCIATED(problem))
THEN 3771 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 3772 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3773 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 3774 CALL flagerror(
"Problem specification must have three entries for a fitting problem.",err,error,*999)
3777 SELECT CASE(problem_setup%SETUP_TYPE)
3779 SELECT CASE(problem_setup%ACTION_TYPE)
3785 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3787 &
" is invalid for a standard Galerkin projection." 3788 CALL flagerror(local_error,err,error,*999)
3791 SELECT CASE(problem_setup%ACTION_TYPE)
3797 control_loop_root=>problem%CONTROL_LOOP
3801 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3803 &
" is invalid for a standard Galerkin projection." 3804 CALL flagerror(local_error,err,error,*999)
3808 control_loop_root=>problem%CONTROL_LOOP
3810 SELECT CASE(problem_setup%ACTION_TYPE)
3826 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3828 &
" is invalid for a standard Galerkin projection." 3829 CALL flagerror(local_error,err,error,*999)
3832 SELECT CASE(problem_setup%ACTION_TYPE)
3835 control_loop_root=>problem%CONTROL_LOOP
3847 control_loop_root=>problem%CONTROL_LOOP
3856 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3858 &
" is invalid for a standard Galerkin projection." 3859 CALL flagerror(local_error,err,error,*999)
3862 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
3863 &
" is invalid for a standard Galerkin projection." 3864 CALL flagerror(local_error,err,error,*999)
3867 local_error=
"The problem subtype of "//
trim(
number_to_vstring(problem%SPECIFICATION(3),
"*",err,error))// &
3868 &
" does not equal a standard Galerkin projection subtype." 3869 CALL flagerror(local_error,err,error,*999)
3872 CALL flagerror(
"Problem is not associated.",err,error,*999)
3875 exits(
"FITTING_PROBLEM_STANDARD_SETUP")
3877 999 errorsexits(
"FITTING_PROBLEM_STANDARD_SETUP",err,error)
3891 INTEGER(INTG),
INTENT(OUT) :: ERR
3900 enters(
"FITTING_PROBLEM_VECTORDATA_SETUP",err,error,*999)
3902 NULLIFY(control_loop)
3904 NULLIFY(solver_equations)
3906 IF(
ASSOCIATED(problem))
THEN 3907 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 3908 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
3909 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 3910 CALL flagerror(
"Problem specification must have three entries for a fitting problem.",err,error,*999)
3916 SELECT CASE(problem_setup%SETUP_TYPE)
3918 SELECT CASE(problem_setup%ACTION_TYPE)
3924 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3926 &
" is invalid for a vector data Galerkin projection." 3927 CALL flagerror(local_error,err,error,*999)
3930 SELECT CASE(problem_setup%ACTION_TYPE)
3941 control_loop_root=>problem%CONTROL_LOOP
3945 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3947 &
" is invalid for a vector data Galerkin projection." 3948 CALL flagerror(local_error,err,error,*999)
3952 control_loop_root=>problem%CONTROL_LOOP
3954 SELECT CASE(problem_setup%ACTION_TYPE)
3970 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
3972 &
" is invalid for a vector data Galerkin projection." 3973 CALL flagerror(local_error,err,error,*999)
3976 SELECT CASE(problem_setup%ACTION_TYPE)
3979 control_loop_root=>problem%CONTROL_LOOP
3995 control_loop_root=>problem%CONTROL_LOOP
4004 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
4006 &
" is invalid for a vector data Galerkin projection." 4007 CALL flagerror(local_error,err,error,*999)
4010 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
4011 &
" is invalid for a vector data Galerkin projection." 4012 CALL flagerror(local_error,err,error,*999)
4015 local_error=
"The problem subtype of "//
trim(
number_to_vstring(problem%SPECIFICATION(3),
"*",err,error))// &
4016 &
" does not equal a vector data Galerkin projection subtype." 4017 CALL flagerror(local_error,err,error,*999)
4020 CALL flagerror(
"Problem is not associated.",err,error,*999)
4023 exits(
"FITTING_PROBLEM_VECTORDATA_SETUP")
4025 999 errorsexits(
"FITTING_PROBLEM_VECTORDATA_SETUP",err,error)
4038 INTEGER(INTG),
INTENT(IN) :: problemSpecification(:)
4039 INTEGER(INTG),
INTENT(OUT) :: err
4043 INTEGER(INTG) :: problemType,problemSubtype
4045 enters(
"Fitting_ProblemSpecificationSet",err,error,*999)
4047 IF(
ASSOCIATED(problem))
THEN 4048 IF(
SIZE(problemspecification,1)==3)
THEN 4049 problemtype=problemspecification(2)
4050 problemsubtype=problemspecification(3)
4051 SELECT CASE(problemtype)
4053 SELECT CASE(problemsubtype)
4061 CALL flag_error(
"Not implemented.",err,error,*999)
4063 localerror=
"The third problem specification of "//
trim(
numbertovstring(problemsubtype,
"*",err,error))// &
4064 &
" is not valid for a Galerkin projection type of a data fitting problem." 4065 CALL flagerror(localerror,err,error,*999)
4068 localerror=
"The second problem specification of "//
trim(
numbertovstring(problemtype,
"*",err,error))// &
4069 &
" is not valid for a data fitting problem." 4070 CALL flagerror(localerror,err,error,*999)
4072 IF(
ALLOCATED(problem%specification))
THEN 4073 CALL flagerror(
"Problem specification is already allocated.",err,error,*999)
4075 ALLOCATE(problem%specification(3),stat=err)
4076 IF(err/=0)
CALL flagerror(
"Could not allocate problem specification.",err,error,*999)
4080 CALL flagerror(
"Fitting problem specification must have three entries.",err,error,*999)
4083 CALL flagerror(
"Problem is not associated",err,error,*999)
4086 exits(
"Fitting_ProblemSpecificationSet")
4088 999
errors(
"Fitting_ProblemSpecificationSet",err,error)
4089 exits(
"Fitting_ProblemSpecificationSet")
4099 & geometric_interpolated_point, dxdy, jxy, err, error, *)
4103 REAL(DP) :: DXDY(3,3)
4105 INTEGER(INTG),
INTENT(OUT) :: ERR
4108 INTEGER(INTG) :: derivative_idx,component_idx,xi_idx
4109 REAL(DP) :: DXDXI(3,3),DYDXI(3,3),DXIDY(3,3)
4112 enters(
"FITTING_GAUSS_DEFORMATION_GRADIENT_TENSOR",err,error,*999)
4115 DO component_idx=1,3
4118 dxdxi(component_idx,xi_idx)=geometric_interpolated_point%VALUES(component_idx,derivative_idx)
4119 dydxi(component_idx,xi_idx)=reference_geometric_interpolated_point%VALUES(component_idx,derivative_idx)
4124 CALL invert(dydxi,dxidy,jyxi,err,error,*999)
4131 exits(
"FITTING_GAUSS_DEFORMATION_GRADIENT_TENSOR")
4133 999 errorsexits(
"FITTING_GAUSS_DEFORMATION_GRADIENT_TENSOR",err,error)
4148 INTEGER(INTG),
INTENT(OUT) :: ERR
4153 enters(
"FITTING_PRE_SOLVE",err,error,*999)
4155 IF(
ASSOCIATED(control_loop))
THEN 4156 IF(
ASSOCIATED(solver))
THEN 4157 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 4158 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 4159 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
4160 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 4161 CALL flagerror(
"Problem specification must have three entries for a fitting problem.",err,error,*999)
4163 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
4184 local_error=
"The third problem specification of "// &
4186 &
" is not valid for a data fitting problem class." 4187 CALL flagerror(local_error,err,error,*999)
4190 CALL flagerror(
"Problem is not associated.",err,error,*999)
4193 CALL flagerror(
"Solver is not associated.",err,error,*999)
4196 CALL flagerror(
"Control loop is not associated.",err,error,*999)
4199 exits(
"FITTING_PRE_SOLVE")
4201 999 errorsexits(
"FITTING_PRE_SOLVE",err,error)
4216 INTEGER(INTG),
INTENT(OUT) :: ERR
4221 enters(
"FITTING_POST_SOLVE",err,error,*999)
4223 IF(
ASSOCIATED(control_loop))
THEN 4224 IF(
ASSOCIATED(solver))
THEN 4225 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 4226 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 4227 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
4228 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 4229 CALL flagerror(
"Problem specification must have three entries for a fitting problem.",err,error,*999)
4231 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
4243 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
4244 &
" is not valid for a fitting type of a classical field problem class." 4245 CALL flagerror(local_error,err,error,*999)
4248 CALL flagerror(
"Problem is not associated.",err,error,*999)
4251 CALL flagerror(
"Problem is not associated.",err,error,*999)
4254 exits(
"FITTING_POST_SOLVE")
4256 999 errorsexits(
"FITTING_POST_SOLVE",err,error)
4272 INTEGER(INTG),
INTENT(OUT) :: ERR
4279 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
4280 INTEGER(INTG) :: EQUATIONS_SET_IDX,CURRENT_LOOP_ITERATION,OUTPUT_ITERATION_NUMBER
4282 LOGICAL :: EXPORT_FIELD
4284 CHARACTER(7) :: FILE
4285 CHARACTER(7) :: OUTPUT_FILE
4287 enters(
"FITTING_POST_SOLVE_OUTPUT_DATA",err,error,*999)
4289 IF(
ASSOCIATED(control_loop))
THEN 4292 IF(
ASSOCIATED(solver))
THEN 4293 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 4294 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 4295 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
4296 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 4297 CALL flagerror(
"Problem specification must have three entries for a fitting problem.",err,error,*999)
4299 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
4307 control_time_loop=>control_loop
4309 solver_equations=>solver%SOLVER_EQUATIONS
4310 IF(
ASSOCIATED(solver_equations))
THEN 4311 solver_mapping=>solver_equations%SOLVER_MAPPING
4312 IF(
ASSOCIATED(solver_mapping))
THEN 4314 DO equations_set_idx=1,solver_mapping%NUMBER_OF_EQUATIONS_SETS
4315 equations_set=>solver_mapping%EQUATIONS_SETS(equations_set_idx)%PTR
4316 current_loop_iteration=control_time_loop%TIME_LOOP%ITERATION_NUMBER
4317 output_iteration_number=control_time_loop%TIME_LOOP%OUTPUT_NUMBER
4318 IF(output_iteration_number/=0)
THEN 4319 IF(control_time_loop%TIME_LOOP%CURRENT_TIME<=control_time_loop%TIME_LOOP%STOP_TIME)
THEN 4320 IF(current_loop_iteration<10)
THEN 4321 WRITE(output_file,
'("DATA_0",I0)') current_loop_iteration
4322 ELSE IF(current_loop_iteration<100)
THEN 4323 WRITE(output_file,
'("DATA_",I0)') current_loop_iteration
4329 IF(export_field)
THEN 4330 IF(mod(current_loop_iteration,output_iteration_number)==0)
THEN 4334 & output_file,err,error,*999)
4345 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
4346 &
" is not valid for a fitting equation of a classical field problem class." 4347 CALL flagerror(local_error,err,error,*999)
4350 CALL flagerror(
"Problem is not associated.",err,error,*999)
4353 CALL flagerror(
"Solver is not associated.",err,error,*999)
4356 CALL flagerror(
"Control loop is not associated.",err,error,*999)
4358 exits(
"FITTING_POST_SOLVE_OUTPUT_DATA")
4360 999 errorsexits(
"FITTING_POST_SOLVE_OUTPUT_DATA",err,error)
4374 INTEGER(INTG),
INTENT(OUT) :: ERR
4387 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS,CURRENT_LOOP_ITERATION
4388 INTEGER(INTG) :: INPUT_TYPE,INPUT_OPTION
4389 REAL(DP),
POINTER :: INPUT_VEL_NEW_DATA(:)
4392 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
4393 LOGICAL :: BOUNDARY_UPDATE
4395 boundary_update=.false.
4397 enters(
"FITTING_PRE_SOLVE_UPDATE_INPUT_DATA",err,error,*999)
4399 NULLIFY(input_vel_new_data)
4401 IF(
ASSOCIATED(control_loop))
THEN 4402 IF(
ASSOCIATED(solver))
THEN 4403 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 4404 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 4405 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
4406 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 4407 CALL flagerror(
"Problem specification must have three entries for a fitting problem.",err,error,*999)
4409 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
4422 control_time_loop=>control_loop
4425 solver_equations=>solver%SOLVER_EQUATIONS
4426 IF(
ASSOCIATED(solver_equations))
THEN 4427 solver_mapping=>solver_equations%SOLVER_MAPPING
4428 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
4429 IF(
ASSOCIATED(equations))
THEN 4430 equations_set=>equations%EQUATIONS_SET
4431 IF(
ASSOCIATED(equations_set))
THEN 4432 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
4433 & number_of_dimensions,err,error,*999)
4434 current_loop_iteration=control_time_loop%TIME_LOOP%ITERATION_NUMBER
4439 CALL field_parameter_set_data_get(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
4441 & field_values_set_type,input_vel_new_data,err,error,*999)
4445 & number_of_dimensions,input_type,input_option,current_loop_iteration,1.0_dp)
4483 CALL flagerror(
"Equations set is not associated.",err,error,*999)
4486 CALL flagerror(
"Equations are not associated.",err,error,*999)
4489 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
4492 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
4493 &
" is not valid for a vector data type of a fitting field problem class." 4494 CALL flagerror(local_error,err,error,*999)
4496 CALL field_parameter_set_update_start(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
4497 & field_values_set_type,err,error,*999)
4498 CALL field_parameter_set_update_finish(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
4499 & field_values_set_type,err,error,*999)
4501 CALL flagerror(
"Problem is not associated.",err,error,*999)
4504 CALL flagerror(
"Solver is not associated.",err,error,*999)
4507 CALL flagerror(
"Control loop is not associated.",err,error,*999)
4509 exits(
"FITTING_PRE_SOLVE_UPDATE_INPUT_DATA")
4511 999 errorsexits(
"FITTING_PRE_SOLVE_UPDATE_INPUT_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.
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.
integer(intg), parameter second_part_deriv
Second partial derivative i.e., d^2u/ds^2.
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.
Returns the inverse of a matrix.
integer(intg), parameter problem_control_time_loop_type
Time control loop.
subroutine fitting_problem_standard_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the standard Galerkin projections problem.
subroutine, public fluid_mechanics_io_write_fitted_field(REGION, EQUATIONS_SET_GLOBAL_NUMBER, NAME, ERR, ERROR,)
integer(intg), parameter problem_setup_control_type
Solver setup for a problem.
This module handles all problem wide constants.
subroutine, public fitting_problemspecificationset(problem, problemSpecification, err, error,)
Sets the problem specification for a data fitting problem class.
integer(intg), parameter, public control_loop_node
The identifier for a each "leaf" node in a control loop.
integer(intg), parameter problem_datapointvectorquasistaticfittingsubtype
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.
Evaluates the appropriate partial derivative index for the specificied basis function at a Xi locatio...
integer(intg), parameter problem_vector_data_fitting_subtype
subroutine, public fitting_equations_set_solution_method_set(EQUATIONS_SET, SOLUTION_METHOD, ERR, ERROR,)
Sets/changes the solution method for a Galerkin projection type of an data fitting equations set clas...
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.
subroutine fitting_post_solve_output_data(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Output data post solve.
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.
This module handles all equations matrix and rhs routines.
subroutine, public solver_type_set(SOLVER, SOLVE_TYPE, ERR, ERROR,)
Sets/changes the type for a solver.
integer(intg), parameter equations_static
The equations are static and have no time dependence.
Contains information on an equations set.
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.
subroutine, public solvers_create_start(CONTROL_LOOP, SOLVERS, ERR, ERROR,)
Start the creation of a solvers for the control loop.
Contains information on the solvers to be used in a control loop.
integer(intg), parameter problem_control_simple_type
Simple, one iteration control loop.
subroutine, public fitting_pre_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the output type for a data fitting problem class.
subroutine, public fitting_finite_element_calculate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Calculates the element stiffness matrices and RHS for a Galerkin projection finite element equations ...
integer(intg), parameter first_part_deriv
First partial derivative i.e., du/ds.
This module contains routines for timing the program.
subroutine, public control_loop_current_times_get(CONTROL_LOOP, CURRENT_TIME, TIME_INCREMENT, ERR, ERROR,)
Gets the current time parameters for a time control loop.
Contains information of the source vector for equations matrices.
integer(intg), parameter solver_equations_static
Solver equations are static.
integer(intg), parameter part_deriv_s2
First partial derivative in the s2 direction i.e., du/ds2.
subroutine, public fitting_equations_set_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the Galerkin projection type of a data fitting equations set class.
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 contains all mathematics support 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.
logical, save, public diagnostics2
.TRUE. if level 2 diagnostic output is active in the current routine
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.
Contains information on a control loop.
integer(intg), parameter equations_set_mat_properties_inria_model_data_fitting_subtype
integer(intg), parameter equations_set_vector_data_pre_fitting_subtype
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
subroutine, public solver_equations_create_finish(SOLVER_EQUATIONS, ERR, ERROR,)
Finishes the process of creating solver equations.
integer(intg), parameter, public solver_sparse_matrices
Use sparse solver matrices.
subroutine, public solver_equations_create_start(SOLVER, SOLVER_EQUATIONS, ERR, ERROR,)
Starts the process of creating solver equations.
integer(intg), parameter problem_data_fitting_type
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.
integer(intg), parameter problem_generalised_data_fitting_subtype
integer(intg), parameter equations_set_setup_independent_type
Independent variables.
This module contains all program wide constants.
subroutine, public solver_library_type_set(SOLVER, SOLVER_LIBRARY_TYPE, ERR, ERROR,)
Sets/changes the type of library type to use for the solver.
integer(intg), parameter problem_div_free_vector_data_fitting_subtype
integer(intg), parameter part_deriv_s1
First partial derivative in the s1 direction i.e., du/ds1.
subroutine, public equationsmapping_linearmatricesnumberset(EQUATIONS_MAPPING, NUMBER_OF_LINEAR_EQUATIONS_MATRICES, ERR, ERROR,)
Sets/changes the number of linear equations matrices.
integer(intg), parameter equations_set_mat_properties_data_fitting_subtype
integer(intg), parameter problem_setup_initial_type
Initial setup for a problem.
This module handles all Darcy equations routines.
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.
subroutine, public fitting_problem_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the Galerkin projection problem.
integer(intg), parameter solver_equations_quasistatic
Solver equations are quasistatic.
subroutine, public solver_equations_linearity_type_set(SOLVER_EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for solver equations.
integer(intg), parameter equations_set_setup_start_action
Start setup action.
Contains the topology information for a decomposition.
integer(intg), parameter problem_mat_properties_data_fitting_subtype
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.
subroutine fitting_equations_set_mat_properties_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the update-materials Galerkin projection.
This module contains all type definitions in order to avoid cyclic module references.
Contains information on the equations matrices and vectors.
integer(intg), parameter, public equations_matrix_fem_structure
Finite element matrix structure.
integer(intg), parameter part_deriv_s3
First partial derivative in the s3 direction i.e., du/ds3.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
Contains information of the linear matrices for equations matrices.
integer(intg), parameter, public general_output_type
General output type.
integer(intg), parameter problem_standard_data_fitting_subtype
subroutine, public fitting_equations_set_vectordata_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the vector data Galerkin projection.
integer(intg), parameter part_deriv_s1_s1
Second partial derivative in the s1 direction i.e., d^2u/ds1ds1.
subroutine, public equations_matrices_linear_storage_type_set(EQUATIONS_MATRICES, STORAGE_TYPE, ERR, ERROR,)
Sets the storage type (sparsity) of the linear equations matrices.
integer(intg), parameter problem_vector_data_pre_fitting_subtype
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...
subroutine, public fitting_pre_solve_update_input_data(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Update input data conditions for field fitting.
subroutine, public control_loop_type_set(CONTROL_LOOP, LOOP_TYPE, ERR, ERROR,)
Sets/changes the control loop type.
Contains data point decompostion topology.
integer(intg), parameter part_deriv_s2_s3
Cross derivative in the s2 and s3 direction i.e., d^2u/ds2ds3.
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.
integer(intg), parameter part_deriv_s1_s3
Cross derivative in the s1 and s3 direction i.e., d^2u/ds1ds3.
subroutine, public equations_set_equations_get(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Gets the equations for an equations set.
subroutine fitting_gauss_deformation_gradient_tensor(REFERENCE_GEOMETRIC_INTERPOLATED_POINT, GEOMETRIC_INTERPOLATED_POINT, DXDY, Jxy, ERR, ERROR,)
Evaluates the deformation gradient tensor at a given Gauss point.
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.
subroutine fitting_equations_set_standard_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the standard Galerkin projection.
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.
integer(intg), parameter equations_set_gfv_solution_method
Grid-based Finite Volume solution method.
integer(intg), parameter problem_fitting_class
integer(intg), parameter equations_set_setup_geometry_type
Geometry setup.
Contains information for a problem.
Returns the determinant of a matrix.
integer(intg), parameter equations_linear
The equations are linear.
subroutine, public fitting_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the problem specification for a data fitting equation set class.
integer(intg), parameter equations_set_standard_data_fitting_subtype
integer(intg), parameter equationsset_datapointvectorstaticfittingsubtype
subroutine, public equations_matrices_create_finish(EQUATIONS_MATRICES, ERR, ERROR,)
Finishes the creation of the equations matrices and RHS for the the equations.
This module handles all distributed matrix vector routines.
This module handles all boundary conditions routines.
This module handles all solver routines.
subroutine, public equations_mapping_create_start(EQUATIONS, EQUATIONS_MAPPING, ERR, ERROR,)
Finishes the process of creating an equations mapping for a equations set equations.
Contains the interpolated value (and the derivatives wrt xi) of a field at a point. Old CMISS name XG.
Contains information about an equations matrix.
integer(intg), parameter equations_set_data_fitting_equation_type
integer(intg), parameter equations_set_vector_data_fitting_subtype
Contains information for a particular quadrature scheme.
integer(intg), parameter equations_set_divfree_vector_data_pre_fitting_subtype
logical, save, public diagnostics5
.TRUE. if level 5 diagnostic output is active in the current routine
This module contains all routines dealing with (non-distributed) matrix and vectors types...
subroutine fitting_problem_vectordata_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the vector data Galerkin projections problem.
subroutine, public equations_linearity_type_set(EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for equations.
subroutine, public control_loop_create_start(PROBLEM, CONTROL_LOOP, ERR, ERROR,)
Start the process of creating a control loop for a problem.
integer(intg), parameter problem_setup_solver_equations_type
Solver equations setup for a problem.
integer(intg), parameter, public diagnostic_output_type
Diagnostic output type.
Contains information on the solver mapping between the global equation sets and the solver matrices...
subroutine, public fitting_post_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the output type for a data fitting problem class.
integer(intg), parameter part_deriv_s1_s2
Cross derivative in the s1 and s2 direction i.e., d^2u/ds1ds2.
integer(intg), parameter part_deriv_s2_s2
Second partial derivative in the s2 direction i.e., d^2u/ds2ds2.
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 equationsset_datapointvectorquasistaticfittingsubtype
integer(intg), parameter part_deriv_s3_s3
Second partial derivative in the s3 direction i.e., d^2u/ds3ds3.
Contains information on the setup information for an equations set.
This module handles all Galerkin projection routines.
integer(intg), parameter problem_setup_start_action
Start setup action.
subroutine, public solver_equations_time_dependence_type_set(SOLVER_EQUATIONS, TIME_DEPENDENCE_TYPE, ERR, ERROR,)
Sets/changes the time dependence type for solver equations.
This module handles all control loop routines.
integer(intg), parameter equations_set_generalised_data_fitting_subtype
Calculates and returns the matrix-product A*B in the matrix C.
subroutine, public errors(NAME, ERR, ERROR)
Records the exiting error of the subroutine.
This module defines all constants shared across equations set routines.
integer(intg), parameter equations_set_bem_solution_method
Boundary Element Method solution method.
subroutine, public solver_solver_equations_get(SOLVER, SOLVER_EQUATIONS, ERR, ERROR,)
Returns a pointer to the solver equations for a solver.
Contains all information about a basis .
integer(intg), parameter problem_div_free_vector_data_pre_fitting_subtype
integer(intg), parameter equations_set_fv_solution_method
Finite Volume solution method.
integer(intg), parameter, public matrix_block_storage_type
Matrix block storage type.
Flags an error condition.
integer(intg), parameter equations_set_setup_initial_type
Initial setup.
recursive subroutine, public control_loop_create_finish(CONTROL_LOOP, ERR, ERROR,)
Finish the process of creating a control loop.
integer(intg), parameter equations_set_divfree_vector_data_fitting_subtype
integer(intg), parameter equations_quasistatic
The equations are quasi-static.
Flags an error condition.
integer(intg), parameter, public solver_linear_type
A linear solver.
Contains information of the RHS vector for equations matrices.
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 equations_set_fitting_class
integer(intg), parameter problem_datapointvectorstaticfittingsubtype