63 USE generated_mesh_routines
143 INTEGER(INTG),
INTENT(OUT) :: ERR
146 INTEGER(INTG) :: node_idx,component_idx,deriv_idx,variable_idx,dim_idx,local_ny,variable_type
147 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS,user_node,global_node,local_node
148 REAL(DP) :: X(3),DEFORMED_X(3),P
149 REAL(DP),
POINTER :: GEOMETRIC_PARAMETERS(:)
150 TYPE(
domain_type),
POINTER :: DOMAIN,DOMAIN_PRESSURE
156 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD
159 INTEGER(INTG),
ALLOCATABLE :: INNER_SURFACE_NODES(:),OUTER_SURFACE_NODES(:),TOP_SURFACE_NODES(:),BOTTOM_SURFACE_NODES(:)
160 INTEGER(INTG) :: INNER_NORMAL_XI,OUTER_NORMAL_XI,TOP_NORMAL_XI,BOTTOM_NORMAL_XI,MESH_COMPONENT
161 INTEGER(INTG) :: MY_COMPUTATIONAL_NODE_NUMBER, DOMAIN_NUMBER, MPI_IERROR
162 REAL(DP) :: PIN,POUT,LAMBDA,DEFORMED_Z
163 LOGICAL :: X_FIXED,Y_FIXED,NODE_EXISTS, X_OKAY,Y_OKAY
166 NULLIFY(geometric_parameters)
168 enters(
"FiniteElasticity_BoundaryConditionsAnalyticCalculate",err,error,*999)
172 IF(
ASSOCIATED(equations_set))
THEN 173 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 174 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
175 IF(
ASSOCIATED(dependent_field))
THEN 176 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
177 IF(
ASSOCIATED(geometric_field))
THEN 178 CALL field_number_of_components_get(geometric_field,field_u_variable_type,number_of_dimensions,err,error,*999)
180 NULLIFY(geometric_variable)
181 CALL field_variable_get(geometric_field,field_u_variable_type,geometric_variable,err,error,*999)
182 mesh_component=geometric_variable%COMPONENTS(1)%MESH_COMPONENT_NUMBER
183 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type,field_values_set_type,geometric_parameters, &
186 IF(
ASSOCIATED(boundary_conditions))
THEN 187 decomposition=>dependent_field%DECOMPOSITION
188 IF(
ASSOCIATED(decomposition))
THEN 189 mesh=>decomposition%MESH
190 IF(
ASSOCIATED(mesh))
THEN 191 generated_mesh=>mesh%GENERATED_MESH
192 IF(
ASSOCIATED(generated_mesh))
THEN 193 nodes_mapping=>decomposition%DOMAIN(1)%PTR%MAPPINGS%NODES
194 IF(
ASSOCIATED(nodes_mapping))
THEN 196 CALL generated_mesh_surface_get(generated_mesh,mesh_component,1_intg, &
197 & inner_surface_nodes,inner_normal_xi,err,error,*999)
198 CALL generated_mesh_surface_get(generated_mesh,mesh_component,2_intg, &
199 & outer_surface_nodes,outer_normal_xi,err,error,*999)
200 CALL generated_mesh_surface_get(generated_mesh,mesh_component,3_intg, &
201 & top_surface_nodes,top_normal_xi,err,error,*999)
202 CALL generated_mesh_surface_get(generated_mesh,mesh_component,4_intg, &
203 & bottom_surface_nodes,bottom_normal_xi,err,error,*999)
206 DO node_idx=1,
SIZE(inner_surface_nodes,1)
207 user_node=inner_surface_nodes(node_idx)
209 CALL decomposition_node_domain_get(decomposition,user_node,1,domain_number,err,error,*999)
210 IF(domain_number==my_computational_node_number)
THEN 218 DO node_idx=1,
SIZE(outer_surface_nodes,1)
219 user_node=outer_surface_nodes(node_idx)
221 CALL decomposition_node_domain_get(decomposition,user_node,1,domain_number,err,error,*999)
222 IF(domain_number==my_computational_node_number)
THEN 230 DO node_idx=1,
SIZE(top_surface_nodes,1)
231 user_node=top_surface_nodes(node_idx)
233 CALL decomposition_node_domain_get(decomposition,user_node,1,domain_number,err,error,*999)
234 IF(domain_number==my_computational_node_number)
THEN 235 CALL meshtopologynodecheckexists(mesh,1,user_node,node_exists,global_node,err,error,*999)
236 IF(.NOT.node_exists) cycle
239 local_ny=geometric_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(local_node)% &
240 & derivatives(1)%VERSIONS(1)
241 deformed_z=geometric_parameters(local_ny)*lambda
248 DO node_idx=1,
SIZE(bottom_surface_nodes,1)
249 user_node=bottom_surface_nodes(node_idx)
251 CALL decomposition_node_domain_get(decomposition,user_node,1,domain_number,err,error,*999)
252 IF(domain_number==my_computational_node_number)
THEN 262 DO node_idx=1,
SIZE(bottom_surface_nodes,1)
263 user_node=bottom_surface_nodes(node_idx)
264 CALL decomposition_node_domain_get(decomposition,user_node,1,domain_number,err,error,*999)
265 IF(domain_number==my_computational_node_number)
THEN 266 CALL meshtopologynodecheckexists(mesh,1,user_node,node_exists,global_node,err,error,*999)
267 IF(.NOT.node_exists) cycle
270 local_ny=geometric_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(local_node)% &
271 & derivatives(1)%VERSIONS(1)
272 x(1)=geometric_parameters(local_ny)
273 CALL meshtopologynodecheckexists(mesh,1,user_node,node_exists,global_node,err,error,*999)
274 IF(.NOT.node_exists) cycle
278 local_ny=geometric_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(local_node)% &
279 & derivatives(1)%VERSIONS(1)
280 x(2)=geometric_parameters(local_ny)
281 IF(abs(x(1))<1e-7_dp)
THEN 288 IF(abs(x(2))<1e-7_dp)
THEN 298 CALL mpi_reduce(x_fixed,x_okay,1,mpi_logical,mpi_lor,0,mpi_comm_world,mpi_ierror)
299 CALL mpi_reduce(y_fixed,y_okay,1,mpi_logical,mpi_lor,0,mpi_comm_world,mpi_ierror)
300 IF(my_computational_node_number==0)
THEN 301 IF(.NOT.(x_okay.AND.y_okay))
THEN 302 CALL flagerror(
"Could not fix nodes to prevent rigid body motion",err,error,*999)
306 CALL flagerror(
"Domain nodes mapping is not associated.",err,error,*999)
309 CALL flagerror(
"Generated mesh is not associated. For the Cylinder analytic solution, "// &
310 &
"it must be available for automatic boundary condition assignment",err,error,*999)
313 CALL flagerror(
"Mesh is not associated",err,error,*999)
316 CALL flagerror(
"Decomposition is not associated",err,error,*999)
320 DO variable_idx=1,dependent_field%NUMBER_OF_VARIABLES
321 variable_type=dependent_field%VARIABLES(variable_idx)%VARIABLE_TYPE
322 field_variable=>dependent_field%VARIABLE_TYPE_MAP(variable_type)%PTR
324 & field_variable%NUMBER_OF_GLOBAL_DOFS,err,error,*999)
325 IF(
ASSOCIATED(field_variable))
THEN 326 CALL field_parameter_set_create(dependent_field,variable_type,field_analytic_values_set_type,err,error,*999)
328 IF(field_variable%COMPONENTS(component_idx)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 329 domain=>field_variable%COMPONENTS(component_idx)%DOMAIN
330 IF(
ASSOCIATED(domain))
THEN 331 IF(
ASSOCIATED(domain%TOPOLOGY))
THEN 332 domain_nodes=>domain%TOPOLOGY%NODES
333 IF(
ASSOCIATED(domain_nodes))
THEN 335 IF(field_variable%COMPONENTS(4)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 336 domain_pressure=>field_variable%COMPONENTS(4)%DOMAIN
337 IF(
ASSOCIATED(domain_pressure))
THEN 338 IF(
ASSOCIATED(domain_pressure%TOPOLOGY))
THEN 339 domain_pressure_nodes=>domain_pressure%TOPOLOGY%NODES
340 IF(
ASSOCIATED(domain_pressure_nodes))
THEN 343 DO node_idx=1,domain_nodes%NUMBER_OF_NODES
345 DO dim_idx=1,number_of_dimensions
347 local_ny=geometric_variable%COMPONENTS(dim_idx)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP% &
348 & nodes(node_idx)%DERIVATIVES(1)%VERSIONS(1)
349 x(dim_idx)=geometric_parameters(local_ny)
352 DO deriv_idx=1,domain_nodes%NODES(node_idx)%NUMBER_OF_DERIVATIVES
353 SELECT CASE(equations_set%ANALYTIC%ANALYTIC_FUNCTION_TYPE)
356 SELECT CASE(variable_type)
357 CASE(field_u_variable_type)
358 SELECT CASE(domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX)
362 & equations_set%ANALYTIC%ANALYTIC_USER_PARAMS,deformed_x,p,err,error,*999)
364 CALL flagerror(
"Not implemented.",err,error,*999)
366 CALL flagerror(
"Not implemented.",err,error,*999)
368 CALL flagerror(
"Not implemented.",err,error,*999)
371 domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX,
"*", &
372 & err,error))//
" is invalid." 373 CALL flagerror(local_error,err,error,*999)
375 CASE(field_deludeln_variable_type)
376 SELECT CASE(domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX)
380 CALL flagerror(
"Not implemented.",err,error,*999)
382 CALL flagerror(
"Not implemented.",err,error,*999)
384 CALL flagerror(
"Not implemented.",err,error,*999)
387 domain_nodes%NODES(node_idx)%DERIVATIVES(deriv_idx)%GLOBAL_DERIVATIVE_INDEX,
"*", &
388 & err,error))//
" is invalid." 389 CALL flagerror(local_error,err,error,*999)
394 CALL flagerror(local_error,err,error,*999)
397 local_error=
"The analytic function type of "// &
400 CALL flagerror(local_error,err,error,*999)
403 DO component_idx=1,number_of_dimensions
405 local_ny=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP% &
406 & node_param2dof_map%NODES(node_idx)%DERIVATIVES(deriv_idx)%VERSIONS(1)
407 CALL field_parameter_set_update_local_dof(dependent_field,variable_type, &
408 & field_analytic_values_set_type,local_ny,deformed_x(component_idx),err,error,*999)
411 user_node=domain_nodes%NODES(node_idx)%USER_NUMBER
412 CALL meshtopologynodecheckexists(mesh,domain_pressure%MESH_COMPONENT_NUMBER,user_node, &
413 & node_exists,global_node,err,error,*999)
415 CALL decomposition_node_domain_get(decomposition,user_node, &
416 & domain_pressure%MESH_COMPONENT_NUMBER,domain_number,err,error,*999)
417 IF(domain_number==my_computational_node_number)
THEN 419 local_node=domain_pressure%mappings%nodes%global_to_local_map(global_node)%local_number(1)
421 local_ny=field_variable%COMPONENTS(4)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP% &
422 & nodes(local_node)%DERIVATIVES(deriv_idx)%VERSIONS(1)
425 CALL field_parameter_set_update_local_dof(dependent_field,variable_type, &
426 & field_analytic_values_set_type,local_ny,p/2.0_dp,err,error,*999)
433 CALL flagerror(
"Domain for pressure topology node is not associated",err,error,*999)
436 CALL flagerror(
"Domain for pressure topology is not associated",err,error,*999)
439 CALL flagerror(
"Domain for pressure component is not associated",err,error,*999)
442 CALL flagerror(
"Non-nodal based interpolation of pressure cannot be used with analytic solutions", &
446 CALL flagerror(
"Domain topology nodes is not associated.",err,error,*999)
449 CALL flagerror(
"Domain topology is not associated.",err,error,*999)
452 CALL flagerror(
"Domain is not associated.",err,error,*999)
455 CALL flagerror(
"Only node based interpolation is implemented.",err,error,*999)
457 CALL field_parameter_set_update_start(dependent_field,variable_type,field_analytic_values_set_type, &
459 CALL field_parameter_set_update_finish(dependent_field,variable_type,field_analytic_values_set_type, &
462 CALL flagerror(
"Field variable is not associated.",err,error,*999)
466 CALL field_parameter_set_data_restore(geometric_field,field_u_variable_type,field_values_set_type, &
467 & geometric_parameters,err,error,*999)
469 CALL flagerror(
"Boundary conditions is not associated.",err,error,*999)
472 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
475 CALL flagerror(
"Equations set dependent field is not associated.",err,error,*999)
478 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
481 CALL flagerror(
"Equations set is not associated.",err,error,*999)
485 exits(
"FiniteElasticity_BoundaryConditionsAnalyticCalculate")
487 999
errors(
"FiniteElasticity_BoundaryConditionsAnalyticCalculate",err,error)
488 exits(
"FiniteElasticity_BoundaryConditionsAnalyticCalculate")
500 REAL(DP),
INTENT(IN) :: X(:)
501 REAL(DP),
INTENT(IN) :: ANALYTIC_USER_PARAMS(:)
502 REAL(DP),
INTENT(OUT) :: DEFORMED_X(3)
503 REAL(DP),
INTENT(OUT) :: P
504 INTEGER(INTG),
INTENT(OUT) :: ERR
507 REAL(DP) :: PIN,POUT,LAMBDA,TSI,A1,A2,C1,C2
508 REAL(DP) :: MU1,MU2,MU,K
511 REAL(DP) :: DEFORMED_R,DEFORMED_THETA
512 REAL(DP) :: DELTA,RES
513 REAL(DP),
PARAMETER :: STEP=1e-5_dp, reltol=1e-12_dp
516 enters(
"FiniteElasticity_CylinderAnalyticCalculate",err,error,*999)
547 ELSEIF (delta<1e-3_dp)
THEN 548 CALL flagerror(
"FiniteElasticity_CylinderAnalyticCalculate failed to converge.",err,error,*999)
556 res=delta/(1.0_dp+mu1)
561 mu2=sqrt(((a1/a2)**2*(lambda*mu1**2-1.0_dp)+1.0_dp)/lambda)
564 r=sqrt(x(1)**2+x(2)**2)
565 theta=atan2(x(2),x(1))
568 k=a1**2*(lambda*mu1**2-1.0_dp)
569 mu=sqrt(1.0_dp/lambda*(1.0_dp+k/r**2))
571 deformed_theta=theta+tsi*lambda*x(3)
572 deformed_x(1)=deformed_r*cos(deformed_theta)
573 deformed_x(2)=deformed_r*sin(deformed_theta)
574 deformed_x(3)=lambda*x(3)
577 p=pout-(c1/lambda+c2*lambda)*(1.0_dp/lambda/mu1**2-r**2/(r**2+k)+log(mu**2/mu1**2))+c1*tsi**2*lambda*(r**2-a1**2) &
578 & -2.0_dp*(c1/lambda**2/mu**2+c2*(1.0_dp/lambda**2+1.0_dp/mu**2+tsi**2*r**2))
580 exits(
"FiniteElasticity_CylinderAnalyticCalculate")
582 999 errorsexits(
"FiniteElasticity_CylinderAnalyticCalculate",err,error)
594 REAL(DP) :: FINITE_ELASTICITY_CYLINDER_ANALYTIC_FUNC_EVALUATE
595 REAL(DP) :: MU1,PIN,POUT,LAMBDA,TSI,A1,A2,C1,C2
599 k=a1**2*(lambda*mu1**2-1.0_dp)
600 mu=sqrt(1.0_dp/lambda*(1.0_dp+k/a2**2))
602 finite_elasticity_cylinder_analytic_func_evaluate= &
603 & 2.0_dp*(c1/lambda**2/mu**2 + c2*(1.0_dp/lambda**2+1.0_dp/mu**2+tsi**2*a2**2))+ &
604 & pout-(c1/lambda+c2*lambda)*(1.0_dp/lambda/mu1**2-a2**2/(a2**2+k)+2*log(mu/mu1))+ &
605 & c1*tsi**2*lambda*(a2**2-a1**2)-2.0_dp*(c1/lambda**2/mu**2+c2*(1.0_dp/lambda**2+ &
606 & 1.0_dp/mu**2+tsi**2*a2**2))+pin
617 & materials_interpolated_point,elasticity_tensor,hydro_elasticity_voigt,stress_tensor,dzdnu, &
622 REAL(DP),
INTENT(OUT) :: ELASTICITY_TENSOR(:,:)
623 REAL(DP),
INTENT(OUT) :: HYDRO_ELASTICITY_VOIGT(:)
624 REAL(DP),
INTENT(OUT) :: STRESS_TENSOR(:)
625 REAL(DP),
INTENT(IN) :: DZDNU(:,:)
626 REAL(DP),
INTENT(IN) :: Jznu
627 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER,GAUSS_POINT_NUMBER
628 INTEGER(INTG),
INTENT(OUT) :: ERR
631 INTEGER(INTG) :: PRESSURE_COMPONENT,i,j,dof_idx
632 REAL(DP) :: P, I1, I3
633 REAL(DP) :: DZDNUT(3,3),AZL(3,3),AZU(3,3),TEMP(3,3)
634 REAL(DP) :: AZLv(6), AZUv(6)
635 REAL(DP) :: TEMPTERM1,TEMPTERM2,VALUE
636 REAL(DP),
POINTER :: C(:)
637 REAL(DP) :: B(6),E(6),DQ_DE(6),Q
638 REAL(DP) :: I3EE(6,6)
639 REAL(DP) :: ADJCC(6,6)
640 REAL(DP) :: AZUE(6,6)
644 enters(
"FINITE_ELASTICITY_GAUSS_ELASTICITY_TENSOR",err,error,*999)
646 NULLIFY(field_variable,c)
656 CALL invert(azl,azu,i3,err,error,*999)
671 i3ee = reshape([0.0_dp, 4.0_dp*azlv(3), 4.0_dp*azlv(2), 0.0_dp, 0.0_dp,-4.0_dp*azlv(6), &
672 & 4.0_dp*azlv(3), 0.0_dp, 4.0_dp*azlv(1), 0.0_dp,-4.0_dp*azlv(5), 0.0_dp, &
673 & 4.0_dp*azlv(2), 4.0_dp*azlv(1), 0.0_dp, -2.0_dp*azlv(4), 0.0_dp, 0.0_dp, &
674 & 0.0_dp, 0.0_dp, -4.0_dp*azlv(4), -2.0_dp*azlv(3), 2.0_dp*azlv(6), 2.0_dp*azlv(5), &
675 & 0.0_dp, -4.0_dp*azlv(5), 0.0_dp, 2.0_dp*azlv(6), -2.0_dp*azlv(2), 2.0_dp*azlv(4), &
676 & -4.0_dp*azlv(6), 0.0_dp, 0.0_dp, 2.0_dp*azlv(5), 2.0_dp*azlv(4), -2.0_dp*azlv(1)], [6,6])
677 adjcc = reshape([0.0_dp, azlv(3), azlv(2), 0.0_dp, 0.0_dp,-azlv(6), &
678 & azlv(3), 0.0_dp, azlv(1), 0.0_dp,-azlv(5), 0.0_dp, &
679 & azlv(2), azlv(1), 0.0_dp, -azlv(4), 0.0_dp, 0.0_dp, &
680 & 0.0_dp, 0.0_dp, -azlv(4), -0.5_dp*azlv(3), 0.5_dp*azlv(6), 0.5_dp*azlv(5), &
681 & 0.0_dp, -azlv(5), 0.0_dp,0.5_dp*azlv(6), -0.5_dp*azlv(2), 0.5_dp*azlv(4), &
682 & -azlv(6), 0.0_dp, 0.0_dp, 0.5_dp*azlv(5), 0.5_dp*azlv(4), -0.5_dp*azlv(1)], [6,6])
691 azue(i,j) = -2.0_dp*azuv(i)*azuv(j) + 0.5_dp*i3ee(i,j)/i3
697 elasticity_tensor=0.0_dp
699 SELECT CASE(equations_set%specification(3))
701 local_error=
"Analytic Jacobian has not been validated for the Mooney-Rivlin equations, please use finite differences instead." 702 CALL flagerror(local_error,err,error,*999)
703 pressure_component=dependent_interpolated_point%INTERPOLATION_PARAMETERS%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
704 p=dependent_interpolated_point%VALUES(pressure_component,
no_part_deriv)
709 i1=azl(1,1)+azl(2,2)+azl(3,3)
710 tempterm1=-2.0_dp*c(2)
711 tempterm2=2.0_dp*(c(1)+
i1*c(2))
712 stress_tensor(1)=tempterm1*azl(1,1)+tempterm2
713 stress_tensor(2)=tempterm1*azl(2,2)+tempterm2
714 stress_tensor(3)=tempterm1*azl(3,3)+tempterm2
715 stress_tensor(4)=tempterm1*azl(2,1)
716 stress_tensor(5)=tempterm1*azl(3,1)
717 stress_tensor(6)=tempterm1*azl(3,2)
723 CALL field_variable_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,field_variable,err,error,*999)
724 DO i=1,field_variable%NUMBER_OF_COMPONENTS
725 dof_idx=field_variable%COMPONENTS(i)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP% &
726 & gauss_points(gauss_point_number,element_number)
727 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
728 & field_values_set_type,dof_idx,
VALUE,err,error,*999)
729 stress_tensor(i)=stress_tensor(i)+
VALUE 735 tempterm1=4.0_dp*c(2)
736 tempterm2=-2.0_dp*c(2)
737 elasticity_tensor(2,1)=tempterm1
738 elasticity_tensor(3,1)=tempterm1
739 elasticity_tensor(1,2)=tempterm1
740 elasticity_tensor(3,2)=tempterm1
741 elasticity_tensor(1,3)=tempterm1
742 elasticity_tensor(2,3)=tempterm1
743 elasticity_tensor(4,4)=tempterm2
744 elasticity_tensor(5,5)=tempterm2
745 elasticity_tensor(6,6)=tempterm2
747 elasticity_tensor=elasticity_tensor + p*azue
750 hydro_elasticity_voigt = azuv
758 stress_tensor(1:3)=stress_tensor(1:3)+p
761 pressure_component=dependent_interpolated_point%INTERPOLATION_PARAMETERS%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
762 p=dependent_interpolated_point%VALUES(pressure_component,
no_part_deriv)
763 b=[2.0_dp*c(2),2.0_dp*c(3),2.0_dp*c(3),c(4),c(4),c(3)]
764 e=[0.5_dp*(azl(1,1)-1.0_dp),0.5_dp*(azl(2,2)-1.0_dp),0.5_dp*(azl(3,3)-1.0_dp),azl(2,1),azl(3,1),azl(3,2)]
766 tempterm1=0.5_dp*c(1)*exp(0.5_dp*dot_product(e,dq_de))
768 stress_tensor=tempterm1*dq_de + p*azuv
771 CALL field_variable_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,field_variable,err,error,*999)
772 DO i=1,field_variable%NUMBER_OF_COMPONENTS
773 dof_idx=field_variable%COMPONENTS(i)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP% &
774 & gauss_points(gauss_point_number,element_number)
775 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
776 & field_values_set_type,dof_idx,
VALUE,err,error,*999)
777 stress_tensor(i)=stress_tensor(i)+
VALUE 787 elasticity_tensor(i,j)=tempterm1*dq_de(i)*dq_de(j)
790 b=[2.0_dp*c(2),2.0_dp*c(3),2.0_dp*c(3),c(4),c(4),c(3)]
792 elasticity_tensor(i,i)=elasticity_tensor(i,i)+tempterm1*b(i)
797 elasticity_tensor(i,j)=elasticity_tensor(j,i)
802 elasticity_tensor=elasticity_tensor + p*azue
805 hydro_elasticity_voigt = azuv
812 local_error=
"Analytic Jacobian has not been implemented for the third equations set specification of "// &
814 CALL flagerror(local_error,err,error,*999)
817 exits(
"FINITE_ELASTICITY_GAUSS_ELASTICITY_TENSOR")
819 999 errorsexits(
"FINITE_ELASTICITY_GAUSS_ELASTICITY_TENSOR",err,error)
834 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
835 INTEGER(INTG),
INTENT(OUT) :: ERR
838 INTEGER(INTG) :: FIELD_VAR_TYPE,ng,nh,ns,nhs,ni,mh,ms,mhs,oh
839 INTEGER(INTG) :: PRESSURE_COMPONENT
840 INTEGER(INTG) :: SUM_ELEMENT_PARAMETERS,TOTAL_NUMBER_OF_SURFACE_PRESSURE_CONDITIONS
841 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS,NUMBER_OF_XI
842 INTEGER(INTG) :: ELEMENT_BASE_DOF_INDEX(4),component_idx,component_idx2
843 INTEGER(INTG),
PARAMETER :: OFF_DIAG_COMP(3)=[0,1,3],off_diag_dep_var1(3)=[1,1,2],off_diag_dep_var2(3)=[2,3,3]
844 INTEGER(INTG) :: MESH_COMPONENT_NUMBER,NUMBER_OF_ELEMENT_PARAMETERS(4)
845 REAL(DP) :: DZDNU(3,3),CAUCHY_TENSOR(3,3),HYDRO_ELASTICITY_TENSOR(3,3)
846 REAL(DP) :: JGW_SUB_MAT(3,3)
847 REAL(DP) :: TEMPVEC(3)
848 REAL(DP) :: STRESS_TENSOR(6),ELASTICITY_TENSOR(6,6),HYDRO_ELASTICITY_VOIGT(6)
849 REAL(DP) :: DPHIDZ(3,64,3),DJDZ(64,3)
850 REAL(DP) :: JGW_DPHINS_DZ,JGW_DPHIMS_DZ,PHIMS,PHINS,TEMPTERM
851 REAL(DP) :: Jznu,JGW,SUM1,SUM2
857 & MATERIALS_INTERP_POINT,DEPENDENT_INTERP_POINT
859 & DEPENDENT_INTERP_POINT_METRICS
866 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,MATERIALS_FIELD,FIBRE_FIELD
870 enters(
"FiniteElasticity_FiniteElementJacobianEvaluate",err,error,*999)
872 IF(
ASSOCIATED(equations_set))
THEN 873 equations=>equations_set%EQUATIONS
874 IF(
ASSOCIATED(equations))
THEN 875 equations_matrices=>equations%EQUATIONS_MATRICES
876 nonlinear_matrices=>equations_matrices%NONLINEAR_MATRICES
877 jacobian_matrix=>nonlinear_matrices%JACOBIANS(1)%PTR
878 IF(jacobian_matrix%UPDATE_JACOBIAN)
THEN 879 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
880 geometric_field=>equations%INTERPOLATION%GEOMETRIC_FIELD
881 materials_field=>equations%INTERPOLATION%MATERIALS_FIELD
882 fibre_field=>equations%INTERPOLATION%FIBRE_FIELD
884 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(dependent_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
885 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
888 number_of_dimensions=equations_set%REGION%COORDINATE_SYSTEM%NUMBER_OF_DIMENSIONS
889 number_of_xi=dependent_basis%NUMBER_OF_XI
891 equations_mapping=>equations%EQUATIONS_MAPPING
892 nonlinear_mapping=>equations_mapping%NONLINEAR_MAPPING
894 field_variable=>nonlinear_mapping%RESIDUAL_VARIABLES(1)%PTR
895 field_var_type=field_variable%VARIABLE_TYPE
897 pressure_component=field_variable%NUMBER_OF_COMPONENTS
899 boundary_conditions=>equations_set%BOUNDARY_CONDITIONS
901 & rhs_variable,boundary_conditions_variable,err,error,*999)
905 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
906 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
907 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
908 & geometric_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
909 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
910 & materials_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
911 IF(
ASSOCIATED(fibre_field))
THEN 912 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number,equations%INTERPOLATION% &
913 & fibre_interp_parameters(field_u_variable_type)%PTR,err,error,*999)
917 geometric_interp_point=>equations%INTERPOLATION%GEOMETRIC_INTERP_POINT(field_u_variable_type)%PTR
918 geometric_interp_point_metrics=>equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR
919 IF(
ASSOCIATED(fibre_field))
THEN 920 fibre_interp_point=>equations%INTERPOLATION%FIBRE_INTERP_POINT(field_u_variable_type)%PTR
922 materials_interp_point=>equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR
923 dependent_interp_point=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT(field_var_type)%PTR
924 dependent_interp_point_metrics=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT_METRICS(field_var_type)%PTR
926 sum_element_parameters=0
928 DO nh=1,field_variable%NUMBER_OF_COMPONENTS
929 mesh_component_number=field_variable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
930 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
931 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
933 IF(field_variable%COMPONENTS(nh)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 934 number_of_element_parameters(nh)=dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
935 ELSEIF(field_variable%COMPONENTS(nh)%INTERPOLATION_TYPE==field_element_based_interpolation)
THEN 936 number_of_element_parameters(nh)=1
938 element_base_dof_index(nh)=sum_element_parameters
939 sum_element_parameters=sum_element_parameters+number_of_element_parameters(nh)
943 DO ng=1,dependent_quadrature_scheme%NUMBER_OF_GAUSS
945 & dependent_interp_point,err,error,*999)
947 & geometric_interp_point,err,error,*999)
949 & geometric_interp_point_metrics,err,error,*999)
951 & dependent_interp_point_metrics,err,error,*999)
953 & materials_interp_point,err,error,*999)
954 IF(
ASSOCIATED(fibre_field))
THEN 956 & fibre_interp_point,err,error,*999)
959 jznu=dependent_interp_point_metrics%JACOBIAN/geometric_interp_point_metrics%JACOBIAN
960 jgw=dependent_interp_point_metrics%JACOBIAN*dependent_quadrature_scheme%GAUSS_WEIGHTS(ng)
963 DO nh=1,number_of_dimensions
964 DO ns=1,number_of_element_parameters(nh)
967 DO mh=1,number_of_dimensions
971 & dependent_interp_point_metrics%DXI_DX(ni,mh)
973 & dependent_interp_point_metrics%DXI_DX(ni,mh)*dependent_interp_point_metrics%GU(ni,mh)
975 dphidz(mh,ns,nh)=sum1
977 djdz(ns,nh)=sum2*dependent_interp_point_metrics%JACOBIAN
982 & geometric_interp_point_metrics,fibre_interp_point,dzdnu,err,error,*999)
985 & materials_interp_point,elasticity_tensor,hydro_elasticity_voigt,stress_tensor, &
986 & dzdnu,jznu,element_number,ng,err,error,*999)
989 DO nh=1,number_of_dimensions
990 DO mh=1,number_of_dimensions
992 hydro_elasticity_tensor(mh,nh)=hydro_elasticity_voigt(
tensor_to_voigt3(mh,nh))
999 DO nh=1,number_of_dimensions
1001 DO ns=1,number_of_element_parameters(nh)
1002 tempvec=matmul(jgw_sub_mat,dphidz(:,ns,nh))
1006 DO ms=ns,number_of_element_parameters(nh)
1008 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)+ &
1009 & dot_product(dphidz(:,ms,nh),tempvec)
1010 DO component_idx=1,number_of_dimensions
1011 DO component_idx2=1,number_of_dimensions
1012 tempterm=cauchy_tensor(component_idx,component_idx2)* &
1013 & dphidz(component_idx2,ms,component_idx)
1024 DO oh=1,off_diag_comp(number_of_dimensions)
1025 nh=off_diag_dep_var1(oh)
1026 mh=off_diag_dep_var2(oh)
1027 nhs=element_base_dof_index(nh)
1029 DO ns=1,number_of_element_parameters(nh)
1031 tempvec=matmul(jgw_sub_mat,dphidz(:,ns,nh))
1033 mhs=element_base_dof_index(mh)
1034 DO ms=1,number_of_element_parameters(mh)
1036 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)+ &
1037 & dot_product(dphidz(:,ms,mh),tempvec)
1038 DO component_idx=1,number_of_dimensions
1039 DO component_idx2=1,number_of_dimensions
1040 tempterm=cauchy_tensor(component_idx,component_idx2)* &
1041 & dphidz(component_idx2,ms,component_idx)
1052 IF(field_variable%COMPONENTS(pressure_component)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 1054 DO nh=1,number_of_dimensions
1055 DO ns=1,number_of_element_parameters(nh)
1056 jgw_dphins_dz=jgw*dphidz(nh,ns,nh)
1059 mhs=element_base_dof_index(pressure_component)
1060 DO ms=1,number_of_element_parameters(pressure_component)
1062 phims=quadrature_schemes(pressure_component)%PTR%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)
1063 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)+ &
1064 & jgw_dphins_dz*phims
1068 ELSEIF(field_variable%COMPONENTS(pressure_component)%INTERPOLATION_TYPE==field_element_based_interpolation)
THEN 1070 DO nh=1,number_of_dimensions
1071 DO ns=1,number_of_element_parameters(nh)
1072 jgw_dphins_dz=jgw*dphidz(nh,ns,nh)
1075 mhs=element_base_dof_index(pressure_component)+1
1076 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)+ &
1084 IF(field_variable%COMPONENTS(pressure_component)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 1086 DO mh=1,number_of_dimensions
1087 DO ms=1,number_of_element_parameters(mh)
1088 tempvec=matmul(hydro_elasticity_tensor,dphidz(:,ms,mh))
1089 jgw_dphims_dz=jgw*tempvec(mh)
1092 nhs=element_base_dof_index(pressure_component)
1093 DO ns=1,number_of_element_parameters(pressure_component)
1095 phins=quadrature_schemes(pressure_component)%PTR%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)
1096 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)+ &
1097 & jgw_dphims_dz*phins
1101 ELSEIF(field_variable%COMPONENTS(pressure_component)%INTERPOLATION_TYPE==field_element_based_interpolation)
THEN 1103 DO mh=1,number_of_dimensions
1104 DO ms=1,number_of_element_parameters(mh)
1105 tempvec=matmul(hydro_elasticity_tensor,dphidz(:,ms,mh))
1106 jgw_dphims_dz=jgw*tempvec(mh)
1109 nhs=element_base_dof_index(pressure_component)+1
1110 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs) + &
1119 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 1122 CALL field_interpolationparametersscalefactorselementget(element_number, &
1123 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR,err,error,*999)
1126 DO nh=1,number_of_dimensions
1127 DO ns=1,number_of_element_parameters(nh)
1131 DO ms=ns,number_of_element_parameters(nh)
1133 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)* &
1134 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,nh)* &
1135 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
1139 DO oh=1,off_diag_comp(number_of_dimensions)
1140 nh=off_diag_dep_var1(oh)
1141 mh=off_diag_dep_var2(oh)
1142 nhs=element_base_dof_index(nh)
1143 DO ns=1,number_of_element_parameters(nh)
1145 mhs=element_base_dof_index(mh)
1147 DO ms=1,number_of_element_parameters(mh)
1149 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)* &
1150 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)* &
1151 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
1157 IF(field_variable%COMPONENTS(pressure_component)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 1159 DO nh=1,number_of_dimensions
1160 DO ns=1,number_of_element_parameters(nh)
1163 mhs=element_base_dof_index(pressure_component)
1164 DO ms=1,number_of_element_parameters(pressure_component)
1166 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(nhs,mhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(nhs,mhs)* &
1167 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR% &
1168 & scale_factors(ms,pressure_component)* &
1169 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
1170 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)* &
1171 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR% &
1172 & scale_factors(ms,pressure_component)* &
1173 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
1177 ELSEIF(field_variable%COMPONENTS(pressure_component)%INTERPOLATION_TYPE==field_element_based_interpolation)
THEN 1179 DO nh=1,number_of_dimensions
1180 DO ns=1,number_of_element_parameters(nh)
1183 mhs=element_base_dof_index(pressure_component)+1
1184 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)* &
1185 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ns,nh)
1192 DO nhs=2,element_base_dof_index(pressure_component)
1194 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(nhs,mhs)
1200 IF(dependent_field%DECOMPOSITION%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)%BOUNDARY_ELEMENT.AND. &
1201 & total_number_of_surface_pressure_conditions>0)
THEN 1206 CALL flagerror(
"Equations set equations is not associated.",err,error,*999)
1209 CALL flagerror(
"Equations set is not associated.",err,error,*999)
1212 exits(
"FiniteElasticity_FiniteElementJacobianEvaluate")
1214 999
errors(
"FiniteElasticity_FiniteElementJacobianEvaluate",err,error)
1215 exits(
"FiniteElasticity_FiniteElementJacobianEvaluate")
1228 REAL(DP),
INTENT(INOUT) :: ELASTICITY_TENSOR(6,6)
1229 REAL(DP),
INTENT(IN) :: DZDNU(3,3)
1230 REAL(DP),
INTENT(IN) :: Jznu
1231 INTEGER(INTG),
INTENT(OUT) :: ERR
1234 INTEGER(INTG) :: i,j
1237 enters(
"FINITE_ELASTICITY_PUSH_ELASTICITY_TENSOR",err,error,*999)
1251 elasticity_tensor=matmul(matmul(t,elasticity_tensor),transpose(t))/jznu
1253 exits(
"FINITE_ELASTICITY_PUSH_ELASTICITY_TENSOR")
1255 999 errorsexits(
"FINITE_ELASTICITY_PUSH_ELASTICITY_TENSOR",err,error)
1267 REAL(DP),
INTENT(INOUT) :: STRESS_TENSOR(6)
1268 REAL(DP),
INTENT(IN) :: DZDNU(3,3)
1269 REAL(DP),
INTENT(IN) :: Jznu
1270 INTEGER(INTG),
INTENT(OUT) :: ERR
1273 INTEGER(INTG) :: i,j
1276 enters(
"FINITE_ELASTICITY_PUSH_STRESS_TENSOR",err,error,*999)
1290 stress_tensor=matmul(t,stress_tensor)/jznu
1292 exits(
"FINITE_ELASTICITY_PUSH_STRESS_TENSOR")
1294 999 errorsexits(
"FINITE_ELASTICITY_PUSH_STRESS_TENSOR",err,error)
1304 & deformationgradienttensor,growthtensor,elasticdeformationgradienttensor,jg,je,err,error,*)
1308 INTEGER(INTG),
INTENT(IN) :: numberOfDimensions
1309 INTEGER(INTG),
INTENT(IN) :: gaussPointNumber
1310 INTEGER(INTG),
INTENT(IN) :: elementNumber
1312 REAL(DP),
INTENT(IN) :: deformationGradientTensor(3,3)
1313 REAL(DP),
INTENT(OUT) :: growthTensor(3,3)
1314 REAL(DP),
INTENT(OUT) :: elasticDeformationGradientTensor(3,3)
1315 REAL(DP),
INTENT(OUT) :: Jg
1316 REAL(DP),
INTENT(OUT) :: Je
1317 INTEGER(INTG),
INTENT(OUT) :: err
1320 REAL(DP) :: growthTensorInverse(3,3),J
1322 enters(
"FiniteElasticity_GaussGrowthTensor",err,error,*999)
1324 IF(
ASSOCIATED(equationsset))
THEN 1327 elasticdeformationgradienttensor=deformationgradienttensor
1328 je=
determinant(elasticdeformationgradienttensor,err,error)
1330 CALL flagerror(
"Equations set is not associated.",err,error,*999)
1337 CALL writestringmatrix(
diagnostic_output_type,1,1,3,1,1,3,3,3,deformationgradienttensor, &
1338 &
write_string_matrix_name_and_indices,
'(" F',
'(",I1,",:)',
' :",3(X,E13.6))',
'(13X,3(X,E13.6))',err,error,*999)
1339 j=
determinant(deformationgradienttensor,err,error)
1342 CALL writestringmatrix(
diagnostic_output_type,1,1,3,1,1,3,3,3,elasticdeformationgradienttensor, &
1343 &
write_string_matrix_name_and_indices,
'(" Fe',
'(",I1,",:)',
' :",3(X,E13.6))',
'(13X,3(X,E13.6))',err,error,*999)
1346 CALL writestringmatrix(
diagnostic_output_type,1,1,3,1,1,3,3,3,growthtensor, &
1347 &
write_string_matrix_name_and_indices,
'(" Fg',
'(",I1,",:)',
' :",3(X,E13.6))',
'(13X,3(X,E13.6))',err,error,*999)
1351 exits(
"FiniteElasticity_GaussGrowthTensor")
1353 999 errorsexits(
"FiniteElasticity_GaussGrowthTensor",err,error)
1364 jacobian,greenstraintensor,err,error,*)
1367 REAL(DP),
INTENT(IN) :: deformationGradientTensor(3,3)
1368 REAL(DP) :: deformationGradientTensorT(3,3)
1369 REAL(DP),
INTENT(OUT) :: rightCauchyDeformationTensor(3,3)
1370 REAL(DP),
INTENT(OUT) :: fingerDeformationTensor(3,3)
1371 REAL(DP),
INTENT(OUT) :: Jacobian
1372 REAL(DP),
INTENT(OUT) :: greenStrainTensor(3,3)
1373 INTEGER(INTG),
INTENT(OUT) :: err
1379 enters(
"FiniteElasticity_StrainTensor",err,error,*999)
1381 CALL matrixtranspose(deformationgradienttensor, deformationgradienttensort,err,error,*999)
1382 CALL matrixproduct(deformationgradienttensort, deformationgradienttensor, rightcauchydeformationtensor,err,error,*999)
1384 CALL invert(rightcauchydeformationtensor,fingerdeformationtensor,i3,err,error,*999)
1385 jacobian=
determinant(deformationgradienttensor,err,error)
1387 greenstraintensor=0.5_dp*rightcauchydeformationtensor
1389 greenstraintensor(i,i)=greenstraintensor(i,i)-0.5_dp
1398 &
' :",3(X,E13.6))',
'(12X,3(X,E13.6))',err,error,*999)
1402 &
' :",3(X,E13.6))',
'(12X,3(X,E13.6))',err,error,*999)
1407 &
' :",3(X,E13.6))',
'(12X,3(X,E13.6))',err,error,*999)
1410 exits(
"FiniteElasticity_StrainTensor")
1412 999 errorsexits(
"FiniteElasticity_StrainTensor",err,error)
1426 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
1427 INTEGER(INTG),
INTENT(OUT) :: ERR
1430 TYPE(
basis_type),
POINTER :: DEPENDENT_BASIS,COMPONENT_BASIS
1438 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,FIBRE_FIELD,GEOMETRIC_FIELD,MATERIALS_FIELD,EQUATIONS_SET_FIELD,SOURCE_FIELD
1439 TYPE(
field_type),
POINTER :: INDEPENDENT_FIELD
1443 & FIBRE_INTERPOLATION_PARAMETERS,MATERIALS_INTERPOLATION_PARAMETERS,DEPENDENT_INTERPOLATION_PARAMETERS, &
1444 & DARCY_DEPENDENT_INTERPOLATION_PARAMETERS,SOURCE_INTERPOLATION_PARAMETERS,DARCY_MATERIALS_INTERPOLATION_PARAMETERS, &
1445 & DENSITY_INTERPOLATION_PARAMETERS,INDEPENDENT_INTERPOLATION_PARAMETERS
1447 & MATERIALS_INTERPOLATED_POINT,DEPENDENT_INTERPOLATED_POINT,DARCY_DEPENDENT_INTERPOLATED_POINT,SOURCE_INTERPOLATED_POINT, &
1448 & DENSITY_INTERPOLATED_POINT,INDEPENDENT_INTERPOLATED_POINT,DARCY_MATERIALS_INTERPOLATED_POINT
1450 & DEPENDENT_INTERPOLATED_POINT_METRICS
1451 TYPE(
basis_type),
POINTER :: DEPENDENT_BASIS_1,GEOMETRIC_BASIS
1455 LOGICAL :: DARCY_DENSITY,DARCY_DEPENDENT
1456 INTEGER(INTG) :: component_idx,component_idx2,parameter_idx,gauss_idx,element_dof_idx,FIELD_VAR_TYPE,DARCY_FIELD_VAR_TYPE
1457 INTEGER(INTG) :: imatrix,Ncompartments
1458 INTEGER(INTG) :: i,j,numberOfXDimensions,numberOfXiDimensions
1459 INTEGER(INTG) :: NDOFS,mh,ms,mhs,mi,nh,ns
1460 INTEGER(INTG) :: DEPENDENT_NUMBER_OF_COMPONENTS
1461 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS,NUMBER_OF_XI,HYDROSTATIC_PRESSURE_COMPONENT
1462 INTEGER(INTG) :: NUMBER_OF_FIELD_COMPONENT_INTERPOLATION_PARAMETERS
1463 INTEGER(INTG) :: DEPENDENT_COMPONENT_INTERPOLATION_TYPE
1464 INTEGER(INTG) :: DEPENDENT_NUMBER_OF_GAUSS_POINTS
1465 INTEGER(INTG) :: MESH_COMPONENT_1,MESH_COMPONENT_NUMBER
1466 INTEGER(INTG) :: TOTAL_NUMBER_OF_SURFACE_PRESSURE_CONDITIONS
1467 INTEGER(INTG) :: var1
1468 INTEGER(INTG) :: var2
1469 INTEGER(INTG),
POINTER :: EQUATIONS_SET_FIELD_DATA(:)
1470 REAL(DP) :: DZDNU(3,3),DZDNUT(3,3),AZL(3,3),AZU(3,3),Fe(3,3),FeT(3,3),Fg(3,3),C(3,3),f(3,3),E(3,3),I3,P, &
1471 & piolaTensor(3,3),TEMP(3,3)
1472 REAL(DP) :: cauchyTensor(3,3),JGW_CAUCHY_TENSOR(3,3),kirchoffTensor(3,3),STRESS_TENSOR(6)
1473 REAL(DP) :: deformationGradientTensor(3,3),growthTensor(3,3),growthTensorInverse(3,3),growthTensorInverseTranspose(3,3), &
1474 & fibreGrowth,sheetGrowth,normalGrowth,fibreVector(3),sheetVector(3),normalVector(3)
1475 REAL(DP) :: dNudXi(3,3),dXidNu(3,3)
1476 REAL(DP) :: DFDZ(64,3,3)
1477 REAL(DP) :: DPHIDZ(3,64,3)
1478 REAL(DP) :: GAUSS_WEIGHT,Jznu,Jxxi,Jzxi,Je,Jg,JGW
1479 REAL(DP) :: SUM1,TEMPTERM1
1480 REAL(DP) :: THICKNESS
1481 REAL(DP) :: DARCY_MASS_INCREASE,DARCY_VOL_INCREASE,DARCY_RHO_0_F,DENSITY
1482 REAL(DP) :: Mfact, bfact, p0fact
1483 INTEGER(INTG) :: EQUATIONS_SET_SUBTYPE
1485 enters(
"FiniteElasticity_FiniteElementResidualEvaluate",err,error,*999)
1487 NULLIFY(boundary_conditions,boundary_conditions_variable)
1488 NULLIFY(dependent_basis,component_basis)
1489 NULLIFY(equations,equations_mapping,equations_matrices,nonlinear_matrices,rhs_vector)
1490 NULLIFY(dependent_field,fibre_field,geometric_field,materials_field,source_field,independent_field)
1491 NULLIFY(field_variable)
1492 NULLIFY(dependent_quadrature_scheme,component_quadrature_scheme)
1494 NULLIFY(materials_interpolation_parameters,dependent_interpolation_parameters)
1495 NULLIFY(independent_interpolation_parameters,darcy_materials_interpolation_parameters)
1496 NULLIFY(darcy_dependent_interpolation_parameters,density_interpolation_parameters)
1498 NULLIFY(geometric_interpolated_point_metrics,dependent_interpolated_point_metrics)
1499 NULLIFY(materials_interpolated_point,dependent_interpolated_point,darcy_dependent_interpolated_point)
1500 NULLIFY(density_interpolated_point,independent_interpolated_point)
1501 NULLIFY(dependent_basis_1)
1502 NULLIFY(decomposition)
1503 NULLIFY(equations_set_field_data)
1505 IF(
ASSOCIATED(equations_set))
THEN 1506 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 1507 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
1508 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 1509 CALL flagerror(
"Equations set specification must have three entries for a finite elasticity type equations set.", &
1512 equations_set_subtype = equations_set%SPECIFICATION(3)
1513 equations=>equations_set%EQUATIONS
1514 IF(
ASSOCIATED(equations))
THEN 1517 var1=equations%EQUATIONS_MAPPING%NONLINEAR_MAPPING%RESIDUAL_VARIABLES(1)%PTR%VARIABLE_NUMBER
1518 var2=equations%EQUATIONS_MAPPING%RHS_MAPPING%RHS_VARIABLE%VARIABLE_NUMBER
1523 boundary_conditions=>equations_set%BOUNDARY_CONDITIONS
1525 & rhs_variable,boundary_conditions_variable,err,error,*999)
1529 equations_matrices=>equations%EQUATIONS_MATRICES
1530 nonlinear_matrices=>equations_matrices%NONLINEAR_MATRICES
1531 rhs_vector=>equations_matrices%RHS_VECTOR
1532 equations_mapping =>equations%EQUATIONS_MAPPING
1534 fibre_field =>equations%INTERPOLATION%FIBRE_FIELD
1535 geometric_field =>equations%INTERPOLATION%GEOMETRIC_FIELD
1536 materials_field =>equations%INTERPOLATION%MATERIALS_FIELD
1537 dependent_field =>equations%INTERPOLATION%DEPENDENT_FIELD
1538 source_field =>equations%INTERPOLATION%SOURCE_FIELD
1539 independent_field=>equations%INTERPOLATION%INDEPENDENT_FIELD
1541 decomposition =>dependent_field%DECOMPOSITION
1542 mesh_component_number = decomposition%MESH_COMPONENT_NUMBER
1544 domain_element_mapping=>decomposition%DOMAIN(1)%PTR%MAPPINGS%ELEMENTS
1546 dependent_basis=>decomposition%DOMAIN(mesh_component_number)%PTR%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)%BASIS
1548 dependent_number_of_gauss_points=dependent_quadrature_scheme%NUMBER_OF_GAUSS
1549 dependent_number_of_components=dependent_field%VARIABLES(var1)%NUMBER_OF_COMPONENTS
1550 geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%PTR% &
1551 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1553 number_of_dimensions=equations_set%REGION%COORDINATE_SYSTEM%NUMBER_OF_DIMENSIONS
1554 number_of_xi=decomposition%DOMAIN(mesh_component_number)%PTR%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)%BASIS%NUMBER_OF_XI
1567 darcy_density=.true.
1569 darcy_density=.false.
1578 darcy_dependent=.true.
1580 darcy_dependent=.false.
1584 field_variable=>equations_set%EQUATIONS%EQUATIONS_MAPPING%NONLINEAR_MAPPING%RESIDUAL_VARIABLES(1)%PTR
1585 field_var_type=field_variable%VARIABLE_TYPE
1586 dependent_interpolation_parameters=>equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR
1587 geometric_interpolation_parameters=>equations%INTERPOLATION%GEOMETRIC_INTERP_PARAMETERS(field_u_variable_type)%PTR
1588 IF(
ASSOCIATED(fibre_field))
THEN 1589 fibre_interpolation_parameters=>equations%INTERPOLATION%FIBRE_INTERP_PARAMETERS(field_u_variable_type)%PTR
1591 IF(
ASSOCIATED(materials_field))
THEN 1592 materials_interpolation_parameters=>equations%INTERPOLATION%MATERIALS_INTERP_PARAMETERS(field_u_variable_type)%PTR
1595 IF(darcy_dependent)
THEN 1596 darcy_dependent_interpolation_parameters=>equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_v_variable_type)%PTR
1598 independent_interpolation_parameters=>equations%INTERPOLATION%INDEPENDENT_INTERP_PARAMETERS(field_u_variable_type)%PTR
1604 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
1605 & geometric_interpolation_parameters,err,error,*999)
1606 IF(
ASSOCIATED(fibre_field))
THEN 1607 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
1608 & fibre_interpolation_parameters,err,error,*999)
1610 IF(
ASSOCIATED(materials_field))
THEN 1611 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
1612 & materials_interpolation_parameters,err,error,*999)
1618 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
1619 & dependent_interpolation_parameters,err,error,*999)
1620 IF(darcy_dependent)
THEN 1621 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
1622 & darcy_dependent_interpolation_parameters,err,error,*999)
1624 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
1625 & independent_interpolation_parameters,err,error,*999)
1633 geometric_interpolated_point=>equations%INTERPOLATION%GEOMETRIC_INTERP_POINT(field_u_variable_type)%PTR
1634 geometric_interpolated_point_metrics=>equations%INTERPOLATION%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%PTR
1635 IF(
ASSOCIATED(fibre_field))
THEN 1636 fibre_interpolated_point=>equations%INTERPOLATION%FIBRE_INTERP_POINT(field_u_variable_type)%PTR
1638 IF(
ASSOCIATED(materials_field))
THEN 1639 materials_interpolated_point=>equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR
1640 density_interpolated_point=>equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_v_variable_type)%PTR
1642 dependent_interpolated_point=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT(field_var_type)%PTR
1643 dependent_interpolated_point_metrics=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT_METRICS(field_var_type)%PTR
1644 IF(darcy_dependent)
THEN 1645 darcy_dependent_interpolated_point=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT(field_v_variable_type)%PTR
1647 independent_interpolated_point=>equations%INTERPOLATION%INDEPENDENT_INTERP_POINT(field_u_variable_type)%PTR
1649 IF(
ASSOCIATED(source_field))
THEN 1654 SELECT CASE(equations_set_subtype)
1660 DO gauss_idx=1,dependent_number_of_gauss_points
1663 & dependent_interpolated_point,err,error,*999)
1664 CALL field_interpolated_point_metrics_calculate(dependent_basis%NUMBER_OF_XI,dependent_interpolated_point_metrics, &
1667 & geometric_interpolated_point,err,error,*999)
1668 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,geometric_interpolated_point_metrics, &
1670 IF(
ASSOCIATED(fibre_field))
THEN 1672 & fibre_interpolated_point,err,error,*999)
1675 & materials_interpolated_point,err,error,*999)
1678 DO nh=1,number_of_dimensions
1679 mesh_component_number=field_variable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
1680 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
1681 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1683 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1685 DO mh=1,number_of_dimensions
1687 DO mi=1,number_of_xi
1688 sum1=sum1+dependent_interpolated_point_metrics%DXI_DX(mi,mh)* &
1691 dphidz(mh,ns,nh)=sum1
1697 & geometric_interpolated_point_metrics,fibre_interpolated_point,dzdnu,err,error,*999)
1699 jznu=dependent_interpolated_point_metrics%JACOBIAN/geometric_interpolated_point_metrics%JACOBIAN
1700 jgw=dependent_interpolated_point_metrics%JACOBIAN*dependent_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
1704 & materials_interpolated_point,stress_tensor,dzdnu,jznu,element_number,gauss_idx,err,error,*999)
1707 DO nh=1,number_of_dimensions
1708 DO mh=1,number_of_dimensions
1715 DO mh=1,number_of_dimensions
1716 mesh_component_number=field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1717 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
1718 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1719 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1721 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)+ &
1722 & dot_product(dphidz(:,ms,mh),jgw_cauchy_tensor(:,mh))
1726 jgw=geometric_interpolated_point_metrics%JACOBIAN*dependent_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
1729 mesh_component_number=field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1730 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
1731 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1733 tempterm1=jgw*(jznu-1.0_dp)
1734 IF(field_variable%COMPONENTS(mh)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 1735 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1737 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)+ &
1738 & tempterm1*component_quadrature_scheme%GAUSS_BASIS_FNS(ms,
no_part_deriv,gauss_idx)
1740 ELSEIF(field_variable%COMPONENTS(mh)%INTERPOLATION_TYPE==field_element_based_interpolation)
THEN 1742 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)+tempterm1
1775 IF(decomposition%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)%BOUNDARY_ELEMENT.AND. &
1776 & total_number_of_surface_pressure_conditions>0)
THEN 1781 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 1784 CALL field_interpolationparametersscalefactorselementget(element_number, &
1785 & dependent_interpolation_parameters,err,error,*999)
1787 DO mh=1,number_of_dimensions
1788 mesh_component_number=field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1789 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
1790 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1792 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1794 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)* &
1795 & dependent_interpolation_parameters%SCALE_FACTORS(ms,mh)
1798 IF(field_variable%COMPONENTS(mh)%INTERPOLATION_TYPE==field_node_based_interpolation)
THEN 1799 mesh_component_number=field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1800 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
1801 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1802 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1804 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)* &
1805 & dependent_interpolation_parameters%SCALE_FACTORS(ms,mh)
1829 DO gauss_idx=1,dependent_number_of_gauss_points
1830 gauss_weight=dependent_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
1833 & dependent_interpolated_point,err,error,*999)
1834 CALL field_interpolated_point_metrics_calculate(dependent_basis%NUMBER_OF_XI,dependent_interpolated_point_metrics, &
1837 & geometric_interpolated_point,err,error,*999)
1838 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,geometric_interpolated_point_metrics, &
1840 IF(
ASSOCIATED(fibre_field))
THEN 1842 & fibre_interpolated_point,err,error,*999)
1845 & materials_interpolated_point,err,error,*999)
1846 IF(darcy_dependent)
THEN 1848 & darcy_dependent_interpolated_point,err,error,*999)
1851 & independent_interpolated_point,err,error,*999)
1856 & geometric_interpolated_point_metrics,fibre_interpolated_point,dzdnu,err,error,*999)
1858 IF(jznu<0.0_dp)
THEN 1859 local_error =
"Warning: Volume is negative for gauss point "//
trim(
number_to_vstring(gauss_idx,
"*",err,error))//&
1866 jzxi=dependent_interpolated_point_metrics%JACOBIAN
1867 jxxi=geometric_interpolated_point_metrics%JACOBIAN
1876 & dzdnu,fg,fe,jg,je,err,error,*999)
1883 & materials_interpolated_point,darcy_dependent_interpolated_point, &
1884 & independent_interpolated_point,cauchytensor,jznu,dzdnu,element_number,gauss_idx,err,error,*999)
1892 & 3,3,piolatensor,
write_string_matrix_name_and_indices,
'(" T',
'(",I1,",:)',
' :",3(X,E13.6))', &
1893 &
'(12X,3(X,E13.6))',err,error,*999)
1896 & 3,3,cauchytensor,
write_string_matrix_name_and_indices,
'(" sigma',
'(",I1,",:)',
' :",3(X,E13.6))', &
1897 &
'(12X,3(X,E13.6))',err,error,*999)
1903 darcy_mass_increase = darcy_dependent_interpolated_point%VALUES(4,
no_part_deriv)
1904 darcy_vol_increase = darcy_mass_increase / darcy_rho_0_f
1910 IF(number_of_dimensions == 3)
THEN 1911 thickness = materials_interpolated_point%VALUES(materials_interpolated_point%INTERPOLATION_PARAMETERS% &
1912 & field_variable%NUMBER_OF_COMPONENTS,1)
1917 jgw=jzxi*dependent_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
1920 DO nh=1,number_of_dimensions
1921 mesh_component_number=field_variable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
1922 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%ptr% &
1923 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1925 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1927 DO mh=1,number_of_dimensions
1929 DO mi=1,number_of_xi
1930 sum1=sum1+dependent_interpolated_point_metrics%DXI_DX(mi,mh)* &
1933 dphidz(mh,ns,nh)=sum1
1940 DO mh=1,number_of_dimensions
1941 mesh_component_number=field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
1942 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%ptr% &
1943 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1944 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
1946 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)+ &
1947 & jgw*dot_product(dphidz(1:number_of_dimensions,ms,mh),cauchytensor(1:number_of_dimensions,mh))
1953 hydrostatic_pressure_component=dependent_field%VARIABLES(var1)%NUMBER_OF_COMPONENTS
1954 dependent_component_interpolation_type=dependent_field%VARIABLES(var1)%COMPONENTS(hydrostatic_pressure_component)% &
1955 & interpolation_type
1957 tempterm1=gauss_weight*(jzxi-(jg-darcy_vol_increase)*jxxi)
1959 tempterm1=gauss_weight*(jzxi/jxxi - 1.0_dp)*jxxi
1961 IF(dependent_component_interpolation_type==field_node_based_interpolation)
THEN 1962 component_basis=>dependent_field%VARIABLES(var1)%COMPONENTS(hydrostatic_pressure_component)%DOMAIN% &
1963 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
1965 number_of_field_component_interpolation_parameters=component_basis%NUMBER_OF_ELEMENT_PARAMETERS
1966 DO parameter_idx=1,number_of_field_component_interpolation_parameters
1968 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)+ &
1969 & component_quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,1,gauss_idx)*tempterm1
1971 ELSEIF(dependent_component_interpolation_type==field_element_based_interpolation)
THEN 1973 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)+ tempterm1
1979 IF(decomposition%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)%BOUNDARY_ELEMENT.AND. &
1980 & total_number_of_surface_pressure_conditions>0)
THEN 1989 DO gauss_idx=1,dependent_number_of_gauss_points
1996 gauss_weight=dependent_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
1999 & dependent_interpolated_point,err,error,*999)
2000 CALL field_interpolatedpointmetricscalculate(dependent_basis%NUMBER_OF_XI,dependent_interpolated_point_metrics, &
2003 & geometric_interpolated_point,err,error,*999)
2004 CALL field_interpolatedpointmetricscalculate(geometric_basis%NUMBER_OF_XI,geometric_interpolated_point_metrics, &
2006 IF(
ASSOCIATED(fibre_field))
THEN 2008 & fibre_interpolated_point,err,error,*999)
2013 & geometric_interpolated_point_metrics,fibre_interpolated_point,dzdnu,err,error,*999)
2015 jxxi=geometric_interpolated_point_metrics%JACOBIAN
2017 jzxi=dependent_interpolated_point_metrics%JACOBIAN
2019 hydrostatic_pressure_component=dependent_interpolated_point%INTERPOLATION_PARAMETERS%FIELD_VARIABLE% &
2020 & number_of_components
2021 p=dependent_interpolated_point%VALUES(hydrostatic_pressure_component,1)
2024 & dzdnu,fg,fe,jg,je,err,error,*999)
2029 IF(number_of_dimensions==3)
THEN 2030 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2031 & gauss_idx,element_number,1,piolatensor(1,1),err,error,*999)
2032 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2033 & gauss_idx,element_number,2,piolatensor(1,2),err,error,*999)
2034 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2035 & gauss_idx,element_number,3,piolatensor(1,3),err,error,*999)
2036 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2037 & gauss_idx,element_number,4,piolatensor(2,2),err,error,*999)
2038 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2039 & gauss_idx,element_number,5,piolatensor(2,3),err,error,*999)
2040 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2041 & gauss_idx,element_number,6,piolatensor(3,3),err,error,*999)
2043 piolatensor(1,1)=piolatensor(1,1)+p*f(1,1)
2044 piolatensor(2,2)=piolatensor(2,2)+p*f(2,2)
2045 piolatensor(3,3)=piolatensor(3,3)+p*f(3,3)
2046 piolatensor(1,2)=piolatensor(1,2)+p*f(1,2)
2047 piolatensor(1,3)=piolatensor(1,3)+p*f(1,3)
2048 piolatensor(2,3)=piolatensor(2,3)+p*f(2,3)
2049 piolatensor(2,1)=piolatensor(1,2)
2050 piolatensor(3,1)=piolatensor(1,3)
2051 piolatensor(3,2)=piolatensor(2,3)
2052 ELSE IF(number_of_dimensions==2)
THEN 2053 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2054 & gauss_idx,element_number,1,piolatensor(1,1),err,error,*999)
2055 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2056 & gauss_idx,element_number,2,piolatensor(1,2),err,error,*999)
2057 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2058 & gauss_idx,element_number,3,piolatensor(2,2),err,error,*999)
2060 piolatensor(1,1)=piolatensor(1,1)+p*f(1,1)
2061 piolatensor(2,2)=piolatensor(2,2)+p*f(2,2)
2062 piolatensor(1,2)=piolatensor(1,2)+p*f(1,2)
2063 piolatensor(2,1)=piolatensor(1,2)
2065 CALL field_parametersetgetlocalgausspoint(dependent_field,field_u2_variable_type,field_values_set_type, &
2066 & gauss_idx,element_number,1,piolatensor(1,1),err,error,*999)
2067 piolatensor(1,1)=piolatensor(1,1)+p*f(1,1)
2075 cauchytensor=kirchofftensor/je
2083 & 3,3,piolatensor,
write_string_matrix_name_and_indices,
'(" T',
'(",I1,",:)',
' :",3(X,E13.6))', &
2084 &
'(12X,3(X,E13.6))',err,error,*999)
2087 & 3,3,cauchytensor,
write_string_matrix_name_and_indices,
'(" sigma',
'(",I1,",:)',
' :",3(X,E13.6))', &
2088 &
'(12X,3(X,E13.6))',err,error,*999)
2099 IF(number_of_dimensions == 3)
THEN 2100 IF(
ASSOCIATED(materials_field))
THEN 2102 & materials_interpolated_point,err,error,*999)
2103 thickness = materials_interpolated_point%VALUES(materials_interpolated_point%INTERPOLATION_PARAMETERS% &
2104 & field_variable%NUMBER_OF_COMPONENTS,1)
2133 DO nh=1,number_of_dimensions
2134 mesh_component_number=field_variable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
2135 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
2136 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2138 DO ns=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2140 DO mh=1,number_of_dimensions
2142 DO mi=1,number_of_xi
2143 sum1=sum1+dependent_interpolated_point_metrics%DXI_DX(mi,mh)* &
2146 dphidz(mh,ns,nh)=sum1
2150 jgw=jzxi*dependent_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
2153 DO mh=1,number_of_dimensions
2154 mesh_component_number=field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
2155 dependent_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
2156 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2157 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2159 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)+ &
2160 & jgw*dot_product(dphidz(:,ms,mh),cauchytensor(:,mh))
2166 hydrostatic_pressure_component=dependent_field%VARIABLES(var1)%NUMBER_OF_COMPONENTS
2167 dependent_component_interpolation_type=dependent_field%VARIABLES(var1)%COMPONENTS(hydrostatic_pressure_component)% &
2168 & interpolation_type
2170 tempterm1=gauss_weight*(jzxi-(jg-darcy_vol_increase)*jxxi)
2172 tempterm1=gauss_weight*(jzxi-jg*jxxi)
2174 IF(dependent_component_interpolation_type==field_node_based_interpolation)
THEN 2175 component_basis=>dependent_field%VARIABLES(var1)%COMPONENTS(hydrostatic_pressure_component)%DOMAIN% &
2176 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2178 number_of_field_component_interpolation_parameters=component_basis%NUMBER_OF_ELEMENT_PARAMETERS
2179 DO parameter_idx=1,number_of_field_component_interpolation_parameters
2180 element_dof_idx=element_dof_idx+1
2182 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)= &
2183 & nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)+ &
2184 & gauss_weight*jzxi*component_quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,1,gauss_idx)* &
2185 & (je-1.0_dp-darcy_vol_increase)
2187 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)= &
2188 & nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)+ &
2189 & gauss_weight*jzxi*component_quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,1,gauss_idx)* &
2193 ELSEIF(dependent_component_interpolation_type==field_element_based_interpolation)
THEN 2195 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)= &
2196 & nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)+tempterm1
2202 IF(decomposition%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)%BOUNDARY_ELEMENT.AND. &
2203 & total_number_of_surface_pressure_conditions>0)
THEN 2212 equations_set_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
2213 CALL field_parameter_set_data_get(equations_set_field,field_u_variable_type, &
2214 & field_values_set_type,equations_set_field_data,err,error,*999)
2216 ncompartments = equations_set_field_data(2)
2218 DO gauss_idx=1,dependent_number_of_gauss_points
2219 gauss_weight=dependent_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
2222 & dependent_interpolated_point,err,error,*999)
2223 CALL field_interpolated_point_metrics_calculate(dependent_basis%NUMBER_OF_XI,dependent_interpolated_point_metrics, &
2226 & geometric_interpolated_point,err,error,*999)
2227 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,geometric_interpolated_point_metrics, &
2229 IF(
ASSOCIATED(fibre_field))
THEN 2231 & fibre_interpolated_point,err,error,*999)
2234 & materials_interpolated_point,err,error,*999)
2242 & 3,3,piolatensor,
write_string_matrix_name_and_indices,
'(" Piola Tensor',
'(",I1,",:)',
' :",3(X,E13.6))', &
2243 &
'(17X,3(X,E13.6))',err,error,*999)
2246 & 3,3,cauchytensor,
write_string_matrix_name_and_indices,
'(" Cauchy Tensor',
'(",I1,",:)',
' :",3(X,E13.6))', &
2247 &
'(17X,3(X,E13.6))',err,error,*999)
2253 darcy_mass_increase = 0.0_dp
2254 DO imatrix=1,ncompartments
2255 darcy_field_var_type=field_v_variable_type+field_number_of_variable_subtypes*(imatrix-1)
2256 darcy_dependent_interpolation_parameters=>&
2257 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(darcy_field_var_type)%PTR
2259 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
2260 & darcy_dependent_interpolation_parameters,err,error,*999)
2262 darcy_dependent_interpolated_point=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT(darcy_field_var_type)%PTR
2264 & darcy_dependent_interpolated_point,err,error,*999)
2266 darcy_mass_increase = darcy_mass_increase + darcy_dependent_interpolated_point%VALUES(4,
no_part_deriv)
2269 darcy_vol_increase = darcy_mass_increase / darcy_rho_0_f
2273 & geometric_interpolated_point_metrics,fibre_interpolated_point,dzdnu,err,error,*999)
2275 jxxi=geometric_interpolated_point_metrics%JACOBIAN
2279 & materials_interpolated_point,darcy_dependent_interpolated_point, &
2280 & independent_interpolated_point,cauchytensor,jznu,dzdnu,element_number,gauss_idx,err,error,*999)
2284 & number_of_xi,dfdz,err,error,*999)
2289 IF(number_of_dimensions == 3)
THEN 2290 thickness = materials_interpolated_point%VALUES(materials_interpolated_point%INTERPOLATION_PARAMETERS% &
2291 & field_variable%NUMBER_OF_COMPONENTS,1)
2297 DO component_idx=1,number_of_dimensions
2298 dependent_component_interpolation_type=dependent_field%VARIABLES(var1)%COMPONENTS(component_idx)%INTERPOLATION_TYPE
2299 IF(dependent_component_interpolation_type==field_node_based_interpolation)
THEN 2300 dependent_basis=>dependent_field%VARIABLES(var1)%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY% &
2301 & elements%ELEMENTS(element_number)%BASIS
2302 number_of_field_component_interpolation_parameters=dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2303 DO parameter_idx=1,number_of_field_component_interpolation_parameters
2304 element_dof_idx=element_dof_idx+1
2305 DO component_idx2=1,number_of_dimensions
2306 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)= &
2307 & nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)+ &
2308 & gauss_weight*jxxi*jznu*thickness*cauchytensor(component_idx,component_idx2)* &
2309 & dfdz(parameter_idx,component_idx2,component_idx)
2312 ELSEIF(dependent_component_interpolation_type==field_element_based_interpolation)
THEN 2314 CALL flagerror(
"Finite elasticity with element based interpolation is not implemented.",err,error,*999)
2320 hydrostatic_pressure_component=dependent_field%VARIABLES(var1)%NUMBER_OF_COMPONENTS
2321 dependent_component_interpolation_type=dependent_field%VARIABLES(var1)%COMPONENTS(component_idx)%INTERPOLATION_TYPE
2322 IF(dependent_component_interpolation_type==field_node_based_interpolation)
THEN 2323 component_basis=>dependent_field%VARIABLES(var1)%COMPONENTS(hydrostatic_pressure_component)%DOMAIN% &
2324 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2326 number_of_field_component_interpolation_parameters=component_basis%NUMBER_OF_ELEMENT_PARAMETERS
2327 DO parameter_idx=1,number_of_field_component_interpolation_parameters
2328 element_dof_idx=element_dof_idx+1
2329 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)= &
2330 & nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)+ &
2331 & gauss_weight*jxxi*component_quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,1,gauss_idx)* &
2332 & (jznu-1.0_dp-darcy_vol_increase)
2334 ELSEIF(dependent_component_interpolation_type==field_element_based_interpolation)
THEN 2335 element_dof_idx=element_dof_idx+1
2336 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)= &
2337 & nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)+gauss_weight*jxxi* &
2338 & (jznu-1.0_dp-darcy_vol_increase)
2344 IF(decomposition%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)%BOUNDARY_ELEMENT.AND. &
2345 & total_number_of_surface_pressure_conditions>0)
THEN 2359 DO gauss_idx=1,dependent_number_of_gauss_points
2360 gauss_weight=dependent_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
2364 & dependent_interpolated_point,err,error,*999)
2365 CALL field_interpolated_point_metrics_calculate(dependent_basis%NUMBER_OF_XI,dependent_interpolated_point_metrics, &
2368 & geometric_interpolated_point,err,error,*999)
2369 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI,geometric_interpolated_point_metrics, &
2371 IF(
ASSOCIATED(fibre_field))
THEN 2373 & fibre_interpolated_point,err,error,*999)
2376 & materials_interpolated_point,err,error,*999)
2377 IF(darcy_dependent)
THEN 2379 & darcy_dependent_interpolated_point,err,error,*999)
2384 & geometric_interpolated_point_metrics,fibre_interpolated_point,dzdnu,err,error,*999)
2386 jxxi=geometric_interpolated_point_metrics%JACOBIAN
2390 & materials_interpolated_point,darcy_dependent_interpolated_point, &
2391 & independent_interpolated_point,cauchytensor,jznu,dzdnu,element_number,gauss_idx,err,error,*999)
2395 & number_of_xi,dfdz,err,error,*999)
2399 DO component_idx=1,dependent_number_of_components
2400 dependent_component_interpolation_type=dependent_field%VARIABLES(var1)%COMPONENTS(component_idx)%INTERPOLATION_TYPE
2401 IF(dependent_component_interpolation_type==field_node_based_interpolation)
THEN 2402 dependent_basis=>dependent_field%VARIABLES(var1)%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY% &
2403 & elements%ELEMENTS(element_number)%BASIS
2404 number_of_field_component_interpolation_parameters=dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2405 DO parameter_idx=1,number_of_field_component_interpolation_parameters
2406 element_dof_idx=element_dof_idx+1
2407 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)= &
2408 & nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)+ &
2409 & gauss_weight*jxxi*jznu*(cauchytensor(component_idx,1)*dfdz(parameter_idx,1,component_idx)+ &
2410 & cauchytensor(component_idx,2)*dfdz(parameter_idx,2,component_idx)+ &
2411 & cauchytensor(component_idx,3)*dfdz(parameter_idx,3,component_idx))
2413 ELSEIF(dependent_component_interpolation_type==field_element_based_interpolation)
THEN 2415 CALL flagerror(
"Finite elasticity with element based interpolation is not implemented.",err,error,*999)
2421 IF(decomposition%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)%BOUNDARY_ELEMENT.AND. &
2422 & total_number_of_surface_pressure_conditions>0)
THEN 2426 IF(
ASSOCIATED(rhs_vector))
THEN 2427 IF(
ASSOCIATED(source_field))
THEN 2428 IF(
ASSOCIATED(materials_field%VARIABLE_TYPE_MAP(field_v_variable_type)%PTR))
THEN 2429 density_interpolation_parameters=>equations%INTERPOLATION%MATERIALS_INTERP_PARAMETERS(field_v_variable_type)%PTR
2430 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
2431 & density_interpolation_parameters,err,error,*999)
2432 density_interpolated_point=>equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_v_variable_type)%PTR
2433 IF(darcy_density)
THEN 2434 darcy_materials_interpolation_parameters=>equations%INTERPOLATION%MATERIALS_INTERP_PARAMETERS( &
2435 & field_u1_variable_type)%PTR
2436 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
2437 & darcy_materials_interpolation_parameters,err,error,*999)
2438 darcy_materials_interpolated_point=>equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u1_variable_type)%PTR
2440 IF(rhs_vector%UPDATE_VECTOR)
THEN 2442 CALL field_interpolation_parameters_element_get(field_values_set_type,element_number, &
2446 DO gauss_idx=1,dependent_number_of_gauss_points
2447 gauss_weight=dependent_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)
2451 & geometric_interp_point(field_u_variable_type)%PTR,err,error,*999)
2453 & density_interpolated_point,err,error,*999)
2454 IF(darcy_density)
THEN 2456 & darcy_materials_interpolated_point,err,error,*999)
2463 density=density_interpolated_point%VALUES(1,1)*(1.0_dp-darcy_materials_interpolated_point%VALUES(8,1)) + &
2464 & darcy_materials_interpolated_point%VALUES(7,1)*(jznu-1.0_dp+darcy_materials_interpolated_point%VALUES(8,1))
2466 density=density_interpolated_point%VALUES(1,1)
2468 CALL field_interpolated_point_metrics_calculate(dependent_basis%NUMBER_OF_XI,equations%INTERPOLATION% &
2469 & dependent_interp_point_metrics(field_u_variable_type)%PTR,err,error,*999)
2471 DO component_idx=1,number_of_dimensions
2472 dependent_basis=>dependent_field%VARIABLES(var1)%COMPONENTS(component_idx)%DOMAIN%TOPOLOGY% &
2473 & elements%ELEMENTS(element_number)%BASIS
2474 DO parameter_idx=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2475 element_dof_idx=element_dof_idx+1
2476 rhs_vector%ELEMENT_VECTOR%VECTOR(element_dof_idx)=rhs_vector%ELEMENT_VECTOR%VECTOR(element_dof_idx) + &
2478 & dependent_quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,
no_part_deriv,gauss_idx)*gauss_weight * &
2479 & equations%INTERPOLATION%DEPENDENT_INTERP_POINT_METRICS(field_u_variable_type)%PTR%JACOBIAN
2487 CALL flagerror(
"RHS vector is not associated.",err,error,*999)
2491 IF(dependent_field%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 2492 CALL field_interpolationparametersscalefactorselementget(element_number,equations%INTERPOLATION% &
2493 & dependent_interp_parameters(field_var_type)%PTR,err,error,*999)
2495 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2497 dependent_component_interpolation_type=dependent_field%VARIABLES(field_var_type)%COMPONENTS(mh)%INTERPOLATION_TYPE
2498 IF(dependent_component_interpolation_type==field_node_based_interpolation)
THEN 2499 dependent_basis=>dependent_field%VARIABLES(field_var_type)%COMPONENTS(mh)%DOMAIN%TOPOLOGY% &
2500 & elements%ELEMENTS(element_number)%BASIS
2501 DO ms=1,dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
2503 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)=nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(mhs)* &
2504 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
2505 IF(
ASSOCIATED(rhs_vector))
THEN 2506 IF(
ASSOCIATED(source_field))
THEN 2507 IF(rhs_vector%UPDATE_VECTOR) rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)=rhs_vector%ELEMENT_VECTOR%VECTOR(mhs)* &
2508 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR%SCALE_FACTORS(ms,mh)
2517 CALL flagerror(
"Equations set equations is not associated.",err,error,*999)
2520 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2525 IF(element_number == 1)
THEN 2527 field_variable=>dependent_field%VARIABLES(var1)
2528 DO mh=1,field_variable%NUMBER_OF_COMPONENTS
2529 SELECT CASE(field_variable%COMPONENTS(mh)%INTERPOLATION_TYPE)
2530 CASE(field_node_based_interpolation)
2531 mesh_component_1 = field_variable%COMPONENTS(mh)%MESH_COMPONENT_NUMBER
2532 dependent_basis_1 => dependent_field%DECOMPOSITION%DOMAIN(mesh_component_1)%ptr% &
2533 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
2534 ndofs = ndofs + dependent_basis_1%NUMBER_OF_ELEMENT_PARAMETERS
2536 CASE(field_element_based_interpolation)
2542 &
" is not valid for a finite elasticity equation.",err,error,*999)
2548 & element_number,err,error,*999)
2550 & nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(:), &
2551 &
'(4(X,E13.6))',
'4(4(X,E13.6))',err,error,*999)
2555 exits(
"FiniteElasticity_FiniteElementResidualEvaluate")
2557 999
errors(
"FiniteElasticity_FiniteElementResidualEvaluate",err,error)
2558 exits(
"FiniteElasticity_FiniteElementResidualEvaluate")
2572 INTEGER(INTG),
INTENT(OUT) :: ERR
2578 enters(
"FiniteElasticity_FiniteElementPreResidualEvaluate",err,error,*999)
2580 IF(
ASSOCIATED(equations_set))
THEN 2581 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 2582 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
2583 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 2584 CALL flagerror(
"Equations set specification must have three entries for a finite elasticity type equations set.", &
2587 SELECT CASE(equations_set%SPECIFICATION(3))
2590 dependent_field=>equations_set%EQUATIONS%INTERPOLATION%DEPENDENT_FIELD
2592 & field_u1_variable_type,err,error,*999)
2620 local_error=
"The third equations set specification of "// &
2622 &
" is not valid for a finite elasticity type of an elasticity equation set." 2623 CALL flagerror(local_error,err,error,*999)
2626 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2629 exits(
"FiniteElasticity_FiniteElementPreResidualEvaluate")
2631 999
errors(
"FiniteElasticity_FiniteElementPreResidualEvaluate",err,error)
2632 exits(
"FiniteElasticity_FiniteElementPreResidualEvaluate")
2646 INTEGER(INTG),
INTENT(OUT) :: ERR
2651 enters(
"FiniteElasticity_FiniteElementPostResidualEvaluate",err,error,*999)
2653 IF(
ASSOCIATED(equations_set))
THEN 2654 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 2655 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
2656 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 2657 CALL flagerror(
"Equations set specification must have three entries for a finite elasticity type equations set.", &
2660 SELECT CASE(equations_set%SPECIFICATION(3))
2689 local_error=
"The third equations set specification of "// &
2691 &
" is not valid for a finite elasticity type of an elasticity equation set." 2692 CALL flagerror(local_error,err,error,*999)
2695 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2698 exits(
"FiniteElasticity_FiniteElementPostResidualEvaluate")
2700 999
errors(
"FiniteElasticity_FiniteElementPostResidualEvaluate",err,error)
2701 exits(
"FiniteElasticity_FiniteElementPostResidualEvaluate")
2715 INTEGER(INTG),
INTENT(IN) :: derivedType
2716 INTEGER(INTG),
INTENT(OUT) :: err
2722 enters(
"FiniteElasticityEquationsSet_DerivedVariableCalculate",err,error,*999)
2724 NULLIFY(derivedvariable)
2726 IF(
ASSOCIATED(equationsset))
THEN 2727 IF(.NOT.equationsset%EQUATIONS_SET_FINISHED)
THEN 2728 CALL flagerror(
"Equations set has not been finished.",err,error,*999)
2730 IF(
ASSOCIATED(equationsset%equations))
THEN 2732 SELECT CASE(derivedtype)
2735 & derivedvariable%field,derivedvariable%variable_type,err,error,*999)
2737 CALL flagerror(
"Not implemented.",err,error,*999)
2740 &
" is not valid for a finite elasticity equations set type.",err,error,*999)
2743 CALL flagerror(
"Equations set equations are not associated.",err,error,*999)
2747 CALL flagerror(
"Equations set is not associated.",err,error,*999)
2750 exits(
"FiniteElasticityEquationsSet_DerivedVariableCalculate")
2752 999
errors(
"FiniteElasticityEquationsSet_DerivedVariableCalculate",err,error)
2753 exits(
"FiniteElasticityEquationsSet_DerivedVariableCalculate")
2765 TYPE(
field_type),
POINTER,
INTENT(INOUT) :: strainField
2766 INTEGER(INTG),
INTENT(IN) :: strainFieldVariableType
2767 INTEGER(INTG),
INTENT(OUT) :: err
2772 TYPE(
field_type),
POINTER :: dependentField,geometricField,fibreField
2775 & fibreInterpolationParameters
2781 INTEGER(INTG) :: componentIdx,dependentNumberOfComponents,elementIdx,elementNumber,fieldVariableType,gaussIdx, &
2782 & meshComponentNumber,numberOfComponents,numberOfDimensions,numberOfGauss,numberOfTimes,numberOfXi,partIdx, &
2783 & startIdx,finishIdx
2784 INTEGER(INTG) :: var1
2785 INTEGER(INTG) :: var2
2786 REAL(DP) :: dZdNu(3,3),Fg(3,3),Fe(3,3),J,Jg,Je,C(3,3),f(3,3),E(3,3)
2787 REAL(SP) :: elementUserElapsed,elementSystemElapsed,systemElapsed,systemTime1(1),systemTime2(1),systemTime3(1),systemTime4(1), &
2788 & userElapsed,userTime1(1),userTime2(1),userTime3(1),userTime4(1)
2790 enters(
"FiniteElasticity_StrainCalculate",err,error,*999)
2792 IF(
ASSOCIATED(equationsset))
THEN 2793 equations=>equationsset%equations
2794 IF(
ASSOCIATED(equations))
THEN 2798 IF(
ASSOCIATED(strainfield))
THEN 2799 CALL field_variabletypecheck(strainfield,strainfieldvariabletype,err,error,*999)
2802 numberofcomponents=6
2804 numberofcomponents=3
2806 numberofcomponents=1
2809 &
" is invalid.",err,error,*999)
2811 CALL field_numberofcomponentscheck(strainfield,strainfieldvariabletype,6,err,error,*999)
2812 DO componentidx=1,numberofcomponents
2813 CALL field_componentinterpolationcheck(strainfield,strainfieldvariabletype,componentidx, &
2814 & field_gauss_point_based_interpolation,err,error,*999)
2817 CALL flagerror(
"Strain field is not associated.",err,error,*999)
2823 var1=equations%EQUATIONS_MAPPING%NONLINEAR_MAPPING%RESIDUAL_VARIABLES(1)%PTR%VARIABLE_NUMBER
2824 var2=equations%EQUATIONS_MAPPING%RHS_MAPPING%RHS_VARIABLE%VARIABLE_NUMBER
2826 geometricfield=>equations%interpolation%GEOMETRIC_FIELD
2827 dependentfield=>equations%interpolation%DEPENDENT_FIELD
2828 fibrefield=>equations%interpolation%FIBRE_FIELD
2829 dependentnumberofcomponents=dependentfield%variables(var1)%NUMBER_OF_COMPONENTS
2831 decomposition=>dependentfield%decomposition
2832 meshcomponentnumber=decomposition%MESH_COMPONENT_NUMBER
2835 fieldvariabletype=equations%EQUATIONS_MAPPING%NONLINEAR_MAPPING%RESIDUAL_VARIABLES(1)%PTR%VARIABLE_TYPE
2836 geometricinterpolationparameters=>equations%interpolation%GEOMETRIC_INTERP_PARAMETERS(field_u_variable_type)%ptr
2837 geometricinterpolatedpoint=>equations%interpolation%GEOMETRIC_INTERP_POINT(field_u_variable_type)%ptr
2838 geometricinterpolatedpointmetrics=>equations%interpolation%GEOMETRIC_INTERP_POINT_METRICS(field_u_variable_type)%ptr
2839 dependentinterpolationparameters=>equations%interpolation%DEPENDENT_INTERP_PARAMETERS(fieldvariabletype)%ptr
2840 dependentinterpolatedpoint=>equations%interpolation%DEPENDENT_INTERP_POINT(fieldvariabletype)%ptr
2841 dependentinterpolatedpointmetrics=>equations%interpolation%DEPENDENT_INTERP_POINT_METRICS(fieldvariabletype)%ptr
2842 IF(
ASSOCIATED(fibrefield))
THEN 2843 fibreinterpolationparameters=>equations%interpolation%FIBRE_INTERP_PARAMETERS(field_u_variable_type)%ptr
2844 fibreinterpolatedpoint=>equations%interpolation%FIBRE_INTERP_POINT(field_u_variable_type)%ptr
2846 NULLIFY(fibreinterpolationparameters)
2847 NULLIFY(fibreinterpolatedpoint)
2850 elementsmapping=>dependentfield%decomposition%domain(meshcomponentnumber)%ptr%mappings%elements
2863 startidx=elementsmapping%BOUNDARY_START
2864 finishidx=elementsmapping%GHOST_FINISH
2866 startidx=elementsmapping%INTERNAL_START
2867 finishidx=elementsmapping%INTERNAL_FINISH
2871 DO elementidx=startidx,finishidx
2873 numberoftimes=numberoftimes+1
2874 elementnumber=elementsmapping%DOMAIN_LIST(elementidx)
2880 dependentbasis=>decomposition%domain(meshcomponentnumber)%ptr%topology%elements%elements(elementnumber)%basis
2882 numberofgauss=dependentquadraturescheme%NUMBER_OF_GAUSS
2884 numberofxi=dependentbasis%NUMBER_OF_XI
2886 CALL field_interpolationparameterselementget(field_values_set_type,elementnumber,geometricinterpolationparameters, &
2888 CALL field_interpolationparameterselementget(field_values_set_type,elementnumber,dependentinterpolationparameters, &
2890 IF(
ASSOCIATED(fibrefield))
THEN 2891 CALL field_interpolationparameterselementget(field_values_set_type,elementnumber,fibreinterpolationparameters, &
2896 DO gaussidx=1,numberofgauss
2905 CALL field_interpolatedpointmetricscalculate(numberofxi,dependentinterpolatedpointmetrics,err,error,*999)
2908 CALL field_interpolatedpointmetricscalculate(numberofxi,geometricinterpolatedpointmetrics,err,error,*999)
2909 IF(
ASSOCIATED(fibrefield))
THEN 2916 & geometricinterpolatedpointmetrics,fibreinterpolatedpoint,dzdnu,err,error,*999)
2919 & dzdnu,fg,fe,jg,je,err,error,*999)
2928 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2929 & gaussidx,elementnumber,1,c(1,1),err,error,*999)
2930 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2931 & gaussidx,elementnumber,2,c(1,2),err,error,*999)
2932 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2933 & gaussidx,elementnumber,3,c(1,3),err,error,*999)
2934 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2935 & gaussidx,elementnumber,4,c(2,2),err,error,*999)
2936 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2937 & gaussidx,elementnumber,5,c(2,3),err,error,*999)
2938 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2939 & gaussidx,elementnumber,6,c(3,3),err,error,*999)
2943 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2944 & gaussidx,elementnumber,1,c(1,1),err,error,*999)
2945 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2946 & gaussidx,elementnumber,2,c(1,2),err,error,*999)
2947 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2948 & gaussidx,elementnumber,3,c(2,2),err,error,*999)
2951 CALL field_parametersetupdatelocalgausspoint(strainfield,strainfieldvariabletype,field_values_set_type, &
2952 & gaussidx,elementnumber,1,c(1,1),err,error,*999)
2956 CALL flagerror(localerror,err,error,*999)
2965 userelapsed=usertime2(1)-usertime1(1)
2966 systemelapsed=systemtime2(1)-systemtime1(1)
2967 elementuserelapsed=elementuserelapsed+userelapsed
2968 elementsystemelapsed=elementsystemelapsed+systemelapsed
2971 & userelapsed,err,error,*999)
2973 & systemelapsed,err,error,*999)
2976 & userelapsed,err,error,*999)
2978 & systemelapsed,err,error,*999)
2979 IF(numberoftimes>0)
THEN 2981 & elementuserelapsed/numberoftimes,err,error,*999)
2983 & elementsystemelapsed/numberoftimes,err,error,*999)
2994 CALL field_parametersetupdatestart(strainfield,strainfieldvariabletype,field_values_set_type,err,error,*999)
2997 CALL field_parametersetupdatefinish(strainfield,strainfieldvariabletype,field_values_set_type,err,error,*999)
3002 userelapsed=usertime4(1)-usertime3(1)
3003 systemelapsed=systemtime4(1)-systemtime3(1)
3014 CALL flagerror(
"Equations set equations is not associated.",err,error,*999)
3017 CALL flagerror(
"Equations set is not associated.",err,error,*999)
3020 exits(
"FiniteElasticity_StrainCalculate")
3022 999 errorsexits(
"FiniteElasticity_StrainCalculate",err,error)
3035 INTEGER(INTG),
INTENT(IN) :: tensorEvaluateType
3036 INTEGER(INTG),
INTENT(IN) :: userElementNumber
3037 REAL(DP),
INTENT(IN) :: xi(:)
3038 REAL(DP),
INTENT(OUT) :: values(3,3)
3039 INTEGER(INTG),
INTENT(OUT) :: err
3045 & fibreInterpolatedPoint,dependentInterpolatedPoint,materialsInterpolatedPoint, &
3046 & independentInterpolatedPoint,darcyInterpolatedPoint
3048 & dependentInterpolatedPointMetrics
3054 LOGICAL :: userElementExists,ghostElement
3055 INTEGER(INTG) :: dependentVarType,meshComponentNumber
3056 INTEGER(INTG) :: numberOfDimensions,numberOfXi
3057 INTEGER(INTG) :: localElementNumber,i,nh,mh
3058 REAL(DP) :: dZdNu(3,3),dZdNuT(3,3),AZL(3,3),E(3,3),cauchyStressTensor(3,3),cauchyStressVoigt(6),Jznu
3060 enters(
"FiniteElasticity_TensorInterpolateXi",err,error,*999)
3063 NULLIFY(dependentfield)
3064 NULLIFY(geometricinterpolatedpoint)
3065 NULLIFY(fibreinterpolatedpoint)
3066 NULLIFY(dependentinterpolatedpoint)
3067 NULLIFY(materialsinterpolatedpoint)
3068 NULLIFY(independentinterpolatedpoint)
3069 NULLIFY(darcyinterpolatedpoint)
3070 NULLIFY(decomposition)
3071 NULLIFY(decompositiontopology)
3072 NULLIFY(domaintopology)
3073 NULLIFY(elementbasis)
3075 IF(.NOT.
ASSOCIATED(equationsset))
THEN 3076 CALL flagerror(
"Equations set is not associated.",err,error,*999)
3078 equations=>equationsset%equations
3079 IF(.NOT.
ASSOCIATED(equations))
THEN 3080 CALL flagerror(
"Equations set equations is not associated.",err,error,*999)
3083 nonlinearmapping=>equations%equations_mapping%nonlinear_mapping
3084 IF(.NOT.
ASSOCIATED(equations))
THEN 3085 CALL flagerror(
"Equations nonlinear mapping is not associated.",err,error,*999)
3087 dependentvartype=nonlinearmapping%residual_variables(1)%ptr%variable_type
3089 IF(.NOT.
ASSOCIATED(equations%interpolation))
THEN 3090 CALL flagerror(
"Equations interpolation is not associated.",err,error,*999)
3092 dependentfield=>equations%interpolation%dependent_field
3093 IF(.NOT.
ASSOCIATED(dependentfield))
THEN 3094 CALL flagerror(
"Equations dependent field is not associated.",err,error,*999)
3096 decomposition=>dependentfield%decomposition
3097 IF(.NOT.
ASSOCIATED(decomposition))
THEN 3098 CALL flagerror(
"Dependent field decomposition is not associated.",err,error,*999)
3100 CALL decomposition_mesh_component_number_get(decomposition,meshcomponentnumber,err,error,*999)
3101 decompositiontopology=>decomposition%topology
3102 domaintopology=>decomposition%domain(meshcomponentnumber)%ptr%topology
3103 CALL decomposition_topology_element_check_exists(decompositiontopology,userelementnumber, &
3104 & userelementexists,localelementnumber,ghostelement,err,error,*999)
3105 IF(.NOT.userelementexists)
THEN 3106 CALL flagerror(
"The specified user element number of "// &
3108 &
" does not exist in the decomposition for the dependent field.",err,error,*999)
3110 CALL domaintopology_elementbasisget( &
3111 & domaintopology,userelementnumber,elementbasis,err,error,*999)
3114 CALL field_interpolation_parameters_element_get(field_values_set_type,localelementnumber, &
3115 & equations%interpolation%geometric_interp_parameters(field_u_variable_type)%ptr,err,error,*999)
3116 IF(
ASSOCIATED(equations%interpolation%fibre_interp_parameters))
THEN 3117 CALL field_interpolation_parameters_element_get(field_values_set_type,localelementnumber, &
3118 & equations%interpolation%fibre_interp_parameters(field_u_variable_type)%ptr,err,error,*999)
3120 CALL field_interpolation_parameters_element_get(field_values_set_type,localelementnumber, &
3121 & equations%interpolation%dependent_interp_parameters(dependentvartype)%ptr,err,error,*999)
3124 geometricinterpolatedpoint=>equations%interpolation%geometric_interp_point(field_u_variable_type)%ptr
3125 IF(
ASSOCIATED(equations%interpolation%fibre_interp_point))
THEN 3126 fibreinterpolatedpoint=>equations%interpolation%fibre_interp_point(field_u_variable_type)%ptr
3128 dependentinterpolatedpoint=>equations%interpolation%dependent_interp_point(dependentvartype)%ptr
3131 geometricinterpolatedpointmetrics=>equations%interpolation% &
3132 & geometric_interp_point_metrics(field_u_variable_type)%ptr
3133 dependentinterpolatedpointmetrics=>equations%interpolation% &
3134 & dependent_interp_point_metrics(dependentvartype)%ptr
3137 CALL field_interpolate_xi(
first_part_deriv,xi,dependentinterpolatedpoint,err,error,*999)
3138 CALL field_interpolate_xi(
first_part_deriv,xi,geometricinterpolatedpoint,err,error,*999)
3139 IF(
ASSOCIATED(fibreinterpolatedpoint))
THEN 3140 CALL field_interpolate_xi(
first_part_deriv,xi,fibreinterpolatedpoint,err,error,*999)
3144 CALL field_interpolated_point_metrics_calculate( &
3145 & elementbasis%number_of_xi,geometricinterpolatedpointmetrics,err,error,*999)
3146 CALL field_interpolated_point_metrics_calculate( &
3147 & elementbasis%number_of_xi,dependentinterpolatedpointmetrics,err,error,*999)
3150 numberofdimensions=equationsset%region%coordinate_system%number_of_dimensions
3151 numberofxi=elementbasis%number_of_xi
3153 & geometricinterpolatedpointmetrics,fibreinterpolatedpoint,dzdnu,err,error,*999)
3165 e(i,i)=e(i,i)-0.5_dp
3171 CALL field_interpolation_parameters_element_get(field_values_set_type,localelementnumber, &
3172 & equations%interpolation%materials_interp_parameters(field_u_variable_type)%ptr,err,error,*999)
3173 IF(
ASSOCIATED(equations%interpolation%independent_interp_parameters))
THEN 3174 CALL field_interpolation_parameters_element_get(field_values_set_type,localelementnumber, &
3175 & equations%interpolation%independent_interp_parameters(field_u_variable_type)%ptr,err,error,*999)
3179 materialsinterpolatedpoint=>equations%interpolation%materials_interp_point(field_u_variable_type)%ptr
3180 IF(
ASSOCIATED(equations%interpolation%independent_interp_point))
THEN 3181 independentinterpolatedpoint=>equations%interpolation%independent_interp_point(dependentvartype)%ptr
3185 CALL field_interpolate_xi(
no_part_deriv,xi,materialsinterpolatedpoint,err,error,*999)
3186 IF(
ASSOCIATED(independentinterpolatedpoint))
THEN 3187 CALL field_interpolate_xi(
first_part_deriv,xi,independentinterpolatedpoint,err,error,*999)
3190 SELECT CASE(equationsset%specification(3))
3193 jznu=dependentinterpolatedpointmetrics%JACOBIAN/geometricinterpolatedpointmetrics%JACOBIAN
3201 & materialsinterpolatedpoint,cauchystressvoigt,dzdnu,jznu,localelementnumber,0,err,error,*999)
3211 & materialsinterpolatedpoint,darcyinterpolatedpoint, &
3212 & independentinterpolatedpoint,cauchystresstensor,jznu,dzdnu,localelementnumber,0,err,error,*999)
3214 CALL flagerror(
"Not implemented ",err,error,*999)
3218 SELECT CASE(tensorevaluatetype)
3226 values=cauchystresstensor
3228 CALL flagerror(
"Not implemented.",err,error,*999)
3231 &
"for finite elasticity equation sets",err,error,*999)
3234 exits(
"FiniteElasticity_TensorInterpolateXi")
3236 999 errorsexits(
"FiniteElasticity_TensorInterpolateXi",err,error)
3252 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
3253 INTEGER(INTG),
INTENT(OUT) :: ERR
3275 INTEGER(INTG) :: FACE_NUMBER,xiDirection(3),orientation
3276 INTEGER(INTG) :: FIELD_VAR_U_TYPE,FIELD_VAR_DELUDELN_TYPE,MESH_COMPONENT_NUMBER
3277 INTEGER(INTG) :: oh,mh,ms,mhs,nh,ns,nhs,ng,naf
3278 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS,NUMBER_OF_LOCAL_FACES
3279 INTEGER(INTG) :: SUM_ELEMENT_PARAMETERS
3280 INTEGER(INTG) :: ELEMENT_BASE_DOF_INDEX(3),NUMBER_OF_FACE_PARAMETERS(3)
3281 INTEGER(INTG),
PARAMETER :: OFF_DIAG_COMP(3)=[0,1,3],off_diag_dep_var1(3)=[1,1,2],off_diag_dep_var2(3)=[2,3,3]
3282 REAL(DP) :: PRESSURE_GAUSS,GW_PRESSURE
3283 REAL(DP) :: NORMAL(3),GW_PRESSURE_W(2),TEMP3, TEMP4
3284 REAL(DP) :: TEMPVEC1(2),TEMPVEC2(2),TEMPVEC3(3),TEMPVEC4(3),TEMPVEC5(3)
3285 LOGICAL :: NONZERO_PRESSURE
3287 enters(
"FiniteElasticity_SurfacePressureJacobianEvaluate",err,error,*999)
3289 NULLIFY(dependent_basis)
3290 NULLIFY(decomposition)
3292 NULLIFY(equations,equations_mapping,equations_matrices,nonlinear_mapping,nonlinear_matrices,jacobian_matrix)
3293 NULLIFY(dependent_interpolation_parameters,pressure_interpolation_parameters)
3294 NULLIFY(dependent_interp_point,dependent_interp_point_metrics,pressure_interp_point)
3295 NULLIFY(dependent_field)
3296 NULLIFY(field_variable)
3297 NULLIFY(dependent_quadrature_scheme)
3299 number_of_dimensions=equations_set%REGION%COORDINATE_SYSTEM%NUMBER_OF_DIMENSIONS
3301 equations=>equations_set%EQUATIONS
3302 equations_matrices=>equations%EQUATIONS_MATRICES
3303 nonlinear_matrices=>equations_matrices%NONLINEAR_MATRICES
3304 jacobian_matrix=>nonlinear_matrices%JACOBIANS(1)%PTR
3306 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
3307 decomposition=>dependent_field%DECOMPOSITION
3308 mesh_component_number=decomposition%MESH_COMPONENT_NUMBER
3309 element=>decomposition%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)
3310 number_of_local_faces=dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
3311 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS%NUMBER_OF_LOCAL_FACES
3313 field_variable=>equations%EQUATIONS_MAPPING%NONLINEAR_MAPPING%RESIDUAL_VARIABLES(1)%PTR
3314 field_var_u_type=equations%EQUATIONS_MAPPING%NONLINEAR_MAPPING%RESIDUAL_VARIABLES(1)%PTR%VARIABLE_TYPE
3315 field_var_deludeln_type=equations%EQUATIONS_MAPPING%RHS_MAPPING%RHS_VARIABLE_TYPE
3318 DO naf=1,number_of_local_faces
3319 face_number=element%ELEMENT_FACES(naf)
3320 face=>decomposition%TOPOLOGY%FACES%FACES(face_number)
3323 IF(face%BOUNDARY_FACE)
THEN 3324 xidirection(3)=abs(face%XI_DIRECTION)
3326 pressure_interpolation_parameters=>equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_deludeln_type)%PTR
3327 CALL field_interpolation_parameters_face_get(field_pressure_values_set_type,face_number, &
3328 & pressure_interpolation_parameters,err,error,*999,field_geometric_components_type)
3329 pressure_interp_point=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT(field_var_deludeln_type)%PTR
3332 nonzero_pressure=any(abs(pressure_interpolation_parameters%PARAMETERS(:,xidirection(3)))>
zero_tolerance)
3335 IF(nonzero_pressure)
THEN 3336 mesh_component_number=decomposition%MESH_COMPONENT_NUMBER
3337 dependent_basis=>decomposition%DOMAIN(mesh_component_number)%PTR%TOPOLOGY%FACES%FACES(face_number)%BASIS
3340 dependent_interpolation_parameters=>equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_u_type)%PTR
3341 CALL field_interpolation_parameters_face_get(field_values_set_type,face_number, &
3342 & dependent_interpolation_parameters,err,error,*999,field_geometric_components_type)
3343 dependent_interp_point=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT(field_var_u_type)%PTR
3344 dependent_interp_point_metrics=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT_METRICS(field_var_u_type)%PTR
3346 sum_element_parameters=0
3348 DO nh=1,number_of_dimensions
3349 mesh_component_number=field_variable%COMPONENTS(nh)%MESH_COMPONENT_NUMBER
3350 dependent_basis=>decomposition%DOMAIN(mesh_component_number)%PTR%TOPOLOGY%FACES%FACES(face_number)%BASIS
3351 bases(nh)%PTR=>decomposition%DOMAIN(mesh_component_number)%PTR% &
3352 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
3354 number_of_face_parameters(nh)=dependent_basis%NUMBER_OF_ELEMENT_PARAMETERS
3355 element_base_dof_index(nh)=sum_element_parameters
3356 sum_element_parameters=sum_element_parameters+bases(nh)%PTR%NUMBER_OF_ELEMENT_PARAMETERS
3364 DO ng=1,dependent_quadrature_scheme%NUMBER_OF_GAUSS
3366 & pressure_interp_point,err,error,*999,field_geometric_components_type)
3368 & dependent_interp_point,err,error,*999,field_geometric_components_type)
3370 & dependent_interp_point_metrics,err,error,*999)
3372 CALL cross_product(dependent_interp_point_metrics%DX_DXI(:,1), &
3373 & dependent_interp_point_metrics%DX_DXI(:,2),normal,err,error,*999)
3374 pressure_gauss=pressure_interp_point%VALUES(xidirection(3),
no_part_deriv)*orientation
3375 gw_pressure=dependent_quadrature_scheme%GAUSS_WEIGHTS(ng)*pressure_gauss
3377 DO oh=1,off_diag_comp(number_of_dimensions)
3378 nh=off_diag_dep_var1(oh)
3379 mh=off_diag_dep_var2(oh)
3380 gw_pressure_w(1:2)=(normal(mh)*dependent_interp_point_metrics%DXI_DX(1:2,nh)- &
3381 & dependent_interp_point_metrics%DXI_DX(1:2,mh)*normal(nh))*gw_pressure
3382 DO ns=1,number_of_face_parameters(nh)
3384 nhs=element_base_dof_index(nh)+ &
3385 & bases(nh)%PTR%ELEMENT_PARAMETERS_IN_LOCAL_FACE(ns,naf)
3386 tempvec1(1:2)=gw_pressure_w(1:2)*quadrature_schemes(nh)%PTR% &
3388 DO ms=1,number_of_face_parameters(mh)
3389 mhs=element_base_dof_index(mh)+ &
3390 & bases(mh)%PTR%ELEMENT_PARAMETERS_IN_LOCAL_FACE(ms,naf)
3391 tempvec2=quadrature_schemes(mh)%PTR%GAUSS_BASIS_FNS(ms,
no_part_deriv,ng)
3392 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(mhs,nhs)+ &
3393 & dot_product(tempvec1,tempvec2)* &
3394 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_u_type)%PTR%SCALE_FACTORS(ms,mh)* &
3395 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_u_type)%PTR%SCALE_FACTORS(ns,nh)
3400 DO oh=1,off_diag_comp(number_of_dimensions)
3401 nh=off_diag_dep_var1(oh)
3402 mh=off_diag_dep_var2(oh)
3403 gw_pressure_w(1:2)=(normal(nh)*dependent_interp_point_metrics%DXI_DX(1:2,mh)- &
3404 & dependent_interp_point_metrics%DXI_DX(1:2,nh)*normal(mh))*gw_pressure
3405 DO ms=1,number_of_face_parameters(mh)
3407 mhs=element_base_dof_index(mh)+ &
3408 & bases(mh)%PTR%ELEMENT_PARAMETERS_IN_LOCAL_FACE(ms,naf)
3409 tempvec1(1:2)=gw_pressure_w(1:2)*quadrature_schemes(mh)%PTR% &
3411 DO ns=1,number_of_face_parameters(nh)
3412 nhs=element_base_dof_index(nh)+ &
3413 & bases(nh)%PTR%ELEMENT_PARAMETERS_IN_LOCAL_FACE(ns,naf)
3414 tempvec2=quadrature_schemes(nh)%PTR%GAUSS_BASIS_FNS(ns,
no_part_deriv,ng)
3415 jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(nhs,mhs)=jacobian_matrix%ELEMENT_JACOBIAN%MATRIX(nhs,mhs)+ &
3416 & dot_product(tempvec1,tempvec2)* &
3417 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_u_type)%PTR%SCALE_FACTORS(ms,mh)* &
3418 & equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_u_type)%PTR%SCALE_FACTORS(ns,nh)
3427 exits(
"FiniteElasticity_SurfacePressureJacobianEvaluate")
3429 999
errors(
"FiniteElasticity_SurfacePressureJacobianEvaluate",err,error)
3430 exits(
"FiniteElasticity_SurfacePressureJacobianEvaluate")
3443 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
3444 INTEGER(INTG),
INTENT(IN) :: var1
3445 INTEGER(INTG),
INTENT(IN) :: var2
3446 INTEGER(INTG),
INTENT(OUT) :: ERR
3449 TYPE(
basis_type),
POINTER :: DEPENDENT_FACE_BASIS,COMPONENT_FACE_BASIS,COMPONENT_BASIS
3463 INTEGER(INTG) :: FIELD_VAR_U_TYPE,FIELD_VAR_DUDN_TYPE,MESH_COMPONENT_NUMBER
3464 INTEGER(INTG) :: element_face_idx,face_number,gauss_idx
3465 INTEGER(INTG) :: component_idx,element_base_dof_idx,element_dof_idx,parameter_idx,face_parameter_idx
3466 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS,NUMBER_OF_LOCAL_FACES
3467 INTEGER(INTG) :: xiDirection(3),orientation
3468 REAL(DP) :: PRESSURE_GAUSS,GW_PRESSURE,GW_PRESSURE_NORMAL_COMPONENT
3469 REAL(DP) :: NORMAL(3)
3470 LOGICAL :: NONZERO_PRESSURE
3472 enters(
"FiniteElasticity_SurfacePressureResidualEvaluate",err,error,*999)
3474 NULLIFY(dependent_face_basis,component_face_basis,component_basis)
3475 NULLIFY(decomposition)
3476 NULLIFY(decomp_element)
3477 NULLIFY(decomp_face)
3479 NULLIFY(equations,nonlinear_matrices)
3480 NULLIFY(dependent_field,field_variable)
3481 NULLIFY(face_dependent_interpolation_parameters)
3482 NULLIFY(face_dependent_interpolated_point,face_dependent_interpolated_point_metrics)
3483 NULLIFY(face_pressure_interpolation_parameters,face_pressure_interpolated_point)
3484 NULLIFY(component_face_quadrature_scheme,face_quadrature_scheme)
3486 number_of_dimensions=equations_set%REGION%COORDINATE_SYSTEM%NUMBER_OF_DIMENSIONS
3489 equations=>equations_set%EQUATIONS
3490 nonlinear_matrices=>equations%EQUATIONS_MATRICES%NONLINEAR_MATRICES
3491 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
3492 decomposition=>dependent_field%DECOMPOSITION
3493 mesh_component_number=decomposition%MESH_COMPONENT_NUMBER
3494 decomp_element=>decomposition%TOPOLOGY%ELEMENTS%ELEMENTS(element_number)
3497 field_variable=>equations%EQUATIONS_MAPPING%NONLINEAR_MAPPING%RESIDUAL_VARIABLES(1)%PTR
3498 field_var_u_type=field_variable%VARIABLE_TYPE
3499 field_var_dudn_type=equations%EQUATIONS_MAPPING%RHS_MAPPING%RHS_VARIABLE_TYPE
3500 number_of_local_faces=decomposition%DOMAIN(mesh_component_number)%PTR%TOPOLOGY%ELEMENTS% &
3501 & elements(element_number)%BASIS%NUMBER_OF_LOCAL_FACES
3504 DO element_face_idx=1,number_of_local_faces
3505 face_number=decomp_element%ELEMENT_FACES(element_face_idx)
3506 decomp_face=>decomposition%TOPOLOGY%FACES%FACES(face_number)
3509 IF(decomp_face%BOUNDARY_FACE)
THEN 3510 xidirection(3)=abs(decomp_face%XI_DIRECTION)
3512 face_pressure_interpolation_parameters=>equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_dudn_type)%PTR
3513 CALL field_interpolation_parameters_face_get(field_pressure_values_set_type,face_number, &
3514 & face_pressure_interpolation_parameters,err,error,*999,field_geometric_components_type)
3515 face_pressure_interpolated_point=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT(var2)%PTR
3518 nonzero_pressure=any(abs(face_pressure_interpolation_parameters%PARAMETERS(:,xidirection(3)))>
zero_tolerance)
3521 IF(nonzero_pressure)
THEN 3523 dependent_face_basis=>decomposition%DOMAIN(mesh_component_number)%PTR%TOPOLOGY%FACES%FACES(face_number)%BASIS
3526 face_dependent_interpolation_parameters=>equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_u_type)%PTR
3527 CALL field_interpolation_parameters_face_get(field_values_set_type,face_number, &
3528 & face_dependent_interpolation_parameters,err,error,*999,field_geometric_components_type)
3529 face_dependent_interpolated_point=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT(field_var_u_type)%PTR
3530 face_dependent_interpolated_point_metrics=>equations%INTERPOLATION% &
3531 & dependent_interp_point_metrics(field_var_u_type)%PTR
3540 DO gauss_idx=1,face_quadrature_scheme%NUMBER_OF_GAUSS
3543 & face_pressure_interpolated_point,err,error,*999,field_geometric_components_type)
3545 & face_dependent_interpolated_point,err,error,*999)
3547 & face_dependent_interpolated_point_metrics,err,error,*999)
3549 CALL cross_product(face_dependent_interpolated_point_metrics%DX_DXI(:,1), &
3550 & face_dependent_interpolated_point_metrics%DX_DXI(:,2),normal,err,error,*999)
3551 pressure_gauss=face_pressure_interpolated_point%VALUES(xidirection(3),
no_part_deriv)*orientation
3552 gw_pressure=face_quadrature_scheme%GAUSS_WEIGHTS(gauss_idx)*pressure_gauss
3553 element_base_dof_idx=0
3555 DO component_idx=1,number_of_dimensions
3556 mesh_component_number=field_variable%COMPONENTS(component_idx)%MESH_COMPONENT_NUMBER
3557 component_basis=>dependent_field%DECOMPOSITION%DOMAIN(mesh_component_number)%PTR% &
3558 & topology%ELEMENTS%ELEMENTS(element_number)%BASIS
3559 component_face_basis=>decomposition%DOMAIN(mesh_component_number)%PTR%TOPOLOGY%FACES%FACES(face_number)%BASIS
3560 component_face_quadrature_scheme=>component_face_basis% &
3562 gw_pressure_normal_component=gw_pressure*normal(component_idx)
3563 DO face_parameter_idx=1,component_face_basis%NUMBER_OF_ELEMENT_PARAMETERS
3564 parameter_idx=component_basis%ELEMENT_PARAMETERS_IN_LOCAL_FACE(face_parameter_idx,element_face_idx)
3565 element_dof_idx=element_base_dof_idx+parameter_idx
3566 nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)= &
3567 & nonlinear_matrices%ELEMENT_RESIDUAL%VECTOR(element_dof_idx)+ &
3568 & gw_pressure_normal_component * &
3569 & component_face_quadrature_scheme%GAUSS_BASIS_FNS(face_parameter_idx,
no_part_deriv,gauss_idx)
3572 element_base_dof_idx=element_base_dof_idx+component_basis%NUMBER_OF_ELEMENT_PARAMETERS
3579 exits(
"FiniteElasticity_SurfacePressureResidualEvaluate")
3581 999
errors(
"FiniteElasticity_SurfacePressureResidualEvaluate",err,error)
3582 exits(
"FiniteElasticity_SurfacePressureResidualEvaluate")
3593 & fibreinterpolatedpoint,dzdnu,err,error,*)
3598 REAL(DP),
INTENT(OUT) :: dZdNu(3,3)
3599 INTEGER(INTG),
INTENT(OUT) :: err
3602 INTEGER(INTG) :: numberOfXDimensions,numberOfXiDimensions,numberOfZDimensions
3603 REAL(DP) :: dNuDXi(3,3),dXidNu(3,3), dNudX(3,3),dXdNu(3,3)
3605 enters(
"FiniteElasticity_GaussDeformationGradientTensor",err,error,*999)
3607 IF(
ASSOCIATED(dependentinterppointmetrics))
THEN 3608 IF(
ASSOCIATED(geometricinterppointmetrics))
THEN 3609 numberofxdimensions=geometricinterppointmetrics%NUMBER_OF_X_DIMENSIONS
3610 numberofxidimensions=geometricinterppointmetrics%NUMBER_OF_XI_DIMENSIONS
3611 numberofzdimensions=dependentinterppointmetrics%NUMBER_OF_X_DIMENSIONS
3614 & dnudxi(1:numberofxdimensions,1:numberofxidimensions), &
3615 & dxidnu(1:numberofxidimensions,1:numberofxdimensions),err,error,*999)
3617 CALL matrixproduct(dependentinterppointmetrics%DX_DXI(1:numberofzdimensions,1:numberofxidimensions), &
3618 & dxidnu(1:numberofxidimensions,1:numberofxdimensions),dzdnu(1:numberofzdimensions,1:numberofxdimensions), &
3621 IF(numberofzdimensions == 2)
THEN 3622 dzdnu(:,3) = [0.0_dp,0.0_dp,1.0_dp]
3623 dzdnu(3,1:2) = 0.0_dp
3633 &
'(" dZdNu',
'(",I1,",:)',
' :",3(X,E13.6))',
'(15X,3(X,E13.6))',err,error,*999)
3637 CALL flagerror(
"Geometric interpolated point metrics is not associated.",err,error,*999)
3640 CALL flagerror(
"Dependent interpolated point metrics is not associated.",err,error,*999)
3643 exits(
"FiniteElasticity_GaussDeformationGradientTensor")
3645 999
errors(
"FiniteElasticity_GaussDeformationGradientTensor",err,error)
3646 exits(
"FiniteElasticity_GaussDeformationGradientTensor")
3657 & materials_interpolated_point,darcy_dependent_interpolated_point, &
3658 & independent_interpolated_point,cauchy_tensor,jznu,dzdnu,
element_number,gauss_point_number,err,error,*)
3665 REAL(DP),
INTENT(OUT) :: CAUCHY_TENSOR(:,:)
3666 REAL(DP),
INTENT(OUT) :: Jznu
3667 REAL(DP),
INTENT(IN) :: DZDNU(3,3)
3668 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER,GAUSS_POINT_NUMBER
3669 INTEGER(INTG),
INTENT(OUT) :: ERR
3672 INTEGER(INTG) :: EQUATIONS_SET_SUBTYPE
3673 INTEGER(INTG) :: i,j,k,PRESSURE_COMPONENT,component_idx,dof_idx
3674 REAL(DP) :: activation
3675 REAL(DP) :: AZL(3,3),AZU(3,3),DZDNUT(3,3),PIOLA_TENSOR(3,3),E(3,3),P,IDENTITY(3,3),AZLT(3,3),AZUT(3,3)
3676 REAL(DP) :: AZL_SQUARED(3,3)
3677 REAL(DP) :: I1,I2,I3
3678 REAL(DP) :: ACTIVE_STRESS_11,ACTIVE_STRESS_22,ACTIVE_STRESS_33
3679 REAL(DP) :: TEMP(3,3),TEMPTERM
3682 REAL(DP),
DIMENSION (:),
POINTER :: C
3683 REAL(DP) :: a, B(3,3), Q
3684 REAL(DP) :: ffact,dfdJfact
3685 INTEGER(INTG) :: DARCY_MASS_INCREASE_ENTRY
3686 REAL(DP) ::
VALUE,VAL1,VAL2
3687 REAL(DP) :: WV_PRIME,TOL,TOL1,UP,LOW
3688 REAL(DP) :: F_e(3,3),F_a(3,3),F_a_inv(3,3),F_a_T(3,3),C_a(3,3),C_a_inv(3,3),lambda_a,C_e(3,3),F_e_T(3,3)
3689 REAL(DP) :: REFERENCE_VOLUME,XB_STIFFNESS,XB_DISTORTION,V_MAX
3690 REAL(DP) :: SARCO_LENGTH,FREE_ENERGY,FREE_ENERGY_0,XB_ENERGY_PER_VOLUME,SLOPE,lambda_f,A_1,A_2,x_1,x_2
3691 REAL(DP) :: MAX_XB_NUMBER_PER_VOLUME,ENERGY_PER_XB,FORCE_LENGTH,I_1e,EVALUES(3),EVECTOR_1(3),EVECTOR_2(3),EVECTOR_3(3)
3692 REAL(DP) :: EMATRIX_1(3,3),EMATRIX_2(3,3),EMATRIX_3(3,3),TEMP1(3,3),TEMP2(3,3),TEMP3(3,3),N1(3,3),N2(3,3),N3(3,3)
3693 REAL(DP),
DIMENSION(5) :: PAR
3694 INTEGER(INTG) :: LWORK,node1,node2
3695 INTEGER(INTG),
PARAMETER :: LWMAX=1000
3696 REAL(DP) :: WORK(lwmax),RIGHT_NODE(3),LEFT_NODE(3),delta_t,dist1,dist2,velo
3697 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,INDEPENDENT_FIELD
3698 REAL(DP) :: ISOMETRIC_FORCE_AT_FULL_ACT,LENGTH_HALF_SARCO
3699 REAL(DP) :: TITIN_VALUE,TITIN_VALUE_CROSS_FIBRE,TITIN_UNBOUND,TITIN_BOUND
3700 REAL(DP) :: TITIN_UNBOUND_CROSS_FIBRE,TITIN_BOUND_CROSS_FIBRE
3702 enters(
"FINITE_ELASTICITY_GAUSS_CAUCHY_TENSOR",err,error,*999)
3704 NULLIFY(field_variable)
3706 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 3707 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
3708 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 3709 CALL flagerror(
"Equations set specification must have three entries for a finite elasticity type equations set.", &
3712 equations_set_subtype=equations_set%SPECIFICATION(3)
3713 c=>materials_interpolated_point%VALUES(:,1)
3725 pressure_component=dependent_interpolated_point%INTERPOLATION_PARAMETERS%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
3726 p=dependent_interpolated_point%VALUES(pressure_component,1)
3728 CALL invert(azl,azu,i3,err,error,*999)
3732 e(i,i)=e(i,i)-0.5_dp
3736 & 3,3,e,
write_string_matrix_name_and_indices,
'(" E',
'(",I1,",:)',
' :",3(X,E13.6))', &
3737 &
'(17X,3(X,E13.6))',err,error,*999)
3741 identity(i,i)=1.0_dp
3744 SELECT CASE(equations_set_subtype)
3749 wv_prime = c(3)*(jznu - 1.0_dp)
3751 i1 = azl(1,1) + azl(2,2) + azl(3,3)
3753 i2 = 0.5_dp * (
i1**2 - azl_squared(1,1) - azl_squared(2,2) - azl_squared(3,3))
3755 piola_tensor=2.0_dp*jznu**(-2.0_dp/3.0_dp)*((c(1)+c(2)*
i1)*identity-c(2)*azl &
3756 & -(c(1)*
i1+2.0_dp*c(2)*i2-1.5_dp*wv_prime*jznu**(5.0_dp/3.0_dp))/3.0_dp*azu)
3763 i1 = azl(1,1) + azl(2,2) + azl(3,3)
3765 i2 = 0.5_dp * (
i1**2 - azl_squared(1,1) - azl_squared(2,2) - azl_squared(3,3))
3784 piola_tensor=2.0_dp*jznu**(-2.0_dp/3.0_dp)*((c(1)+c(2)*
i1)*identity-c(2)*azl &
3785 & -(c(1)*
i1+2.0_dp*c(2)*i2-1.5_dp*p*jznu**(5.0_dp/3.0_dp))/3.0_dp*azu)
3789 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
3790 node1=dependent_field%decomposition%domain(1)%ptr%topology%elements%elements(element_number)%element_nodes(13)
3791 node2=dependent_field%decomposition%domain(1)%ptr%topology%elements%elements(element_number)%element_nodes(15)
3793 NULLIFY(field_variable)
3795 CALL field_variable_get(dependent_field,field_v_variable_type,field_variable,err,error,*999)
3796 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
3797 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,left_node(1), &
3799 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
3800 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,left_node(2), &
3802 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
3803 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,left_node(3), &
3806 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
3807 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,right_node(1), &
3809 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
3810 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,right_node(2), &
3812 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
3813 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,right_node(3), &
3816 dist1=sqrt((right_node(1)-left_node(1))*(right_node(1)-left_node(1))+ &
3817 & (right_node(2)-left_node(2))*(right_node(2)-left_node(2))+ &
3818 & (right_node(3)-left_node(3))*(right_node(3)-left_node(3)))
3820 NULLIFY(field_variable)
3822 CALL field_variable_get(dependent_field,field_u_variable_type,field_variable,err,error,*999)
3823 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
3824 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,left_node(1), &
3826 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
3827 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,left_node(2), &
3829 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
3830 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,left_node(3), &
3833 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
3834 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,right_node(1), &
3836 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
3837 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,right_node(2), &
3839 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
3840 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,right_node(3), &
3843 dist2=sqrt((right_node(1)-left_node(1))*(right_node(1)-left_node(1))+ &
3844 & (right_node(2)-left_node(2))*(right_node(2)-left_node(2))+ &
3845 & (right_node(3)-left_node(3))*(right_node(3)-left_node(3)))
3848 velo=(dist2-dist1)/delta_t
3863 xb_distortion=8.0e-9_dp*(1+velo/v_max)
3865 xb_stiffness=2.2e-3_dp
3867 reference_volume=1.4965e+06_dp
3868 max_xb_number_per_volume=120.0_dp*2.0_dp/reference_volume
3869 energy_per_xb=0.5_dp*xb_stiffness*xb_distortion**2
3871 sarco_length=dzdnu(1,1)
3874 IF(sarco_length.LE.0.635_dp)
THEN 3876 ELSE IF(sarco_length.LE.0.835_dp)
THEN 3877 force_length=4.2_dp*(sarco_length-0.635_dp)
3878 ELSE IF(sarco_length.LE.1.0_dp)
THEN 3879 force_length=0.84_dp+0.9697_dp*(sarco_length-0.835_dp)
3880 ELSE IF(sarco_length.LE.1.125_dp)
THEN 3882 ELSE IF(sarco_length.LE.1.825_dp)
THEN 3883 force_length=1.0_dp-1.4286_dp*(sarco_length-1.125_dp)
3889 xb_energy_per_volume=max_xb_number_per_volume*force_length*c(8)*energy_per_xb*10.0_dp**23
3897 f_a_inv(1,1)=1.0_dp/lambda_a
3912 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
3913 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
3914 lwork=min(lwmax,int(work(1)))
3915 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
3916 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
3923 ematrix_1(i,j)=evector_1(i)*evector_1(j)
3924 ematrix_2(i,j)=evector_2(i)*evector_2(j)
3925 ematrix_3(i,j)=evector_3(i)*evector_3(j)
3936 free_energy_0=0.0_dp
3938 free_energy_0=free_energy_0+c(i)/c(i+3)*( &
3939 & evalues(1)**(c(i+3)/2.0_dp)+ &
3940 & evalues(2)**(c(i+3)/2.0_dp)+ &
3941 & evalues(3)**(c(i+3)/2.0_dp)-3.0_dp)
3943 free_energy_0=c(7)*free_energy_0
3945 free_energy=free_energy_0
3947 VALUE=xb_energy_per_volume-(free_energy-free_energy_0)
3955 DO WHILE (abs(
VALUE).GE.tol)
3957 IF (abs(
VALUE).GE.tol1)
THEN 3958 lambda_a=up-(up-low)/2.0_dp
3961 f_a_inv(1,1)=1.0_dp/lambda_a
3972 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
3973 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
3974 lwork=min(lwmax,int(work(1)))
3975 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
3976 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
3983 ematrix_1(i,j)=evector_1(i)*evector_1(j)
3984 ematrix_2(i,j)=evector_2(i)*evector_2(j)
3985 ematrix_3(i,j)=evector_3(i)*evector_3(j)
3998 free_energy=free_energy+c(i)/c(i+3)*( &
3999 & evalues(1)**(c(i+3)/2.0_dp)+ &
4000 & evalues(2)**(c(i+3)/2.0_dp)+ &
4001 & evalues(3)**(c(i+3)/2.0_dp)-3.0_dp)
4003 free_energy=c(7)*free_energy
4005 VALUE=xb_energy_per_volume-(free_energy-free_energy_0)
4007 IF (
VALUE .GE. 0.0_dp)
THEN 4024 & c(i)*evalues(1)**(c(i+3)/2.0_dp-1.0_dp)*temp1+ &
4025 & c(i)*evalues(2)**(c(i+3)/2.0_dp-1.0_dp)*temp2+ &
4026 & c(i)*evalues(3)**(c(i+3)/2.0_dp-1.0_dp)*temp3
4028 slope=temp(1,1)*c(7)
4029 lambda_a=lambda_a-
VALUE/slope
4036 f_a_inv(1,1)=1.0_dp/lambda_a
4047 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
4048 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4049 lwork=min(lwmax,int(work(1)))
4050 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
4051 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4058 ematrix_1(i,j)=evector_1(i)*evector_1(j)
4059 ematrix_2(i,j)=evector_2(i)*evector_2(j)
4060 ematrix_3(i,j)=evector_3(i)*evector_3(j)
4073 free_energy=free_energy+c(i)/c(i+3)*( &
4074 & evalues(1)**(c(i+3)/2.0_dp)+ &
4075 & evalues(2)**(c(i+3)/2.0_dp)+ &
4076 & evalues(3)**(c(i+3)/2.0_dp)-3.0_dp)
4078 free_energy=c(7)*free_energy
4080 VALUE=xb_energy_per_volume-(free_energy-free_energy_0)
4129 piola_tensor=piola_tensor+ &
4130 & c(i)*evalues(1)**(c(i+3)/2.0_dp-1.0_dp)*n1+ &
4131 & c(i)*evalues(2)**(c(i+3)/2.0_dp-1.0_dp)*n2+ &
4132 & c(i)*evalues(3)**(c(i+3)/2.0_dp-1.0_dp)*n3
4134 piola_tensor=piola_tensor*c(7)+2.0_dp*p*azu
4139 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
4140 node1=dependent_field%decomposition%domain(1)%ptr%topology%elements%elements(element_number)%element_nodes(13)
4141 node2=dependent_field%decomposition%domain(1)%ptr%topology%elements%elements(element_number)%element_nodes(15)
4143 NULLIFY(field_variable)
4145 CALL field_variable_get(dependent_field,field_v_variable_type,field_variable,err,error,*999)
4146 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
4147 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,left_node(1), &
4149 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
4150 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,left_node(2), &
4152 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
4153 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,left_node(3), &
4156 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
4157 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,right_node(1), &
4159 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
4160 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,right_node(2), &
4162 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
4163 CALL field_parameter_set_get_local_dof(dependent_field,field_v_variable_type,field_values_set_type,dof_idx,right_node(3), &
4166 dist1=sqrt((right_node(1)-left_node(1))*(right_node(1)-left_node(1))+ &
4167 & (right_node(2)-left_node(2))*(right_node(2)-left_node(2))+ &
4168 & (right_node(3)-left_node(3))*(right_node(3)-left_node(3)))
4170 NULLIFY(field_variable)
4172 CALL field_variable_get(dependent_field,field_u_variable_type,field_variable,err,error,*999)
4173 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
4174 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,left_node(1), &
4176 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
4177 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,left_node(2), &
4179 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node1)%DERIVATIVES(1)%VERSIONS(1)
4180 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,left_node(3), &
4183 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
4184 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,right_node(1), &
4186 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
4187 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,right_node(2), &
4189 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%NODE_PARAM2DOF_MAP%NODES(node2)%DERIVATIVES(1)%VERSIONS(1)
4190 CALL field_parameter_set_get_local_dof(dependent_field,field_u_variable_type,field_values_set_type,dof_idx,right_node(3), &
4193 dist2=sqrt((right_node(1)-left_node(1))*(right_node(1)-left_node(1))+ &
4194 & (right_node(2)-left_node(2))*(right_node(2)-left_node(2))+ &
4195 & (right_node(3)-left_node(3))*(right_node(3)-left_node(3)))
4198 velo=(dist2-dist1)/delta_t
4204 CALL field_parameter_set_update_gauss_point(dependent_field,field_u1_variable_type,field_values_set_type,gauss_point_number, &
4205 & element_number,2,velo,err,error,*999)
4209 NULLIFY(independent_field)
4210 independent_field=>equations_set%INDEPENDENT%INDEPENDENT_FIELD
4211 NULLIFY(field_variable)
4212 CALL field_variable_get(independent_field,field_u_variable_type,field_variable,err,error,*999)
4214 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4216 CALL field_parameter_set_get_local_dof(independent_field,field_u_variable_type,field_values_set_type,dof_idx,a_1, &
4218 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4220 CALL field_parameter_set_get_local_dof(independent_field,field_u_variable_type,field_values_set_type,dof_idx,a_2, &
4222 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4224 CALL field_parameter_set_get_local_dof(independent_field,field_u_variable_type,field_values_set_type,dof_idx,x_1, &
4226 dof_idx=field_variable%COMPONENTS(4)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4228 CALL field_parameter_set_get_local_dof(independent_field,field_u_variable_type,field_values_set_type,dof_idx,x_2, &
4232 sarco_length=dzdnu(1,1)
4234 IF(sarco_length.LE.0.635_dp)
THEN 4236 ELSE IF(sarco_length.LE.0.835_dp)
THEN 4237 force_length=4.2_dp*(sarco_length-0.635_dp)
4238 ELSE IF(sarco_length.LE.1.0_dp)
THEN 4239 force_length=0.84_dp+0.9697_dp*(sarco_length-0.835_dp)
4240 ELSE IF(sarco_length.LE.1.125_dp)
THEN 4242 ELSE IF(sarco_length.LE.1.825_dp)
THEN 4243 force_length=1.0_dp-1.4286_dp*(sarco_length-1.125_dp)
4248 reference_volume=1.4965e+06_dp
4249 max_xb_number_per_volume=120.0_dp*2.0_dp/reference_volume
4250 energy_per_xb=0.5_dp*x_2**2*c(8)
4253 xb_energy_per_volume=max_xb_number_per_volume*force_length*energy_per_xb*a_2*10.0_dp**23
4259 f_a_inv(1,1)=1.0_dp/lambda_a
4269 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
4270 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4271 lwork=min(lwmax,int(work(1)))
4272 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
4273 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4280 ematrix_1(i,j)=evector_1(i)*evector_1(j)
4281 ematrix_2(i,j)=evector_2(i)*evector_2(j)
4282 ematrix_3(i,j)=evector_3(i)*evector_3(j)
4293 free_energy_0=0.0_dp
4295 free_energy_0=free_energy_0+c(i)/c(i+3)*( &
4296 & evalues(1)**(c(i+3)/2.0_dp)+ &
4297 & evalues(2)**(c(i+3)/2.0_dp)+ &
4298 & evalues(3)**(c(i+3)/2.0_dp)-3.0_dp)
4300 free_energy_0=c(7)*free_energy_0
4302 free_energy=free_energy_0
4304 VALUE=xb_energy_per_volume-(free_energy-free_energy_0)
4315 DO WHILE (abs(
VALUE).GE.tol)
4318 IF (abs(
VALUE).GE.tol1)
THEN 4319 lambda_a=up-(up-low)/2.0_dp
4322 IF(lambda_a<tol)
THEN 4323 CALL flagwarning(
"lambda_a is close to zero",err,error,*999)
4327 lambda_a=lambda_a+tol
4329 f_a_inv(1,1)=1.0_dp/lambda_a
4337 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
4338 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4339 lwork=min(lwmax,int(work(1)))
4340 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
4341 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4348 ematrix_1(i,j)=evector_1(i)*evector_1(j)
4349 ematrix_2(i,j)=evector_2(i)*evector_2(j)
4350 ematrix_3(i,j)=evector_3(i)*evector_3(j)
4363 free_energy=free_energy+c(i)/c(i+3)*( &
4364 & evalues(1)**(c(i+3)/2.0_dp)+ &
4365 & evalues(2)**(c(i+3)/2.0_dp)+ &
4366 & evalues(3)**(c(i+3)/2.0_dp)-3.0_dp)
4368 free_energy=c(7)*free_energy
4370 VALUE=xb_energy_per_volume-(free_energy-free_energy_0)
4372 IF (
VALUE.GE.0)
THEN 4390 & c(i)*evalues(1)**(c(i+3)/2.0_dp-1.0_dp)*temp1+ &
4391 & c(i)*evalues(2)**(c(i+3)/2.0_dp-1.0_dp)*temp2+ &
4392 & c(i)*evalues(3)**(c(i+3)/2.0_dp-1.0_dp)*temp3
4394 slope=temp(1,1)*c(7)
4395 lambda_a=lambda_a-
VALUE/slope
4402 f_a_inv(1,1)=1.0_dp/lambda_a
4410 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
4411 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4412 lwork=min(lwmax,int(work(1)))
4413 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
4414 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4421 ematrix_1(i,j)=evector_1(i)*evector_1(j)
4422 ematrix_2(i,j)=evector_2(i)*evector_2(j)
4423 ematrix_3(i,j)=evector_3(i)*evector_3(j)
4436 free_energy=free_energy+c(i)/c(i+3)*( &
4437 & evalues(1)**(c(i+3)/2.0_dp)+ &
4438 & evalues(2)**(c(i+3)/2.0_dp)+ &
4439 & evalues(3)**(c(i+3)/2.0_dp)-3.0_dp)
4441 free_energy=c(7)*free_energy
4443 VALUE=xb_energy_per_volume-(free_energy-free_energy_0)
4449 piola_tensor=piola_tensor+ &
4450 & c(i)*evalues(1)**(c(i+3)/2.0_dp-1.0_dp)*n1+ &
4451 & c(i)*evalues(2)**(c(i+3)/2.0_dp-1.0_dp)*n2+ &
4452 & c(i)*evalues(3)**(c(i+3)/2.0_dp-1.0_dp)*n3
4454 piola_tensor=piola_tensor*c(7)+2.0_dp*p*azu
4457 lambda_f=sqrt(azl(1,1))
4458 CALL field_parameter_set_update_gauss_point(dependent_field,field_u1_variable_type,field_values_set_type,gauss_point_number, &
4459 & element_number,1,lambda_f,err,error,*999)
4464 NULLIFY(independent_field)
4465 independent_field=>equations_set%INDEPENDENT%INDEPENDENT_FIELD
4466 NULLIFY(field_variable)
4467 CALL field_variable_get(independent_field,field_u_variable_type,field_variable,err,error,*999)
4469 dof_idx=field_variable%COMPONENTS(5)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4471 CALL field_parameter_set_get_local_dof(independent_field,field_u_variable_type,field_values_set_type,dof_idx,lambda_a, &
4475 f_a_inv(1,1)=1.0_dp/lambda_a
4485 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
4486 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4487 lwork=min(lwmax,int(work(1)))
4488 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
4489 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
4496 ematrix_1(i,j)=evector_1(i)*evector_1(j)
4497 ematrix_2(i,j)=evector_2(i)*evector_2(j)
4498 ematrix_3(i,j)=evector_3(i)*evector_3(j)
4511 piola_tensor=piola_tensor+ &
4512 & c(i)*evalues(1)**(c(i+3)/2.0_dp-1.0_dp)*n1+ &
4513 & c(i)*evalues(2)**(c(i+3)/2.0_dp-1.0_dp)*n2+ &
4514 & c(i)*evalues(3)**(c(i+3)/2.0_dp-1.0_dp)*n3
4516 piola_tensor=piola_tensor*c(7)+2.0_dp*p*azu
4531 piola_tensor(1,3)=2.0_dp*(c(2)*(-azl(3,1)))+p*azu(1,3)
4532 piola_tensor(2,3)=2.0_dp*(c(2)*(-azl(3,2)))+p*azu(2,3)
4533 piola_tensor(3,1)=piola_tensor(1,3)
4534 piola_tensor(3,2)=piola_tensor(2,3)
4535 piola_tensor(3,3)=2.0_dp*(c(1)+c(2)*(azl(1,1)+azl(2,2)))+p*azu(3,3)
4539 azl(3,3) = 1.0_dp / ((azl(1,1) * azl(2,2)) - (azl(1,2) * azl(2,1)))
4541 p = -1.0_dp*((c(1) + c(2) * (azl(1,1) + azl(2,2))) * azl(3,3))
4543 piola_tensor(:,3) = 0.0_dp
4544 piola_tensor(3,:) = 0.0_dp
4546 piola_tensor(1,1)=2.0_dp*(c(1)+c(2)*(azl(2,2)+azl(3,3)))+p*azu(1,1)
4547 piola_tensor(1,2)=2.0_dp*( c(2)*(-azl(2,1)))+p*azu(1,2)
4548 piola_tensor(2,1)=piola_tensor(1,2)
4549 piola_tensor(2,2)=2.0_dp*(c(1)+c(2)*(azl(3,3)+azl(1,1)))+p*azu(2,2)
4552 SELECT CASE(equations_set_subtype)
4558 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
4559 & field_u_variable_type,field_values_set_type,gauss_point_number,element_number,1,active_stress_11, &
4562 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
4563 & field_u_variable_type,field_values_set_type,gauss_point_number,element_number,2,active_stress_22, &
4566 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
4567 & field_u_variable_type,field_values_set_type,gauss_point_number,element_number,3,active_stress_33, &
4570 piola_tensor(1,1)=piola_tensor(1,1)+active_stress_11
4571 piola_tensor(2,2)=piola_tensor(2,2)+active_stress_22
4572 piola_tensor(3,3)=piola_tensor(3,3)+active_stress_33
4576 piola_tensor(1,1)=piola_tensor(1,1)+independent_interpolated_point%VALUES(1,
no_part_deriv)
4580 IF(azl(1,1) > 1.0_dp)
THEN 4581 piola_tensor(1,1)=piola_tensor(1,1)+c(3)/azl(1,1)*(azl(1,1)**(c(4)/2.0_dp)-1.0_dp)
4584 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
4585 & field_u_variable_type,field_values_set_type,gauss_point_number,element_number,1,
VALUE, &
4588 VALUE=
VALUE/sqrt(azl(1,1))*c(5)
4597 piola_tensor(1,1)=piola_tensor(1,1)+
VALUE 4601 IF(azl(1,1) > 1.0_dp)
THEN 4602 piola_tensor(1,1)=piola_tensor(1,1)+c(3)/azl(1,1)*(azl(1,1)**(c(4)/2.0_dp)-1.0_dp)
4605 CALL field_variable_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,field_variable,err,error,*999)
4606 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4608 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
4609 & field_values_set_type,dof_idx,
VALUE,err,error,*999)
4611 IF(
VALUE.LT.0.0_dp)
VALUE=0.0_dp
4614 VALUE=
VALUE/sqrt(azl(1,1))*c(5)
4616 piola_tensor(1,1)=piola_tensor(1,1)+
VALUE 4619 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4621 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
4622 & field_values_set_type,dof_idx,titin_unbound,err,error,*999)
4624 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4626 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
4627 & field_values_set_type,dof_idx,titin_bound,err,error,*999)
4629 dof_idx=field_variable%COMPONENTS(6)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4631 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
4632 & field_values_set_type,dof_idx,activation,err,error,*999)
4634 IF(activation.GT.1.0_dp) activation=1.0_dp
4635 IF(activation.LT.0.0_dp) activation=0.0_dp
4638 activation=c(6)*activation
4641 titin_value=activation*titin_bound+(1.0_dp-activation)*titin_unbound
4644 titin_value=titin_value/sqrt(azl(1,1))*c(5)
4646 piola_tensor(1,1)=piola_tensor(1,1)+titin_value
4649 dof_idx=field_variable%COMPONENTS(4)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4651 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
4652 & field_values_set_type,dof_idx,titin_unbound_cross_fibre,err,error,*999)
4654 dof_idx=field_variable%COMPONENTS(5)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4656 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
4657 & field_values_set_type,dof_idx,titin_bound_cross_fibre,err,error,*999)
4660 titin_value_cross_fibre=activation*titin_bound_cross_fibre+(1.0_dp-activation)*titin_unbound_cross_fibre
4662 titin_value_cross_fibre=titin_value_cross_fibre*c(5)
4664 piola_tensor(2,2)=piola_tensor(2,2)+titin_value_cross_fibre
4665 piola_tensor(3,3)=piola_tensor(3,3)+titin_value_cross_fibre
4669 IF(azl(1,1) > 1.0_dp)
THEN 4672 piola_tensor(1,1)=piola_tensor(1,1)+0.355439810963035_dp/azl(1,1)*(azl(1,1)**(12.660539325481963_dp/2.0_dp)-1.0_dp)
4675 IF(azl(2,2) > 1.0_dp)
THEN 4676 piola_tensor(2,2)=piola_tensor(2,2)+5316.372204148964_dp/azl(2,2)*(azl(2,2)**(0.014991843974911_dp/2.0_dp)-1.0_dp)
4678 IF(azl(3,3) > 1.0_dp)
THEN 4679 piola_tensor(3,3)=piola_tensor(3,3)+5316.372204148964_dp/azl(3,3)*(azl(3,3)**(0.014991843974911_dp/2.0_dp)-1.0_dp)
4683 CALL field_variable_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,field_variable,err,error,*999)
4684 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_point_number, &
4686 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
4687 & field_values_set_type,dof_idx,
VALUE,err,error,*999)
4692 VALUE=
VALUE/sqrt(azl(1,1))*c(5)
4699 val2=100.0_dp*(sqrt(azl(1,1))-1)
4700 VALUE=
VALUE+val2/sqrt(azl(1,1))
4701 piola_tensor(1,1)=piola_tensor(1,1)+
VALUE 4715 IF(azl(1,1) > 1.0_dp)
THEN 4716 piola_tensor(1,1)=piola_tensor(1,1)+c(3)/azl(1,1)*(azl(1,1)**(c(4)/2.0_dp)-1.0_dp)
4724 IF(azl(1,1) > 1.0_dp)
THEN 4725 piola_tensor(1,1)=piola_tensor(1,1)+c(3)/azl(1,1)*(azl(1,1)**(c(4)/2.0_dp)-1.0_dp)
4728 if((sqrt(azl(1,1))>0.72_dp).AND.(sqrt(azl(1,1))<1.68_dp))
then 4730 VALUE=(-25.0_dp/4.0_dp*azl(1,1)/1.2_dp/1.2_dp + 25.0_dp/2.0_dp*sqrt(azl(1,1))/1.2_dp - 5.25_dp)
4731 VALUE=
VALUE*(1.0_dp/sqrt(azl(1,1)))*20.0_dp*c(5)
4732 piola_tensor(1,1)=piola_tensor(1,1)+
VALUE 4747 IF(azl(1,1) > 1.0_dp)
THEN 4748 piola_tensor(1,1)=piola_tensor(1,1)+c(3)/azl(1,1)*(azl(1,1)**(c(4)/2.0_dp)-1.0_dp)
4750 IF(azl(2,2) > 1.0_dp)
THEN 4751 piola_tensor(2,2)=piola_tensor(2,2)+c(5)/azl(2,2)*(azl(2,2)**(c(6)/2.0_dp)-1.0_dp)
4753 IF(azl(3,3) > 1.0_dp)
THEN 4754 piola_tensor(3,3)=piola_tensor(3,3)+c(7)/azl(3,3)*(azl(3,3)**(c(8)/2.0_dp)-1.0_dp)
4773 IF(azl(1,1) > 1.0_dp)
THEN 4774 piola_tensor(1,1)=piola_tensor(1,1)+c(3)/azl(1,1)*(azl(1,1)**(c(4)/2.0_dp)-1.0_dp)
4776 IF(azl(2,2) > 1.0_dp)
THEN 4777 piola_tensor(2,2)=piola_tensor(2,2)+c(5)/azl(2,2)*(azl(2,2)**(c(6)/2.0_dp)-1.0_dp)
4779 IF(azl(3,3) > 1.0_dp)
THEN 4780 piola_tensor(3,3)=piola_tensor(3,3)+c(7)/azl(3,3)*(azl(3,3)**(c(8)/2.0_dp)-1.0_dp)
4783 val1=sqrt(azl(1,1))/c(9)
4784 IF((val1>0.7_dp).AND.(val1<1.3_dp))
THEN 4786 VALUE=(-11.1111_dp*val1*val1+22.2222_dp*val1-10.1111_dp)
4788 VALUE=
VALUE*c(10)*c(11)/sqrt(azl(1,1))
4794 val2=c(11)*c(12)*(sqrt(azl(1,1))-1)
4795 VALUE=
VALUE+val2/sqrt(azl(1,1))
4796 piola_tensor(1,1)=piola_tensor(1,1)+
VALUE 4824 val1=c(1)*c(10)+c(5)*(1.0_dp-c(10))
4825 val2=c(2)*c(10)+c(6)*(1.0_dp-c(10))
4828 piola_tensor(1,1)=2.0_dp*(val1+val2*(azl(2,2)+azl(3,3))+p*azu(1,1))
4829 piola_tensor(1,2)=2.0_dp*( val2*(-azl(2,1)) +p*azu(1,2))
4830 piola_tensor(1,3)=2.0_dp*( val2*(-azl(3,1)) +p*azu(1,3))
4831 piola_tensor(2,1)=piola_tensor(1,2)
4832 piola_tensor(2,2)=2.0_dp*(val1+val2*(azl(3,3)+azl(1,1))+p*azu(2,2))
4833 piola_tensor(2,3)=2.0_dp*( val2*(-azl(3,2)) +p*azu(2,3))
4834 piola_tensor(3,1)=piola_tensor(1,3)
4835 piola_tensor(3,2)=piola_tensor(2,3)
4836 piola_tensor(3,3)=2.0_dp*(val1+val2*(azl(1,1)+azl(2,2))+p*azu(3,3))
4839 IF(azl(1,1) > 1.0_dp)
THEN 4840 val1=c(3)/azl(1,1)*(azl(1,1)**(c(4)/2.0_dp)-1.0_dp)
4841 val2=c(7)/azl(1,1)*(azl(1,1)**(c(8)/2.0_dp)-1.0_dp)
4842 piola_tensor(1,1)=piola_tensor(1,1)+(val1*c(10)+val2*(1.0_dp-c(10)))
4846 IF((sqrt(azl(1,1))>0.84_dp).AND.(sqrt(azl(1,1))<1.96_dp))
THEN 4847 VALUE=(-25.0_dp/4.0_dp*azl(1,1)/1.4_dp/1.4_dp + 25.0_dp/2.0_dp*sqrt(azl(1,1))/1.4_dp - 5.25_dp)
4848 VALUE=
VALUE*(1.0_dp/sqrt(azl(1,1)))*c(9)*c(10)*c(11)
4849 piola_tensor(1,1)=piola_tensor(1,1)+
VALUE 4856 piola_tensor=c(1)*c(2)*exp(c(2)*(azl(1,1)+azl(2,2)+azl(3,3)-3.0_dp))*identity+2.0_dp*p*azu
4865 p=darcy_dependent_interpolated_point%VALUES(1,
no_part_deriv)
4867 i1=azl(1,1)+azl(2,2)+azl(3,3)
4868 temp=matmul(azl,azl)
4869 i2=0.5_dp*(
i1**2.0_dp-temp(1,1)-temp(2,2)-temp(3,3))
4873 piola_tensor=2.0_dp*c(1)*jznu**(-2.0_dp/3.0_dp)*(identity-(1.0_dp/3.0_dp)*
i1*azu)
4874 piola_tensor=piola_tensor+2.0_dp*c(2)*jznu**(-4.0_dp/3.0_dp)*(
i1*identity-azlt-(2.0_dp/3.0_dp)*i2*azu)
4875 piola_tensor=piola_tensor+(c(3)-c(4)*c(5)**2)*(jznu-1.0_dp)*azu
4876 piola_tensor=piola_tensor-c(5)*(p-c(6))*jznu*azu
4877 piola_tensor=piola_tensor+0.5_dp*((p-c(6))**2/c(4))*(dfdjfact/(ffact**2))*jznu*azu
4899 i1=azl(1,1)+azl(2,2)+azl(3,3)
4900 temp=matmul(azl,azl)
4901 i2=0.5_dp*(
i1**2.0_dp-temp(1,1)-temp(2,2)-temp(3,3))
4904 tempterm=2.0_dp*c(4)*c(1)*exp(c(2)*(
i1 - 3.0_dp) + c(3)*(i2 - 3.0_dp)) / (i3**(c(2)+2.0_dp*c(3)))
4905 piola_tensor=c(2)*tempterm*identity + c(3)*tempterm*(
i1*identity-azlt) - (c(2)+2.0_dp*c(3))*tempterm*azut
4906 piola_tensor=piola_tensor - darcy_dependent_interpolated_point%VALUES(1,
no_part_deriv)*jznu*azu
4931 i1=azl(1,1)+azl(2,2)+azl(3,3)
4932 temp=matmul(azl,azl)
4933 i2=0.5_dp*(
i1**2.0_dp-temp(1,1)-temp(2,2)-temp(3,3))
4936 tempterm=2.0_dp*c(4)*c(1)*exp(c(2)*(
i1 - 3.0_dp) + c(3)*(i2 - 3.0_dp)) / (i3**(c(2)+2.0_dp*c(3)))
4937 piola_tensor=c(2)*tempterm*identity + c(3)*tempterm*(
i1*identity-azlt) - (c(2)+2.0_dp*c(3))*tempterm*azut
4938 piola_tensor=piola_tensor - darcy_dependent_interpolated_point%VALUES(1,
no_part_deriv)*jznu*azu
4940 IF((sqrt(azl(1,1))>0.72_dp).AND.(sqrt(azl(1,1))<1.68_dp))
THEN 4941 VALUE=(-25.0_dp/4.0_dp*azl(1,1)/1.2_dp/1.2_dp + 25.0_dp/2.0_dp*sqrt(azl(1,1))/1.2_dp - 5.25_dp)
4946 piola_tensor(1,1) = piola_tensor(1,1) + 1.0_dp/sqrt(azl(1,1))*c(5)*c(6)*
VALUE 4952 piola_tensor(1,3)=(2.0_dp*c(2)*e(1,3))+(2.0_dp*p*azu(1,3))
4953 piola_tensor(2,3)=(2.0_dp*c(2)*e(2,3))+(2.0_dp*p*azu(2,3))
4954 piola_tensor(3,1)=piola_tensor(1,3)
4955 piola_tensor(3,2)=piola_tensor(2,3)
4956 piola_tensor(3,3)=c(1)*(e(1,1)+e(2,2)+e(3,3))+(2.0_dp*e(3,3)*c(2)+(2.0_dp*p*azu(3,3)))
4958 piola_tensor(1,1)=c(1)*(e(1,1)+e(2,2)+e(3,3))+(2.0_dp*e(1,1)*c(2)+(2.0_dp*p*azu(1,1)))
4959 piola_tensor(1,2)=(2.0_dp*c(2)*e(1,2))+(2.0_dp*p*azu(1,2))
4960 piola_tensor(2,1)=piola_tensor(1,2)
4961 piola_tensor(2,2)=c(1)*(e(1,1)+e(2,2)+e(3,3))+(2.0_dp*e(2,2)*c(2)+(2.0_dp*p*azu(2,2)))
4963 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
4964 & field_u_variable_type,field_values_set_type,gauss_point_number,element_number,1,active_stress_11, &
4967 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
4968 & field_u_variable_type,field_values_set_type,gauss_point_number,element_number,2,active_stress_22, &
4971 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
4972 & field_u_variable_type, field_values_set_type,gauss_point_number,element_number,3,active_stress_33, &
4975 piola_tensor(1,1)=piola_tensor(1,1)+active_stress_11
4976 piola_tensor(2,2)=piola_tensor(2,2)+active_stress_22
4977 piola_tensor(3,3)=piola_tensor(3,3)+active_stress_33
4985 tempterm=c(1)*exp(2.0*c(2)*(e(1,1)+e(2,2)+e(3,3))+c(3)*e(1,1)**2+c(4)*(e(2,2)**2+e(3,3)**2+2.0_dp*e(2,3)**2)+ &
4986 & c(5)*2.0_dp*(e(1,2)**2+e(1,3)**2))
4987 piola_tensor(1,1)=(c(2)+c(3)*e(1,1))*tempterm+2.0_dp*p*azu(1,1)
4988 piola_tensor(1,2)=c(5)*e(1,2)*tempterm+2.0_dp*p*azu(1,2)
4989 piola_tensor(1,3)=c(5)*e(1,3)*tempterm+2.0_dp*p*azu(1,3)
4990 piola_tensor(2,1)=piola_tensor(1,2)
4991 piola_tensor(2,2)=(c(2)+c(4)*e(2,2))*tempterm+2.0_dp*p*azu(2,2)
4992 piola_tensor(2,3)=c(4)*e(2,3)*tempterm+2.0_dp*p*azu(2,3)
4993 piola_tensor(3,1)=piola_tensor(1,3)
4994 piola_tensor(3,2)=piola_tensor(2,3)
4995 piola_tensor(3,3)=(c(2)+c(4)*e(3,3))*tempterm+2.0_dp*p*azu(3,3)
5000 q=c(2)*e(1,1)**2 + c(3)*(e(2,2)**2+e(3,3)**2+2.0_dp*e(2,3)**2) + 2.0_dp*c(4)*(e(1,2)**2+e(1,3)**2)
5001 tempterm=0.5_dp*c(1)*exp(q)
5002 piola_tensor(1,1) = 2.0_dp*c(2) * e(1,1)
5003 piola_tensor(2,2) = 2.0_dp*c(3) * e(2,2)
5004 piola_tensor(3,3) = 2.0_dp*c(3) * e(3,3)
5005 piola_tensor(1,2) = 2.0_dp*c(4) * e(1,2)
5006 piola_tensor(2,1) = piola_tensor(1,2)
5007 piola_tensor(1,3) = 2.0_dp*c(4) * e(1,3)
5008 piola_tensor(3,1) = piola_tensor(1,3)
5009 piola_tensor(3,2) = 2.0_dp*c(3) * e(2,3)
5010 piola_tensor(2,3) = piola_tensor(3,2)
5011 piola_tensor = piola_tensor * tempterm
5032 piola_tensor = piola_tensor + p*azu
5037 CALL field_variable_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,field_variable,err,error,*999)
5038 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
5039 dof_idx=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP% &
5040 & gauss_points(gauss_point_number,element_number)
5041 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
5042 & field_values_set_type,dof_idx,
VALUE,err,error,*999)
5043 piola_tensor(component_idx,component_idx)=piola_tensor(component_idx,component_idx)+
VALUE 5049 i1=azl(1,1)+azl(2,2)+azl(3,3)
5050 piola_tensor(1,1)=c(1)*c(2)*exp(c(2)*(
i1-3))+ &
5051 & c(3)*2.0_dp*(sqrt(azl(1,1))-1)*c(4)*exp(c(4)*(sqrt(azl(1,1))-1)**2)/(2*sqrt(azl(1,1)))+p*azu(1,1)
5052 piola_tensor(2,2)=c(1)*c(2)*exp(c(2)*(
i1-3))+p*azu(2,2)
5053 piola_tensor(3,3)=c(1)*c(2)*exp(c(2)*(
i1-3))+p*azu(3,3)
5054 piola_tensor(1,2)=p*azu(1,2)
5055 piola_tensor(1,3)=p*azu(1,3)
5056 piola_tensor(2,3)=p*azu(2,3)
5057 piola_tensor(2,1)=piola_tensor(1,2)
5058 piola_tensor(3,1)=piola_tensor(1,3)
5059 piola_tensor(3,2)=piola_tensor(2,3)
5060 piola_tensor=piola_tensor*2.0_dp
5066 a = materials_interpolated_point%VALUES(1,1)
5067 b(1,1) = materials_interpolated_point%VALUES(1+1,1)
5068 b(1,2) = materials_interpolated_point%VALUES(1+2,1)
5069 b(1,3) = materials_interpolated_point%VALUES(1+3,1)
5071 b(2,2) = materials_interpolated_point%VALUES(1+4,1)
5072 b(2,3) = materials_interpolated_point%VALUES(1+5,1)
5075 b(3,3) = materials_interpolated_point%VALUES(1+6,1)
5080 e(i,j) = 0.5_dp * (azl(i,j)-1);
5082 e(i,j) = 0.5_dp * azl(i,j);
5084 q = q + b(i,j) * e(i,j) * e(i,j)
5090 piola_tensor(i,j)=a*b(i,j)*e(i,j)*q + p*azu(i,j);
5096 & equations_set%EQUATIONS%INTERPOLATION%MATERIALS_FIELD, piola_tensor(1,1),e(1,1), &
5097 & element_number,gauss_point_number,err,error,*999)
5104 c(1)=materials_interpolated_point%VALUES(1,1)
5105 c(2)=materials_interpolated_point%VALUES(2,1)
5107 piola_tensor(1,1)=c(1)+c(2)*(azl(2,2)+azl(3,3))
5108 piola_tensor(1,2)=c(2)*(-azl(2,1))
5109 piola_tensor(1,3)=c(2)*(-azl(3,1))
5110 piola_tensor(2,1)=piola_tensor(1,2)
5111 piola_tensor(2,2)=c(1)+c(2)*(azl(3,3)+azl(1,1))
5112 piola_tensor(2,3)=c(2)*(-azl(3,2))
5113 piola_tensor(3,1)=piola_tensor(1,3)
5114 piola_tensor(3,2)=piola_tensor(2,3)
5115 piola_tensor(3,3)=c(1)+c(2)*(azl(1,1)+azl(2,2))
5116 piola_tensor=piola_tensor*2.0_dp
5122 & 3,3,azl,
write_string_matrix_name_and_indices,
'(" AZL',
'(",I1,",:)',
' :",3(X,E13.6))', &
5123 &
'(17X,3(X,E13.6))',err,error,*999)
5128 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
5129 & field_u_variable_type,field_values_set_type,gauss_point_number,element_number,1,active_stress_11, &
5132 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
5133 & field_u_variable_type,field_values_set_type,gauss_point_number,element_number,2,active_stress_22, &
5136 CALL field_parametersetgetlocalgausspoint(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
5137 & field_u_variable_type,field_values_set_type,gauss_point_number,element_number,3,active_stress_33, &
5140 piola_tensor(1,1)=piola_tensor(1,1)+active_stress_11
5141 piola_tensor(2,2)=piola_tensor(2,2)+active_stress_22
5142 piola_tensor(3,3)=piola_tensor(3,3)+active_stress_33
5146 c(3)=materials_interpolated_point%VALUES(3,1)
5147 piola_tensor=piola_tensor+2.0_dp*c(3)*(i3-sqrt(i3))*azu
5151 SELECT CASE (equations_set_subtype)
5153 c(3)=materials_interpolated_point%VALUES(3,1)
5159 piola_tensor=piola_tensor+c(3)*(sqrt(i3)-1.0_dp)*azu
5160 darcy_mass_increase_entry = 5
5176 c(1)=materials_interpolated_point%VALUES(1,1)
5177 c(2)=materials_interpolated_point%VALUES(2,1)
5178 c(3)=materials_interpolated_point%VALUES(3,1)
5181 tempterm=jznu**(-2.0_dp/3.0_dp)
5185 i1=azl(1,1)+azl(2,2)+azl(3,3)
5186 piola_tensor=c(1)* (temp-1.0_dp/3.0_dp*
i1*tempterm*azu)
5189 temp=matmul(azl,azl)
5190 i2=0.5_dp*(
i1**2.0_dp-(temp(1,1)+temp(2,2)+temp(3,3)))
5191 tempterm=jznu**(-4.0_dp/3.0_dp)
5193 temp(1,1)=azl(2,2)+azl(3,3)
5195 temp(1,2)=-1.0_dp*azl(1,2)
5197 temp(1,3)=-1.0_dp*azl(1,3)
5199 temp(2,2)=azl(1,1)+azl(3,3)
5201 temp(2,3)=-1.0_dp*azl(2,3)
5204 temp(3,3)=azl(1,1)+azl(2,2)
5205 piola_tensor=piola_tensor+c(2)* (tempterm*temp-2.0_dp/3.0_dp*i2*tempterm*azu)
5208 piola_tensor=piola_tensor+(2.0_dp*c(3)*(jznu-1.0_dp)+p)*jznu*azu
5211 piola_tensor=2.0_dp*piola_tensor
5214 darcy_mass_increase_entry = 4
5245 c(1)=materials_interpolated_point%VALUES(1,1)
5246 c(2)=materials_interpolated_point%VALUES(2,1)
5247 c(3)=materials_interpolated_point%VALUES(3,1)
5248 c(4)=materials_interpolated_point%VALUES(4,1)
5249 c(5)=materials_interpolated_point%VALUES(5,1)
5250 c(6)=materials_interpolated_point%VALUES(6,1)
5251 c(7)=materials_interpolated_point%VALUES(7,1)
5252 c(8)=materials_interpolated_point%VALUES(8,1)
5253 i1=azl(1,1)+azl(2,2)+azl(3,3)
5254 tempterm=c(1)*exp(c(2)*(
i1-3.0_dp))
5255 piola_tensor(1,1)=-p*azu(1,1)+tempterm
5256 IF(azl(1,1)>1.0_dp)
THEN 5257 piola_tensor(1,1)=piola_tensor(1,1)+2.0_dp*c(3)*(azl(1,1)-1.0_dp)*exp(c(5)*(azl(1,1)-1.0_dp)**2.0_dp)
5259 piola_tensor(1,2)=-p*azu(1,2)+c(7)*azl(1,2)*exp(c(8)*azl(1,2)**2.0_dp)
5260 piola_tensor(1,3)=-p*azu(1,3)
5261 piola_tensor(2,1)=piola_tensor(1,2)
5262 piola_tensor(2,2)=-p*azu(2,2)+tempterm
5263 IF(azl(2,2)>1.0_dp)
THEN 5264 piola_tensor(2,2)=piola_tensor(2,2)+2.0_dp*c(4)*(azl(2,2)-1.0_dp)*exp(c(6)*(azl(2,2)-1.0_dp)**2.0_dp)
5266 piola_tensor(2,3)=-p*azu(2,3)
5267 piola_tensor(3,1)=piola_tensor(1,3)
5268 piola_tensor(3,2)=piola_tensor(2,3)
5269 piola_tensor(3,3)=-p*azu(3,3)+tempterm
5275 CALL field_variable_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,field_variable,err,error,*999)
5276 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
5277 dof_idx=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP% &
5278 & gauss_points(gauss_point_number,element_number)
5279 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
5280 & field_values_set_type,dof_idx,
VALUE,err,error,*999)
5281 piola_tensor(component_idx,component_idx)=piola_tensor(component_idx,component_idx)+
VALUE 5286 local_error=
"The third equations set specification of "//
trim(
number_to_vstring(equations_set_subtype,
"*",err,error))// &
5287 &
" is not valid for a finite elasticity type of an elasticity equation set." 5288 CALL flagerror(local_error,err,error,*999)
5294 cauchy_tensor=cauchy_tensor/jznu
5299 & 3,3,piola_tensor,
write_string_matrix_name_and_indices,
'(" PIOLA_TENSOR',
'(",I1,",:)',
' :",3(X,E13.6))', &
5300 &
'(17X,3(X,E13.6))',err,error,*999)
5302 & 3,3,cauchy_tensor,
write_string_matrix_name_and_indices,
'(" CAUCHY_TENSOR',
'(",I1,",:)',
' :",3(X,E13.6))', &
5303 &
'(17X,3(X,E13.6))',err,error,*999)
5307 exits(
"FINITE_ELASTICITY_GAUSS_CAUCHY_TENSOR")
5309 999 errorsexits(
"FINITE_ELASTICITY_GAUSS_CAUCHY_TENSOR",err,error)
5319 & dependentfield, deformationgradienttensor,growthtensor,elasticdeformationgradienttensor,jg,je,err,error,*)
5323 INTEGER(INTG),
INTENT(IN) :: numberOfDimensions
5324 INTEGER(INTG),
INTENT(IN) :: gaussPointNumber
5325 INTEGER(INTG),
INTENT(IN) :: elementNumber
5327 REAL(DP),
INTENT(IN) :: deformationGradientTensor(3,3)
5328 REAL(DP),
INTENT(OUT) :: growthTensor(3,3)
5329 REAL(DP),
INTENT(OUT) :: elasticDeformationGradientTensor(3,3)
5330 REAL(DP),
INTENT(OUT) :: Jg
5331 REAL(DP),
INTENT(OUT) :: Je
5332 INTEGER(INTG),
INTENT(OUT) :: err
5335 REAL(DP) :: growthTensorInverse(3,3), growthTensorInverseTranspose(3,3)
5337 enters(
"FiniteElasticity_GaussGrowthTensor",err,error,*999)
5339 IF(
ASSOCIATED(equationsset))
THEN 5342 CALL field_parametersetgetlocalgausspoint(dependentfield,field_u3_variable_type,field_values_set_type, &
5343 & gausspointnumber,elementnumber,1,growthtensor(1,1),err,error,*999)
5344 IF(numberofdimensions>1)
THEN 5345 CALL field_parametersetgetlocalgausspoint(dependentfield,field_u3_variable_type,field_values_set_type, &
5346 & gausspointnumber,elementnumber,2,growthtensor(2,2),err,error,*999)
5347 IF(numberofdimensions>2)
THEN 5348 CALL field_parametersetgetlocalgausspoint(dependentfield,field_u3_variable_type,field_values_set_type, &
5349 & gausspointnumber,elementnumber,3,growthtensor(3,3),err,error,*999)
5353 CALL invert(growthtensor,growthtensorinverse,jg,err,error,*999)
5355 CALL matrixproduct(deformationgradienttensor,growthtensorinverse,elasticdeformationgradienttensor,err,error,*999)
5358 elasticdeformationgradienttensor=deformationgradienttensor
5360 je=
determinant(elasticdeformationgradienttensor,err,error)
5363 CALL flagerror(
"Equations set is not associated.",err,error,*999)
5370 CALL writestringmatrix(
diagnostic_output_type,1,1,3,1,1,3,3,3,deformationgradienttensor, &
5371 &
write_string_matrix_name_and_indices,
'(" F',
'(",I1,",:)',
' :",3(X,E13.6))',
'(13X,3(X,E13.6))',err,error,*999)
5375 CALL writestringmatrix(
diagnostic_output_type,1,1,3,1,1,3,3,3,elasticdeformationgradienttensor, &
5376 &
write_string_matrix_name_and_indices,
'(" Fe',
'(",I1,",:)',
' :",3(X,E13.6))',
'(13X,3(X,E13.6))',err,error,*999)
5379 CALL writestringmatrix(
diagnostic_output_type,1,1,3,1,1,3,3,3,growthtensor, &
5380 &
write_string_matrix_name_and_indices,
'(" Fg',
'(",I1,",:)',
' :",3(X,E13.6))',
'(13X,3(X,E13.6))',err,error,*999)
5384 exits(
"FiniteElasticity_GaussGrowthTensor")
5386 999 errorsexits(
"FiniteElasticity_GaussGrowthTensor",err,error)
5397 & fingerdeformationtensor, jacobian,greenstraintensor,err,error,*)
5400 REAL(DP),
INTENT(IN) :: deformationGradientTensor(3,3)
5401 REAL(DP),
INTENT(OUT) :: rightCauchyDeformationTensor(3,3)
5402 REAL(DP),
INTENT(OUT) :: fingerDeformationTensor(3,3)
5403 REAL(DP),
INTENT(OUT) :: Jacobian
5404 REAL(DP),
INTENT(OUT) :: greenStrainTensor(3,3)
5405 INTEGER(INTG),
INTENT(OUT) :: err
5411 enters(
"FiniteElasticity_StrainTensor",err,error,*999)
5413 CALL matrixtransposeproduct(deformationgradienttensor,deformationgradienttensor,rightcauchydeformationtensor,err,error,*999)
5414 CALL invert(rightcauchydeformationtensor,fingerdeformationtensor,i3,err,error,*999)
5415 jacobian=
determinant(deformationgradienttensor,err,error)
5417 greenstraintensor=0.5_dp*rightcauchydeformationtensor
5419 greenstraintensor(i,i)=greenstraintensor(i,i)-0.5_dp
5428 &
' :",3(X,E13.6))',
'(12X,3(X,E13.6))',err,error,*999)
5432 &
' :",3(X,E13.6))',
'(12X,3(X,E13.6))',err,error,*999)
5437 &
' :",3(X,E13.6))',
'(12X,3(X,E13.6))',err,error,*999)
5440 exits(
"FiniteElasticity_StrainTensor")
5442 999 errorsexits(
"FiniteElasticity_StrainTensor",err,error)
5453 & materials_interpolated_point,stress_tensor,dzdnu,jznu,
element_number,gauss_point_number,err,error,*)
5458 REAL(DP),
INTENT(OUT) :: STRESS_TENSOR(:)
5459 REAL(DP),
INTENT(IN) :: DZDNU(3,3)
5460 REAL(DP),
INTENT(IN) :: Jznu
5461 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER,GAUSS_POINT_NUMBER
5462 INTEGER(INTG),
INTENT(OUT) :: ERR
5465 INTEGER(INTG) :: PRESSURE_COMPONENT,component_idx,dof_idx
5468 REAL(DP) :: TEMPTERM1,TEMPTERM2,
VALUE 5469 REAL(DP) :: ONETHIRD_TRACE
5472 REAL(DP) :: MOD_DZDNU(3,3),MOD_DZDNUT(3,3),AZL(3,3)
5473 REAL(DP) :: B(6),E(6),DQ_DE(6)
5474 REAL(DP),
POINTER :: C(:)
5476 enters(
"FINITE_ELASTICITY_GAUSS_STRESS_TENSOR",err,error,*999)
5478 NULLIFY(field_variable,c)
5483 mod_dzdnu=dzdnu*jznu**(-1.0_dp/3.0_dp)
5488 SELECT CASE(equations_set%specification(3))
5490 pressure_component=dependent_interpolated_point%INTERPOLATION_PARAMETERS%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
5491 p=dependent_interpolated_point%VALUES(pressure_component,
no_part_deriv)
5496 i1=azl(1,1)+azl(2,2)+azl(3,3)
5497 tempterm1=-2.0_dp*c(2)
5498 tempterm2=2.0_dp*(c(1)+
i1*c(2))
5499 stress_tensor(1)=tempterm1*azl(1,1)+tempterm2
5500 stress_tensor(2)=tempterm1*azl(2,2)+tempterm2
5501 stress_tensor(3)=tempterm1*azl(3,3)+tempterm2
5502 stress_tensor(4)=tempterm1*azl(2,1)
5503 stress_tensor(5)=tempterm1*azl(3,1)
5504 stress_tensor(6)=tempterm1*azl(3,2)
5510 CALL field_variable_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,field_variable,err,error,*999)
5511 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
5512 dof_idx=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP% &
5513 & gauss_points(gauss_point_number,element_number)
5514 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
5515 & field_values_set_type,dof_idx,
VALUE,err,error,*999)
5516 stress_tensor(component_idx)=stress_tensor(component_idx)+
VALUE 5523 onethird_trace=sum(stress_tensor(1:3))/3.0_dp
5524 stress_tensor(1:3)=stress_tensor(1:3)-onethird_trace+p
5527 pressure_component=dependent_interpolated_point%INTERPOLATION_PARAMETERS%FIELD_VARIABLE%NUMBER_OF_COMPONENTS
5528 p=dependent_interpolated_point%VALUES(pressure_component,
no_part_deriv)
5529 b=[2.0_dp*c(2),2.0_dp*c(3),2.0_dp*c(3),c(4),c(4),c(3)]
5530 e=[0.5_dp*(azl(1,1)-1.0_dp),0.5_dp*(azl(2,2)-1.0_dp),0.5_dp*(azl(3,3)-1.0_dp),azl(2,1),azl(3,1),azl(3,2)]
5532 tempterm1=0.5_dp*c(1)*exp(0.5_dp*dot_product(e,dq_de))
5534 stress_tensor=tempterm1*dq_de
5539 CALL field_variable_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type,field_variable,err,error,*999)
5540 DO component_idx=1,field_variable%NUMBER_OF_COMPONENTS
5541 dof_idx=field_variable%COMPONENTS(component_idx)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP% &
5542 & gauss_points(gauss_point_number,element_number)
5543 CALL field_parameter_set_get_local_dof(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
5544 & field_values_set_type,dof_idx,
VALUE,err,error,*999)
5545 stress_tensor(component_idx)=stress_tensor(component_idx)+
VALUE 5551 onethird_trace=sum(stress_tensor(1:3))/3.0_dp
5552 stress_tensor(1:3)=stress_tensor(1:3)-onethird_trace+p
5554 local_error=
"The third equations set specification of "// &
5556 &
" is not valid for a finite elasticity type of an elasticity equation set." 5557 CALL flagerror(local_error,err,error,*999)
5560 exits(
"FINITE_ELASTICITY_GAUSS_STRESS_TENSOR")
5562 999 errorsexits(
"FINITE_ELASTICITY_GAUSS_STRESS_TENSOR",err,error)
5575 TYPE(
field_type),
POINTER,
INTENT(IN) :: INDEPENDENT_FIELD, MATERIALS_FIELD
5576 REAL(DP),
INTENT(INOUT) :: PIOLA_FF
5577 REAL(DP),
INTENT(IN) :: E_FF
5578 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER,GAUSS_POINT_NUMBER
5579 INTEGER(INTG),
INTENT(OUT) :: ERR
5583 REAL(DP) :: S, LAMBDA, ISO_TA, TA, ACTIVTIME, TIME, DT
5584 REAL(DP),
DIMENSION(1:4) :: QL
5586 REAL(DP),
PARAMETER :: PERIOD = 1000
5587 REAL(DP),
PARAMETER,
DIMENSION(28) :: TIMES = [ 0, 20, 30, 40, 60, 80, 100, 120, 150, 160, 170, 175, 180, 190, 200,&
5588 & 225, 250, 300, 333, 366, 400, 450, 500, 600, 700, 800, 900,1000 ]
5590 REAL(DP),
PARAMETER,
DIMENSION(28) :: TENSIONFRAC = [ 0.0194, 0.0193, 0.0200, 0.0254, 0.0778, 0.1713, 0.2794, 0.3708,&
5591 & 0.4472, 0.4578, 0.4624, 0.4627, 0.4618, 0.4567, 0.4478, 0.4121, 0.3614, 0.2326, 0.1471, 0.0920, 0.0681, 0.0526, 0.0438,&
5592 & 0.0332, 0.0271, 0.0234, 0.0210, 0.0194 ]
5593 real(
dp),
PARAMETER :: t_ref = 100
5595 enters(
"FiniteElasticity_PiolaAddActiveContraction",err,error,*999)
5598 CALL field_parameter_set_get_constant(independent_field,field_u_variable_type,field_values_set_type, 1, dt,err,error,*999)
5599 CALL field_parameter_set_get_constant(independent_field,field_u_variable_type,field_values_set_type, 2, time,err,error,*999)
5601 CALL field_parametersetgetlocalgausspoint(independent_field,field_u_variable_type,&
5602 & field_values_set_type,gauss_point_number,element_number,2+i,ql(i),err,error,*999)
5606 CALL field_parametersetgetlocalgausspoint(materials_field,field_v_variable_type,&
5607 & field_values_set_type,gauss_point_number,element_number,1,activtime,err,error,*999)
5609 lambda = sqrt(2*e_ff + 1)
5610 time = max( mod(time, period) - activtime, 0.0)
5613 DO WHILE (times(i) <= time)
5616 s = (time - times(i-1)) / (times(i) - times(i-1))
5617 iso_ta = t_ref * (tensionfrac(i-1) * (1-s) + tensionfrac(i) * s)
5623 CALL field_parameter_set_update_gauss_point(independent_field,field_u_variable_type,&
5624 & field_values_set_type,gauss_point_number,element_number, 6+i, ql(i),err,error,*999)
5627 piola_ff = piola_ff + ta
5629 exits(
"FiniteElasticity_PiolaAddActiveContraction")
5631 999 errorsexits(
"FiniteElasticity_PiolaAddActiveContraction",err,error)
5643 REAL(DP),
PARAMETER,
DIMENSION(1:3) :: A = [-29.0,138.0,129.0]
5644 REAL(DP),
PARAMETER,
DIMENSION(1:3) :: ALPHA = [0.03,0.13,0.625]
5645 REAL(DP),
PARAMETER :: la = 0.35, beta_0 = 4.9
5647 REAL(DP),
INTENT(INOUT),
DIMENSION(:) :: Q123
5648 REAL(DP),
INTENT(INOUT) :: CURR_LAMBDA
5649 REAL(DP),
INTENT(IN) :: PREV_LAMBDA, DT, TIME, ISO_TA
5650 REAL(DP),
INTENT(OUT) :: TA
5652 REAL(DP) :: QFAC, DLAMBDA_DT, Q, OVERLAP
5655 curr_lambda = min(1.15, max(0.8, curr_lambda))
5657 IF( time - 1e-10 <= 0.0)
THEN 5660 dlambda_dt = (curr_lambda - prev_lambda) / dt
5662 q123(i) = q123(i) + dt * (a(i) * dlambda_dt - alpha(i) * q123(i))
5664 q = q123(1)+q123(2)+q123(3)
5666 qfac = (la*q + 1.0) / (1.0 - q)
5668 qfac = (1.0 + (la+2.0)*q)/(1.0+q);
5672 overlap= 1.0 + beta_0 * (curr_lambda-1.0)
5673 ta = overlap * qfac * iso_ta
5683 & number_of_xi,dfdz,err,error,*)
5687 INTEGER(INTG),
INTENT(IN) :: ELEMENT_NUMBER
5688 INTEGER(INTG),
INTENT(IN) :: GAUSS_POINT_NUMBER
5689 INTEGER(INTG),
INTENT(IN) :: NUMBER_OF_DIMENSIONS
5690 INTEGER(INTG),
INTENT(IN) :: NUMBER_OF_XI
5691 REAL(DP),
INTENT(OUT) :: DFDZ(:,:,:)
5692 INTEGER(INTG),
INTENT(OUT) :: ERR
5698 INTEGER(INTG) :: derivative_idx,component_idx1,component_idx2,xi_idx,parameter_idx
5699 REAL(DP) :: DXIDZ(number_of_dimensions,number_of_dimensions),DZDXI(number_of_dimensions,number_of_dimensions)
5700 REAL(DP) :: Jzxi,DFDXI(number_of_dimensions,64,number_of_xi)
5702 enters(
"FINITE_ELASTICITY_GAUSS_DFDZ",err,error,*999)
5707 DO component_idx2=1,number_of_dimensions
5708 DO xi_idx=1,number_of_xi
5710 dzdxi(component_idx2,xi_idx)=interpolated_point%VALUES(component_idx2,derivative_idx)
5715 IF (number_of_dimensions == 3 .AND. number_of_xi == 2)
THEN 5716 CALL cross_product(dzdxi(:,1),dzdxi(:,2),dzdxi(:,3),err,error,*999)
5717 dzdxi(:,3) =
normalise(dzdxi(:,3),err,error)
5720 CALL invert(dzdxi,dxidz,jzxi,err,error,*999)
5722 field=>interpolated_point%INTERPOLATION_PARAMETERS%FIELD
5723 DO component_idx1=1,number_of_dimensions
5724 component_basis=>field%VARIABLES(1)%COMPONENTS(component_idx1)%DOMAIN%TOPOLOGY%ELEMENTS% &
5725 & elements(element_number)%BASIS
5727 DO parameter_idx=1,component_basis%NUMBER_OF_ELEMENT_PARAMETERS
5728 DO xi_idx=1,number_of_xi
5730 dfdxi(component_idx1,parameter_idx,xi_idx)=quadrature_scheme%GAUSS_BASIS_FNS(parameter_idx,derivative_idx, &
5731 & gauss_point_number)
5736 DO component_idx1=1,number_of_dimensions
5737 component_basis=>field%VARIABLES(1)%COMPONENTS(component_idx1)%DOMAIN%TOPOLOGY%ELEMENTS% &
5738 & elements(element_number)%BASIS
5739 DO component_idx2=1,number_of_dimensions
5740 DO parameter_idx=1,component_basis%NUMBER_OF_ELEMENT_PARAMETERS
5741 DO xi_idx=1,number_of_xi
5742 dfdz(parameter_idx,component_idx2,component_idx1)=dfdz(parameter_idx,component_idx2,component_idx1) + &
5743 & dfdxi(component_idx1,parameter_idx,xi_idx) * dxidz(xi_idx,component_idx2)
5749 exits(
"FINITE_ELASTICITY_GAUSS_DFDZ")
5751 999 errorsexits(
"FINITE_ELASTICITY_GAUSS_DFDZ",err,error)
5765 INTEGER(INTG),
INTENT(OUT) :: ERR
5768 INTEGER(INTG) :: GEOMETRIC_MESH_COMPONENT,GEOMETRIC_SCALING_TYPE,NUMBER_OF_COMPONENTS, &
5769 & NUMBER_OF_DIMENSIONS, NUMBER_OF_DARCY_COMPONENTS,GEOMETRIC_COMPONENT_NUMBER,NUMBER_OF_COMPONENTS_2,component_idx, &
5770 & derivedIdx,varIdx,variableType,NUMBER_OF_FLUID_COMPONENTS
5772 TYPE(
field_type),
POINTER :: ANALYTIC_FIELD,DEPENDENT_FIELD,GEOMETRIC_FIELD
5777 TYPE(
field_type),
POINTER :: EQUATIONS_SET_FIELD_FIELD
5781 LOGICAL :: IS_HYDROSTATIC_PRESSURE_DEPENDENT_FIELD
5782 INTEGER(INTG) :: num_var,Ncompartments,DEPENDENT_FIELD_NUMBER_OF_VARIABLES
5783 INTEGER(INTG) :: EQUATIONS_SET_FIELD_NUMBER_OF_VARIABLES,EQUATIONS_SET_FIELD_NUMBER_OF_COMPONENTS
5784 INTEGER(INTG),
POINTER :: EQUATIONS_SET_FIELD_DATA(:)
5785 INTEGER(INTG),
ALLOCATABLE :: VARIABLE_TYPES(:)
5786 INTEGER(INTG) :: EQUATIONS_SET_SUBTYPE
5788 enters(
"FINITE_ELASTICITY_EQUATIONS_SET_SETUP",err,error,*999)
5790 NULLIFY(geometric_decomposition)
5792 NULLIFY(equations_mapping)
5793 NULLIFY(equations_matrices)
5794 NULLIFY(equations_materials)
5795 NULLIFY(equations_equations_set_field)
5796 NULLIFY(equations_set_field_field)
5797 NULLIFY(equations_set_field_data)
5799 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 5800 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
5801 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 5802 CALL flagerror(
"Equations set specification must have three entries for a finite elasticity type equations set.", &
5805 equations_set_subtype=equations_set%SPECIFICATION(3)
5815 number_of_dimensions = equations_set%REGION%COORDINATE_SYSTEM%NUMBER_OF_DIMENSIONS
5817 IF(is_hydrostatic_pressure_dependent_field)
THEN 5818 number_of_components = number_of_dimensions + 1
5820 number_of_components = number_of_dimensions
5823 IF(
ASSOCIATED(equations_set))
THEN 5824 SELECT CASE(equations_set_subtype)
5851 SELECT CASE(equations_set_setup%SETUP_TYPE)
5853 SELECT CASE(equations_set_setup%ACTION_TYPE)
5860 equations_set_field_number_of_variables = 1
5861 equations_set_field_number_of_components = 2
5862 equations_equations_set_field=>equations_set%EQUATIONS_SET_FIELD
5863 IF(equations_equations_set_field%EQUATIONS_SET_FIELD_AUTO_CREATED)
THEN 5865 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION, &
5866 & equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD,err,error,*999)
5867 equations_set_field_field=>equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD
5868 CALL field_label_set(equations_set_field_field,
"Equations Set Field",err,error,*999)
5869 CALL field_type_set_and_lock(equations_set_field_field,field_general_type,&
5871 CALL field_dependent_type_set_and_lock(equations_set_field_field,&
5872 & field_independent_type,err,error,*999)
5873 CALL field_number_of_variables_set(equations_set_field_field, &
5874 & equations_set_field_number_of_variables,err,error,*999)
5875 CALL field_variable_types_set_and_lock(equations_set_field_field,&
5876 & [field_u_variable_type],err,error,*999)
5877 CALL field_dimension_set_and_lock(equations_set_field_field,field_u_variable_type, &
5878 & field_vector_dimension_type,err,error,*999)
5879 CALL field_data_type_set_and_lock(equations_set_field_field,field_u_variable_type, &
5880 & field_intg_type,err,error,*999)
5881 CALL field_number_of_components_set_and_lock(equations_set_field_field,&
5882 & field_u_variable_type,equations_set_field_number_of_components,err,error,*999)
5885 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
5886 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
5887 CALL field_number_of_variables_check(equations_set_setup%FIELD,equations_set_field_number_of_variables, &
5889 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
5890 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
5892 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_intg_type,err,error,*999)
5893 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
5894 & equations_set_field_number_of_components,err,error,*999)
5899 IF(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_AUTO_CREATED)
THEN 5900 CALL field_create_finish(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD,err,error,*999)
5901 CALL field_component_values_initialise(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD,&
5902 & field_u_variable_type,field_values_set_type, 1, 1_intg, err, error, *999)
5903 CALL field_component_values_initialise(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD,&
5904 & field_u_variable_type,field_values_set_type, 2, 1_intg, err, error, *999)
5909 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
5910 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
5911 &
" is invalid for a finite elasticity equation." 5912 CALL flagerror(local_error,err,error,*999)
5916 SELECT CASE(equations_set_setup%ACTION_TYPE)
5919 SELECT CASE(equations_set_subtype)
5954 IF(.NOT.
ASSOCIATED(equations_set%GEOMETRY%FIBRE_FIELD))
CALL flagerror( &
5955 &
"Finite elascitiy equations require a fibre field.",err,error,*999)
5957 local_error=
"The third equations set specification of "// &
5959 &
" is invalid for a finite elasticity equation." 5960 CALL flagerror(local_error,err,error,*999)
5967 field_variable=>equations_set%GEOMETRY%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR
5968 CALL field_parametersetensurecreated(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
5969 & field_mesh_displacement_set_type,err,error,*999)
5973 equations_set_field_number_of_components = 2
5975 equations_equations_set_field=>equations_set%EQUATIONS_SET_FIELD
5976 equations_set_field_field=>equations_equations_set_field%EQUATIONS_SET_FIELD_FIELD
5978 IF(equations_equations_set_field%EQUATIONS_SET_FIELD_AUTO_CREATED)
THEN 5979 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
5980 CALL field_mesh_decomposition_set_and_lock(equations_set_field_field,&
5981 & geometric_decomposition,err,error,*999)
5982 CALL field_geometric_field_set_and_lock(equations_set_field_field,&
5983 & equations_set%GEOMETRY%GEOMETRIC_FIELD,err,error,*999)
5984 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
5985 & 1,geometric_component_number,err,error,*999)
5986 DO component_idx = 1, equations_set_field_number_of_components
5987 CALL field_component_mesh_component_set_and_lock(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD, &
5988 & field_u_variable_type,component_idx,geometric_component_number,err,error,*999)
5989 CALL field_component_interpolation_set_and_lock(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD, &
5990 & field_u_variable_type,component_idx,field_constant_interpolation,err,error,*999)
5994 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
5995 CALL field_scaling_type_set(equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD,geometric_scaling_type, &
6005 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
6006 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
6007 &
" is invalid for a linear diffusion equation." 6008 CALL flagerror(local_error,err,error,*999)
6011 SELECT CASE(equations_set_subtype)
6034 SELECT CASE(equations_set_setup%ACTION_TYPE)
6036 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 6038 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
6039 & dependent_field,err,error,*999)
6040 CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
6041 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_geometric_general_type,err,error,*999)
6042 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
6043 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
6044 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
6046 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
6047 & geometric_field,err,error,*999)
6049 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,3,err,error,*999)
6051 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,4,err,error,*999)
6053 dependent_field_number_of_variables=2
6054 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6055 & dependent_field_number_of_variables,err,error,*999)
6056 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
6057 & field_deludeln_variable_type],err,error,*999)
6058 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6059 &
"U",err,error,*999)
6060 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6061 &
"del U/del n",err,error,*999)
6063 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6064 & field_vector_dimension_type,err,error,*999)
6065 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6066 & field_vector_dimension_type,err,error,*999)
6067 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6068 & field_dp_type,err,error,*999)
6069 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6070 & field_dp_type,err,error,*999)
6071 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6072 & number_of_dimensions,err,error,*999)
6073 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6074 & number_of_components,err,error,*999)
6075 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6076 & field_deludeln_variable_type,number_of_components,err,error,*999)
6078 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6079 & field_vector_dimension_type,err,error,*999)
6080 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6081 & field_dp_type,err,error,*999)
6082 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6083 & field_v_variable_type,number_of_dimensions,err,error,*999)
6085 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6086 & field_vector_dimension_type,err,error,*999)
6087 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6088 & field_dp_type,err,error,*999)
6089 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6090 & field_v_variable_type,number_of_dimensions,err,error,*999)
6091 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u1_variable_type, &
6092 & field_vector_dimension_type,err,error,*999)
6093 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u1_variable_type, &
6094 & field_dp_type,err,error,*999)
6095 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6096 & field_u1_variable_type,2,err,error,*999)
6100 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6101 & 1,geometric_mesh_component,err,error,*999)
6102 DO component_idx=1,number_of_dimensions
6103 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6104 & component_idx,geometric_mesh_component,err,error,*999)
6105 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6106 & component_idx,geometric_mesh_component,err,error,*999)
6108 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6109 & field_v_variable_type,component_idx,geometric_mesh_component,err,error,*999)
6111 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6112 & field_v_variable_type,component_idx,geometric_mesh_component,err,error,*999)
6117 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6118 & field_u1_variable_type,1,geometric_mesh_component,err,error,*999)
6119 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6120 & field_u1_variable_type,2,geometric_mesh_component,err,error,*999)
6123 IF(is_hydrostatic_pressure_dependent_field)
THEN 6126 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6127 & 1,geometric_mesh_component,err,error,*999)
6128 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6129 & number_of_components,geometric_mesh_component,err,error,*999)
6130 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6131 & number_of_components,geometric_mesh_component,err,error,*999)
6134 SELECT CASE(equations_set%SOLUTION_METHOD)
6137 DO component_idx=1,number_of_dimensions
6142 CALL field_component_interpolation_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6143 & component_idx,field_node_based_interpolation,err,error,*999)
6144 CALL field_component_interpolation_set(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6145 & field_deludeln_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
6147 IF(is_hydrostatic_pressure_dependent_field)
THEN 6149 CALL field_component_interpolation_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6150 & number_of_components,field_element_based_interpolation,err,error,*999)
6151 CALL field_component_interpolation_set(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6152 & field_deludeln_variable_type,number_of_components,field_element_based_interpolation,err,error,*999)
6155 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
6156 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
6158 CALL flagerror(
"Not implemented.",err,error,*999)
6160 CALL flagerror(
"Not implemented.",err,error,*999)
6162 CALL flagerror(
"Not implemented.",err,error,*999)
6164 CALL flagerror(
"Not implemented.",err,error,*999)
6166 CALL flagerror(
"Not implemented.",err,error,*999)
6168 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
6170 CALL flagerror(local_error,err,error,*999)
6174 CALL field_type_check(equations_set_setup%FIELD,field_geometric_general_type,err,error,*999)
6175 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
6177 CALL field_number_of_variables_check(equations_set_setup%FIELD,3,err,error,*999)
6178 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type, &
6179 & field_v_variable_type],err,error,*999)
6180 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_vector_dimension_type, &
6182 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
6184 CALL field_number_of_variables_check(equations_set_setup%FIELD,4,err,error,*999)
6185 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type, &
6186 & field_v_variable_type,field_u1_variable_type],err,error,*999)
6187 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_vector_dimension_type,&
6189 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
6190 CALL field_dimension_check(equations_set_setup%FIELD,field_u1_variable_type,field_vector_dimension_type,&
6192 CALL field_data_type_check(equations_set_setup%FIELD,field_u1_variable_type,field_dp_type,err,error,*999)
6194 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
6195 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type],&
6198 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
6200 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_vector_dimension_type, &
6202 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
6203 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
6204 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6205 & number_of_dimensions,err,error,*999)
6206 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_components, &
6208 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type,number_of_components, &
6211 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type, &
6212 & number_of_dimensions,err,error,*999)
6214 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type, &
6215 & number_of_dimensions,err,error,*999)
6216 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u1_variable_type, &
6221 IF(.not.
ASSOCIATED(equations_set_setup%FIELD%VARIABLES(2)%PARAMETER_SETS% &
6222 & set_type(field_pressure_values_set_type)%PTR))
THEN 6224 & variable_type,
"*",err,error))//
" does not have a pressure values set type associated." 6226 SELECT CASE(equations_set%SOLUTION_METHOD)
6228 DO component_idx=1,number_of_dimensions
6229 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,component_idx, &
6230 & field_node_based_interpolation,err,error,*999)
6231 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,component_idx, &
6232 & field_node_based_interpolation,err,error,*999)
6235 CALL flagerror(
"Not implemented.",err,error,*999)
6237 CALL flagerror(
"Not implemented.",err,error,*999)
6239 CALL flagerror(
"Not implemented.",err,error,*999)
6241 CALL flagerror(
"Not implemented.",err,error,*999)
6243 CALL flagerror(
"Not implemented.",err,error,*999)
6245 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
6247 CALL flagerror(local_error,err,error,*999)
6251 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 6252 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
6255 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6256 & field_previous_values_set_type,err,error,*999)
6257 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6258 & field_previous_iteration_values_set_type,err,error,*999)
6261 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
6262 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
6263 &
" is invalid for a finite elasticity equation" 6264 CALL flagerror(local_error,err,error,*999)
6272 SELECT CASE(equations_set_setup%ACTION_TYPE)
6274 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 6276 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
6277 & dependent_field,err,error,*999)
6278 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_geometric_general_type,err,error,*999)
6279 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
6280 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
6281 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
6283 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
6284 & geometric_field,err,error,*999)
6285 IF(number_of_dimensions==3)
THEN 6286 number_of_components_2 = 6
6287 ELSE IF(number_of_dimensions==2)
THEN 6288 number_of_components_2 = 3
6290 CALL flagerror(
"Only 2 and 3 dimensional problems are implemented at the moment",err,error,*999)
6293 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,5,err,error,*999)
6294 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
6295 & field_deludeln_variable_type,field_u1_variable_type,field_u2_variable_type,field_u3_variable_type], &
6298 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,4,err,error,*999)
6299 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
6300 & field_deludeln_variable_type,field_u1_variable_type,field_u2_variable_type],err,error,*999)
6302 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6303 & field_vector_dimension_type,err,error,*999)
6304 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6305 & field_vector_dimension_type,err,error,*999)
6306 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u1_variable_type, &
6307 & field_vector_dimension_type,err,error,*999)
6308 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u2_variable_type, &
6309 & field_vector_dimension_type,err,error,*999)
6310 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6311 & field_dp_type,err,error,*999)
6312 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6313 & field_dp_type,err,error,*999)
6314 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u1_variable_type, &
6315 & field_dp_type,err,error,*999)
6316 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u2_variable_type, &
6317 & field_dp_type,err,error,*999)
6318 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6319 & number_of_dimensions,err,error,*999)
6320 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6321 & number_of_components,err,error,*999)
6322 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6323 & field_deludeln_variable_type,number_of_components,err,error,*999)
6324 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u1_variable_type, &
6325 & number_of_components_2,err,error,*999)
6326 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u2_variable_type, &
6327 & number_of_components_2,err,error,*999)
6330 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u3_variable_type, &
6331 & field_vector_dimension_type,err,error,*999)
6332 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u3_variable_type, &
6333 & field_dp_type,err,error,*999)
6334 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u3_variable_type, &
6335 & number_of_dimensions,err,error,*999)
6339 DO component_idx=1,number_of_dimensions
6340 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6341 & component_idx,geometric_mesh_component,err,error,*999)
6342 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6343 & component_idx,geometric_mesh_component,err,error,*999)
6344 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6345 & component_idx,geometric_mesh_component,err,error,*999)
6348 IF(is_hydrostatic_pressure_dependent_field)
THEN 6351 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6352 & 1,geometric_mesh_component,err,error,*999)
6353 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6354 & number_of_components,geometric_mesh_component,err,error,*999)
6355 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6356 & number_of_components,geometric_mesh_component,err,error,*999)
6361 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6362 & 1,geometric_mesh_component,err,error,*999)
6363 DO component_idx=1,number_of_components_2
6364 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u1_variable_type, &
6365 & component_idx,geometric_mesh_component,err,error,*999)
6366 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u2_variable_type, &
6367 & component_idx,geometric_mesh_component,err,error,*999)
6369 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u3_variable_type, &
6370 & component_idx,geometric_mesh_component,err,error,*999)
6374 SELECT CASE(equations_set%SOLUTION_METHOD)
6377 DO component_idx=1,number_of_dimensions
6378 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6379 & component_idx,field_node_based_interpolation,err,error,*999)
6380 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6381 & field_deludeln_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
6384 IF(is_hydrostatic_pressure_dependent_field)
THEN 6386 CALL field_component_interpolation_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6387 & number_of_components,field_element_based_interpolation,err,error,*999)
6388 CALL field_component_interpolation_set(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6389 & field_deludeln_variable_type,number_of_components,field_element_based_interpolation,err,error,*999)
6393 DO component_idx=1,number_of_components_2
6394 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6395 & field_u1_variable_type,component_idx,field_gauss_point_based_interpolation,err,error,*999)
6396 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6397 & field_u2_variable_type,component_idx,field_gauss_point_based_interpolation,err,error,*999)
6399 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6400 & field_u3_variable_type,component_idx,field_gauss_point_based_interpolation,err,error,*999)
6405 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
6406 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
6408 CALL flagerror(
"Not implemented.",err,error,*999)
6410 CALL flagerror(
"Not implemented.",err,error,*999)
6412 CALL flagerror(
"Not implemented.",err,error,*999)
6414 CALL flagerror(
"Not implemented.",err,error,*999)
6416 CALL flagerror(
"Not implemented.",err,error,*999)
6418 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
6420 CALL flagerror(local_error,err,error,*999)
6426 CALL field_type_check(equations_set_setup%FIELD,field_geometric_general_type,err,error,*999)
6427 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
6428 IF(number_of_dimensions==3)
THEN 6429 number_of_components_2 = 6
6430 ELSE IF(number_of_dimensions==2)
THEN 6431 number_of_components_2 = 3
6433 CALL flagerror(
"Only 2 and 3 dimensional problems are implemented at the moment",err,error,*999)
6436 CALL field_number_of_variables_check(equations_set_setup%FIELD,5,err,error,*999)
6437 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type, &
6438 & field_u1_variable_type,field_u2_variable_type,field_u3_variable_type],err,error,*999)
6440 CALL field_number_of_variables_check(equations_set_setup%FIELD,4,err,error,*999)
6441 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type, &
6442 & field_u1_variable_type,field_u2_variable_type],err,error,*999)
6444 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
6446 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_vector_dimension_type, &
6448 CALL field_dimension_check(equations_set_setup%FIELD,field_u1_variable_type,field_vector_dimension_type, &
6450 CALL field_dimension_check(equations_set_setup%FIELD,field_u2_variable_type,field_vector_dimension_type, &
6452 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
6453 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
6454 CALL field_data_type_check(equations_set_setup%FIELD,field_u1_variable_type,field_dp_type,err,error,*999)
6455 CALL field_data_type_check(equations_set_setup%FIELD,field_u2_variable_type,field_dp_type,err,error,*999)
6456 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6457 & number_of_dimensions,err,error,*999)
6458 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_components, &
6460 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
6461 & number_of_components,err,error,*999)
6462 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u1_variable_type,number_of_components_2, &
6464 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u2_variable_type,number_of_components_2, &
6467 CALL field_dimension_check(equations_set_setup%FIELD,field_u3_variable_type,field_vector_dimension_type, &
6469 CALL field_data_type_check(equations_set_setup%FIELD,field_u3_variable_type,field_dp_type,err,error,*999)
6470 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u3_variable_type,number_of_dimensions, &
6476 IF(.not.
ASSOCIATED(equations_set_setup%FIELD%VARIABLES(2)%PARAMETER_SETS% &
6477 & set_type(field_pressure_values_set_type)%PTR))
THEN 6479 & variable_type,
"*",err,error))//
" does not have a pressure values set type associated." 6481 SELECT CASE(equations_set%SOLUTION_METHOD)
6483 DO component_idx=1,number_of_dimensions
6484 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,component_idx, &
6485 & field_node_based_interpolation,err,error,*999)
6486 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,component_idx, &
6487 & field_node_based_interpolation,err,error,*999)
6489 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u3_variable_type,component_idx, &
6490 & field_gauss_point_based_interpolation,err,error,*999)
6493 DO component_idx=1,number_of_components_2
6494 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u1_variable_type,component_idx, &
6495 & field_gauss_point_based_interpolation,err,error,*999)
6496 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u2_variable_type,component_idx, &
6497 & field_gauss_point_based_interpolation,err,error,*999)
6501 CALL flagerror(
"Not implemented.",err,error,*999)
6503 CALL flagerror(
"Not implemented.",err,error,*999)
6505 CALL flagerror(
"Not implemented.",err,error,*999)
6507 CALL flagerror(
"Not implemented.",err,error,*999)
6509 CALL flagerror(
"Not implemented.",err,error,*999)
6511 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
6513 CALL flagerror(local_error,err,error,*999)
6517 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 6518 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
6521 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
6522 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
6523 &
" is invalid for a finite elasticity equation" 6524 CALL flagerror(local_error,err,error,*999)
6532 SELECT CASE(equations_set_setup%ACTION_TYPE)
6534 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 6536 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
6537 & dependent_field,err,error,*999)
6538 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_general_type,err,error,*999)
6539 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
6540 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
6541 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
6543 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
6544 & geometric_field,err,error,*999)
6545 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,4,err,error,*999)
6546 CALL field_variable_types_set_and_lock(equations_set_setup%FIELD,[field_u_variable_type, &
6547 & field_deludeln_variable_type,field_v_variable_type,field_delvdeln_variable_type],err,error,*999)
6548 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6549 & field_vector_dimension_type,err,error,*999)
6550 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6551 & field_vector_dimension_type,err,error,*999)
6552 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6553 & field_vector_dimension_type,err,error,*999)
6554 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6555 & field_vector_dimension_type,err,error,*999)
6556 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6557 & field_dp_type,err,error,*999)
6558 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6559 & field_dp_type,err,error,*999)
6560 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6561 & field_dp_type,err,error,*999)
6562 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6563 & field_dp_type,err,error,*999)
6564 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6565 & number_of_dimensions,err,error,*999)
6566 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6567 & number_of_components,err,error,*999)
6568 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6569 & number_of_components,err,error,*999)
6571 SELECT CASE(equations_set_subtype)
6573 number_of_darcy_components=number_of_dimensions+2
6575 number_of_darcy_components=number_of_dimensions+1
6577 number_of_darcy_components=number_of_dimensions+1
6580 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6581 & number_of_darcy_components,err,error,*999)
6582 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6583 & number_of_darcy_components,err,error,*999)
6586 DO component_idx=1,number_of_dimensions
6587 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6588 & component_idx,geometric_mesh_component,err,error,*999)
6589 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6590 & component_idx,geometric_mesh_component,err,error,*999)
6591 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6592 & component_idx,geometric_mesh_component,err,error,*999)
6595 IF (is_hydrostatic_pressure_dependent_field)
THEN 6598 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6599 & 1,geometric_mesh_component,err,error,*999)
6600 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6601 & number_of_components,geometric_mesh_component,err,error,*999)
6602 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6603 & number_of_components,geometric_mesh_component,err,error,*999)
6608 DO component_idx=1,number_of_dimensions
6609 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6610 & component_idx,geometric_mesh_component,err,error,*999)
6611 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6612 & component_idx,geometric_mesh_component,err,error,*999)
6613 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6614 & component_idx,geometric_mesh_component,err,error,*999)
6618 DO component_idx=number_of_dimensions+1,number_of_darcy_components
6619 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6620 & 1,geometric_mesh_component,err,error,*999)
6621 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6622 & component_idx,geometric_mesh_component,err,error,*999)
6623 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6624 & component_idx,geometric_mesh_component,err,error,*999)
6627 SELECT CASE(equations_set%SOLUTION_METHOD)
6630 DO component_idx=1,number_of_dimensions
6631 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6632 & component_idx,field_node_based_interpolation,err,error,*999)
6633 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6634 & field_deludeln_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
6640 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6641 & number_of_components,field_node_based_interpolation,err,error,*999)
6642 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6643 & field_deludeln_variable_type,number_of_components,field_node_based_interpolation,err,error,*999)
6644 ELSE IF (is_hydrostatic_pressure_dependent_field)
THEN 6646 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6647 & number_of_components,field_element_based_interpolation,err,error,*999)
6648 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6649 & field_deludeln_variable_type,number_of_components,field_element_based_interpolation,err,error,*999)
6653 DO component_idx=1,number_of_darcy_components
6654 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6655 & component_idx,field_node_based_interpolation,err,error,*999)
6656 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6657 & field_delvdeln_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
6661 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
6662 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
6664 CALL flagerror(
"Not implemented.",err,error,*999)
6666 CALL flagerror(
"Not implemented.",err,error,*999)
6668 CALL flagerror(
"Not implemented.",err,error,*999)
6670 CALL flagerror(
"Not implemented.",err,error,*999)
6672 CALL flagerror(
"Not implemented.",err,error,*999)
6674 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
6676 CALL flagerror(local_error,err,error,*999)
6680 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
6681 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
6682 CALL field_number_of_variables_check(equations_set_setup%FIELD,4,err,error,*999)
6683 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type,&
6684 & field_v_variable_type,field_delvdeln_variable_type],err,error,*999)
6686 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
6688 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_vector_dimension_type, &
6690 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_vector_dimension_type, &
6692 CALL field_dimension_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_vector_dimension_type, &
6695 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
6696 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
6697 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
6698 CALL field_data_type_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_dp_type,err,error,*999)
6699 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6700 & number_of_dimensions,err,error,*999)
6701 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_components, &
6703 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type,number_of_components, &
6706 SELECT CASE(equations_set_subtype)
6708 number_of_darcy_components=number_of_dimensions+2
6710 number_of_darcy_components=number_of_dimensions+1
6712 number_of_darcy_components=number_of_dimensions+1
6715 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type,number_of_darcy_components, &
6717 CALL field_number_of_components_check(equations_set_setup%FIELD,field_delvdeln_variable_type, &
6718 & number_of_darcy_components,err,error,*999)
6722 IF(.not.
ASSOCIATED(equations_set_setup%FIELD%VARIABLES(4)%PARAMETER_SETS% &
6723 & set_type(field_impermeable_flag_values_set_type)%PTR))
THEN 6725 &
field%VARIABLES(4)% &
6726 & variable_type,
"*",err,error))//
" does not have an impermeable flag values set type associated." 6729 SELECT CASE(equations_set%SOLUTION_METHOD)
6732 DO component_idx=1,number_of_dimensions
6733 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,component_idx, &
6734 & field_node_based_interpolation,err,error,*999)
6735 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,component_idx, &
6736 & field_node_based_interpolation,err,error,*999)
6740 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,4, &
6741 & field_node_based_interpolation,err,error,*999)
6742 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,4, &
6743 & field_node_based_interpolation,err,error,*999)
6746 DO component_idx=1,number_of_darcy_components
6747 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,component_idx, &
6748 & field_node_based_interpolation,err,error,*999)
6749 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_delvdeln_variable_type,component_idx, &
6750 & field_node_based_interpolation,err,error,*999)
6754 CALL flagerror(
"Not implemented.",err,error,*999)
6756 CALL flagerror(
"Not implemented.",err,error,*999)
6758 CALL flagerror(
"Not implemented.",err,error,*999)
6760 CALL flagerror(
"Not implemented.",err,error,*999)
6762 CALL flagerror(
"Not implemented.",err,error,*999)
6764 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
6766 CALL flagerror(local_error,err,error,*999)
6770 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 6771 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
6773 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6774 & field_initial_values_set_type,err,error,*999)
6775 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6776 & field_relative_velocity_set_type,err,error,*999)
6777 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6778 & field_previous_iteration_values_set_type,err,error,*999)
6780 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6781 & field_impermeable_flag_values_set_type,err,error,*999)
6783 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
6784 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
6785 &
" is invalid for a finite elasticity equation" 6786 CALL flagerror(local_error,err,error,*999)
6794 number_of_darcy_components=1
6795 SELECT CASE(equations_set_setup%ACTION_TYPE)
6797 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 6799 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
6800 & dependent_field,err,error,*999)
6801 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_geometric_general_type,err,error,*999)
6802 CALL field_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,
"Dependent Field",err,error,*999)
6803 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
6804 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
6805 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
6807 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
6808 & geometric_field,err,error,*999)
6809 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,4,err,error,*999)
6810 CALL field_variable_types_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,[field_u_variable_type, &
6811 & field_deludeln_variable_type,field_v_variable_type,field_delvdeln_variable_type],err,error,*999)
6812 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6813 & field_vector_dimension_type,err,error,*999)
6814 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6815 & field_vector_dimension_type,err,error,*999)
6816 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6817 & field_vector_dimension_type,err,error,*999)
6818 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6819 & field_vector_dimension_type,err,error,*999)
6820 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6821 & field_dp_type,err,error,*999)
6822 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6823 & field_dp_type,err,error,*999)
6824 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6825 & field_dp_type,err,error,*999)
6826 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6827 & field_dp_type,err,error,*999)
6828 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6829 & number_of_dimensions,err,error,*999)
6830 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6831 & number_of_components,err,error,*999)
6832 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6833 & number_of_components,err,error,*999)
6834 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6835 & number_of_darcy_components,err,error,*999)
6836 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6837 & number_of_darcy_components,err,error,*999)
6840 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,
"U",err,error,*999)
6841 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,
"del U/del n", &
6843 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type,
"V",err,error,*999)
6844 CALL field_variable_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type,
"del V/del n", &
6846 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1,
"x1",err,error,*999)
6847 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,2,
"x2",err,error,*999)
6848 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,3,
"x3",err,error,*999)
6849 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
6850 &
"del x1/del n",err,error,*999)
6851 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,2, &
6852 &
"del x2/del n",err,error,*999)
6853 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,3, &
6854 &
"del x3/del n",err,error,*999)
6855 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type,1,
"p",err,error,*999)
6856 CALL field_component_label_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type,1, &
6857 &
"del p/del n",err,error,*999)
6860 DO component_idx=1,number_of_dimensions
6861 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6862 & component_idx,geometric_mesh_component,err,error,*999)
6863 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6864 & component_idx,geometric_mesh_component,err,error,*999)
6865 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
6866 & component_idx,geometric_mesh_component,err,error,*999)
6869 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6870 & 1,geometric_mesh_component,err,error,*999)
6871 DO component_idx=1,number_of_darcy_components
6872 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6873 & component_idx,geometric_mesh_component,err,error,*999)
6874 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_delvdeln_variable_type, &
6875 & component_idx,geometric_mesh_component,err,error,*999)
6878 SELECT CASE(equations_set%SOLUTION_METHOD)
6881 DO component_idx=1,number_of_dimensions
6882 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
6883 & component_idx,field_node_based_interpolation,err,error,*999)
6884 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6885 & field_deludeln_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
6888 DO component_idx=1,number_of_darcy_components
6889 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_v_variable_type, &
6890 & component_idx,field_node_based_interpolation,err,error,*999)
6891 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
6892 & field_delvdeln_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
6896 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
6897 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
6899 CALL flagerror(
"Not implemented.",err,error,*999)
6901 CALL flagerror(
"Not implemented.",err,error,*999)
6903 CALL flagerror(
"Not implemented.",err,error,*999)
6905 CALL flagerror(
"Not implemented.",err,error,*999)
6907 CALL flagerror(
"Not implemented.",err,error,*999)
6909 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
6911 CALL flagerror(local_error,err,error,*999)
6915 CALL field_type_check(equations_set_setup%FIELD,field_geometric_general_type,err,error,*999)
6916 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
6917 CALL field_number_of_variables_check(equations_set_setup%FIELD,4,err,error,*999)
6918 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type, &
6919 & field_v_variable_type,field_delvdeln_variable_type] &
6921 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
6923 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_vector_dimension_type, &
6925 CALL field_dimension_check(equations_set_setup%FIELD,field_v_variable_type,field_vector_dimension_type, &
6927 CALL field_dimension_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_vector_dimension_type, &
6930 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
6931 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
6932 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
6933 CALL field_data_type_check(equations_set_setup%FIELD,field_delvdeln_variable_type,field_dp_type,err,error,*999)
6934 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
6935 & number_of_dimensions,err,error,*999)
6936 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
6937 & number_of_components,err,error,*999)
6938 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
6939 & number_of_components,err,error,*999)
6940 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type, &
6941 & number_of_darcy_components,err,error,*999)
6942 CALL field_number_of_components_check(equations_set_setup%FIELD,field_delvdeln_variable_type, &
6943 & number_of_darcy_components,err,error,*999)
6945 SELECT CASE(equations_set%SOLUTION_METHOD)
6948 DO component_idx=1,number_of_dimensions
6949 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,component_idx, &
6950 & field_node_based_interpolation,err,error,*999)
6951 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,component_idx, &
6952 & field_node_based_interpolation,err,error,*999)
6955 DO component_idx=1,number_of_darcy_components
6956 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_v_variable_type,component_idx, &
6957 & field_node_based_interpolation,err,error,*999)
6958 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_delvdeln_variable_type,component_idx, &
6959 & field_node_based_interpolation,err,error,*999)
6963 CALL flagerror(
"Not implemented.",err,error,*999)
6965 CALL flagerror(
"Not implemented.",err,error,*999)
6967 CALL flagerror(
"Not implemented.",err,error,*999)
6969 CALL flagerror(
"Not implemented.",err,error,*999)
6971 CALL flagerror(
"Not implemented.",err,error,*999)
6973 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
6975 CALL flagerror(local_error,err,error,*999)
6979 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 6980 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
6983 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
6984 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
6985 &
" is invalid for a finite elasticity equation" 6986 CALL flagerror(local_error,err,error,*999)
6992 SELECT CASE(equations_set_setup%ACTION_TYPE)
6994 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 6996 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%DEPENDENT% &
6997 & dependent_field,err,error,*999)
6998 CALL field_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_geometric_general_type,err,error,*999)
6999 CALL field_dependent_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_dependent_type,err,error,*999)
7000 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
7001 CALL field_mesh_decomposition_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_decomposition, &
7003 CALL field_geometric_field_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,equations_set%GEOMETRY% &
7004 & geometric_field,err,error,*999)
7006 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
7007 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
7008 & field_values_set_type,equations_set_field_data,err,error,*999)
7009 ncompartments=equations_set_field_data(2)
7011 CALL field_number_of_variables_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,(2+2*ncompartments), &
7013 ALLOCATE(variable_types(2*ncompartments+2))
7014 DO num_var=1,ncompartments+1
7015 variable_types(2*num_var-1)=field_u_variable_type+(field_number_of_variable_subtypes*(num_var-1))
7016 variable_types(2*num_var)=field_deludeln_variable_type+(field_number_of_variable_subtypes*(num_var-1))
7018 CALL field_variable_types_set_and_lock(equations_set_setup%FIELD,variable_types,err,error,*999)
7019 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7020 & number_of_dimensions,err,error,*999)
7021 number_of_components=number_of_dimensions+1
7022 number_of_darcy_components=number_of_dimensions+1
7024 DO num_var=1,2*ncompartments+2
7025 CALL field_dimension_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,variable_types(num_var), &
7026 & field_vector_dimension_type,err,error,*999)
7027 CALL field_data_type_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,variable_types(num_var), &
7028 & field_dp_type,err,error,*999)
7029 CALL field_number_of_components_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,variable_types(num_var), &
7030 & number_of_components,err,error,*999)
7044 DO component_idx=1,number_of_dimensions
7045 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7046 & component_idx,geometric_mesh_component,err,error,*999)
7047 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
7048 & component_idx,geometric_mesh_component,err,error,*999)
7049 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
7050 & component_idx,geometric_mesh_component,err,error,*999)
7054 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7055 & 1,geometric_mesh_component,err,error,*999)
7056 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
7057 & number_of_components,geometric_mesh_component,err,error,*999)
7058 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,field_deludeln_variable_type, &
7059 & number_of_components,geometric_mesh_component,err,error,*999)
7060 DO num_var=3,2*ncompartments+2
7062 DO component_idx=1,number_of_dimensions
7063 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7064 & component_idx,geometric_mesh_component,err,error,*999)
7065 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,variable_types(num_var), &
7066 & component_idx,geometric_mesh_component,err,error,*999)
7069 DO component_idx=number_of_dimensions+1,number_of_darcy_components
7070 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7071 & 1,geometric_mesh_component,err,error,*999)
7072 CALL field_component_mesh_component_set(equations_set%DEPENDENT%DEPENDENT_FIELD,variable_types(num_var), &
7073 & component_idx,geometric_mesh_component,err,error,*999)
7076 SELECT CASE(equations_set%SOLUTION_METHOD)
7079 DO component_idx=1,number_of_dimensions
7080 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
7081 & component_idx,field_node_based_interpolation,err,error,*999)
7082 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
7083 & field_deludeln_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
7089 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD,field_u_variable_type, &
7090 & number_of_components,field_node_based_interpolation,err,error,*999)
7091 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
7092 & field_deludeln_variable_type,number_of_components,field_node_based_interpolation,err,error,*999)
7100 DO num_var=3,2*ncompartments+2
7102 DO component_idx=1,number_of_darcy_components
7103 CALL field_component_interpolation_set_and_lock(equations_set%DEPENDENT%DEPENDENT_FIELD, &
7104 & variable_types(num_var),component_idx,field_node_based_interpolation,err,error,*999)
7108 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
7109 CALL field_scaling_type_set(equations_set%DEPENDENT%DEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
7111 CALL flagerror(
"Not implemented.",err,error,*999)
7113 CALL flagerror(
"Not implemented.",err,error,*999)
7115 CALL flagerror(
"Not implemented.",err,error,*999)
7117 CALL flagerror(
"Not implemented.",err,error,*999)
7119 CALL flagerror(
"Not implemented.",err,error,*999)
7121 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7123 CALL flagerror(local_error,err,error,*999)
7127 CALL field_type_check(equations_set_setup%FIELD,field_geometric_general_type,err,error,*999)
7128 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
7130 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
7131 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
7132 & field_values_set_type,equations_set_field_data,err,error,*999)
7133 ncompartments=equations_set_field_data(2)
7134 CALL field_number_of_variables_check(equations_set_setup%FIELD,(2+2*ncompartments),err,error,*999)
7135 ALLOCATE(variable_types(2*ncompartments+2))
7136 DO num_var=1,ncompartments+1
7137 variable_types(2*num_var-1)=field_u_variable_type+(field_number_of_variable_subtypes*(num_var-1))
7138 variable_types(2*num_var)=field_deludeln_variable_type+(field_number_of_variable_subtypes*(num_var-1))
7140 CALL field_variable_types_check(equations_set_setup%FIELD,variable_types,err,error,*999)
7142 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7143 & number_of_dimensions,err,error,*999)
7144 number_of_components=number_of_dimensions+1
7145 number_of_darcy_components=number_of_dimensions+1
7147 DO num_var=1,2*ncompartments+2
7148 CALL field_dimension_check(equations_set_setup%FIELD,variable_types(num_var),field_vector_dimension_type, &
7150 CALL field_data_type_check(equations_set_setup%FIELD,variable_types(num_var),field_dp_type,err,error,*999)
7151 CALL field_number_of_components_check(equations_set_setup%FIELD,variable_types(num_var),number_of_components, &
7156 SELECT CASE(equations_set%SOLUTION_METHOD)
7159 DO component_idx=1,number_of_dimensions
7160 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,component_idx, &
7161 & field_node_based_interpolation,err,error,*999)
7162 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type,component_idx, &
7163 & field_node_based_interpolation,err,error,*999)
7166 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_u_variable_type,number_of_components, &
7167 & field_node_based_interpolation,err,error,*999)
7168 CALL field_component_interpolation_check(equations_set_setup%FIELD,field_deludeln_variable_type, &
7169 & number_of_components,field_node_based_interpolation,err,error,*999)
7171 DO num_var=3,2*ncompartments+2
7173 DO component_idx=1,number_of_darcy_components
7174 CALL field_component_interpolation_check(equations_set_setup%FIELD,variable_types(num_var),component_idx, &
7175 & field_node_based_interpolation,err,error,*999)
7179 CALL flagerror(
"Not implemented.",err,error,*999)
7181 CALL flagerror(
"Not implemented.",err,error,*999)
7183 CALL flagerror(
"Not implemented.",err,error,*999)
7185 CALL flagerror(
"Not implemented.",err,error,*999)
7187 CALL flagerror(
"Not implemented.",err,error,*999)
7189 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7191 CALL flagerror(local_error,err,error,*999)
7193 DEALLOCATE(variable_types)
7196 IF(equations_set%DEPENDENT%DEPENDENT_FIELD_AUTO_CREATED)
THEN 7197 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
7199 equations_set_field_field=>equations_set%EQUATIONS_SET_FIELD%EQUATIONS_SET_FIELD_FIELD
7200 CALL field_parameter_set_data_get(equations_set_field_field,field_u_variable_type, &
7201 & field_values_set_type,equations_set_field_data,err,error,*999)
7202 ncompartments=equations_set_field_data(2)
7203 ALLOCATE(variable_types(2*ncompartments+2))
7204 DO num_var=1,ncompartments+1
7205 variable_types(2*num_var-1)=field_u_variable_type+(field_number_of_variable_subtypes*(num_var-1))
7206 variable_types(2*num_var)=field_deludeln_variable_type+(field_number_of_variable_subtypes*(num_var-1))
7208 DO num_var=3,2*ncompartments+2
7209 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,variable_types(num_var), &
7210 & field_initial_values_set_type,err,error,*999)
7211 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,variable_types(num_var), &
7212 & field_relative_velocity_set_type,err,error,*999)
7213 CALL field_parameter_set_create(equations_set%DEPENDENT%DEPENDENT_FIELD,variable_types(num_var), &
7214 & field_previous_iteration_values_set_type,err,error,*999)
7216 DEALLOCATE(variable_types)
7218 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
7219 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
7220 &
" is invalid for a finite elasticity equation" 7221 CALL flagerror(local_error,err,error,*999)
7225 local_error=
"The equation set subtype of "//
trim(
number_to_vstring(equations_set_subtype,
"*",err,error))// &
7226 &
" is invalid for a finite elasticity equation" 7227 CALL flagerror(local_error,err,error,*999)
7235 SELECT CASE(equations_set_setup%ACTION_TYPE)
7238 SELECT CASE(equations_set_subtype)
7241 number_of_components = 10
7243 &.NOT. equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 7244 CALL flagerror(
"Not implemented.",err,error,*999)
7246 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%INDEPENDENT% &
7247 & independent_field,err,error,*999)
7248 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
7250 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_independent_type, &
7252 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
7253 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_decomposition, &
7256 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
7257 & geometric_field,err,error,*999)
7258 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7259 & number_of_components,err,error,*999)
7261 DO component_idx=1,2
7262 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7263 & field_u_variable_type,component_idx,field_constant_interpolation,err,error,*999)
7266 DO component_idx=3,number_of_components
7267 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7268 & field_u_variable_type,component_idx,field_gauss_point_based_interpolation,err,error,*999)
7275 number_of_components = 3
7277 &.NOT. equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 7278 CALL flagerror(
"Not implemented.",err,error,*999)
7280 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%INDEPENDENT% &
7281 & independent_field,err,error,*999)
7282 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
7284 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_independent_type, &
7286 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
7287 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_decomposition, &
7290 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
7291 & geometric_field,err,error,*999)
7292 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7293 & number_of_components,err,error,*999)
7296 DO component_idx=1,number_of_components
7297 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7298 & field_u_variable_type,component_idx,field_gauss_point_based_interpolation,err,error,*999)
7308 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 7310 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%INDEPENDENT% &
7311 & independent_field,err,error,*999)
7312 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
7313 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_independent_type, &
7315 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
7316 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_decomposition, &
7318 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
7319 & geometric_field,err,error,*999)
7320 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,2,err,error,*999)
7321 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7322 & field_vector_dimension_type,err,error,*999)
7323 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_deludeln_variable_type, &
7324 & field_vector_dimension_type,err,error,*999)
7325 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7326 & field_dp_type,err,error,*999)
7327 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_deludeln_variable_type, &
7328 & field_dp_type,err,error,*999)
7329 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7330 & number_of_dimensions,err,error,*999)
7331 number_of_components=number_of_dimensions
7332 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7333 & number_of_components,err,error,*999)
7334 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7335 & field_deludeln_variable_type,number_of_components,err,error,*999)
7337 DO component_idx=1,number_of_dimensions
7338 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7339 & component_idx,geometric_mesh_component,err,error,*999)
7340 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7341 & component_idx,geometric_mesh_component,err,error,*999)
7342 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7343 & field_deludeln_variable_type,component_idx,geometric_mesh_component,err,error,*999)
7356 SELECT CASE(equations_set%SOLUTION_METHOD)
7359 DO component_idx=1,number_of_dimensions
7360 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7361 & field_u_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
7362 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7363 & field_deludeln_variable_type,component_idx,field_node_based_interpolation,err,error,*999)
7371 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
7372 CALL field_scaling_type_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
7374 CALL flagerror(
"Not implemented.",err,error,*999)
7376 CALL flagerror(
"Not implemented.",err,error,*999)
7378 CALL flagerror(
"Not implemented.",err,error,*999)
7380 CALL flagerror(
"Not implemented.",err,error,*999)
7382 CALL flagerror(
"Not implemented.",err,error,*999)
7384 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7386 CALL flagerror(local_error,err,error,*999)
7390 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
7391 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
7393 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
7394 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_deludeln_variable_type], &
7396 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type,err, &
7398 CALL field_dimension_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_vector_dimension_type, &
7400 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
7401 CALL field_data_type_check(equations_set_setup%FIELD,field_deludeln_variable_type,field_dp_type,err,error,*999)
7402 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7403 & number_of_dimensions,err,error,*999)
7404 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,number_of_components, &
7406 CALL field_number_of_components_check(equations_set_setup%FIELD,field_deludeln_variable_type,number_of_components,&
7408 SELECT CASE(equations_set%SOLUTION_METHOD)
7417 CALL flagerror(
"Not implemented.",err,error,*999)
7419 CALL flagerror(
"Not implemented.",err,error,*999)
7421 CALL flagerror(
"Not implemented.",err,error,*999)
7423 CALL flagerror(
"Not implemented.",err,error,*999)
7425 CALL flagerror(
"Not implemented.",err,error,*999)
7427 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7429 CALL flagerror(local_error,err,error,*999)
7435 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 7437 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%INDEPENDENT% &
7438 & independent_field,err,error,*999)
7439 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
7440 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_independent_type, &
7442 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
7443 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_decomposition, &
7445 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
7446 & geometric_field,err,error,*999)
7447 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,1,err,error,*999)
7448 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7449 & field_scalar_dimension_type,err,error,*999)
7450 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7451 & field_dp_type,err,error,*999)
7452 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7455 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7456 & 1,geometric_mesh_component,err,error,*999)
7457 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7458 & 1,geometric_mesh_component,err,error,*999)
7460 SELECT CASE(equations_set%SOLUTION_METHOD)
7463 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7464 & field_u_variable_type,1,field_gauss_point_based_interpolation,err,error,*999)
7466 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
7467 CALL field_scaling_type_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
7469 CALL flagerror(
"Not implemented.",err,error,*999)
7471 CALL flagerror(
"Not implemented.",err,error,*999)
7473 CALL flagerror(
"Not implemented.",err,error,*999)
7475 CALL flagerror(
"Not implemented.",err,error,*999)
7477 CALL flagerror(
"Not implemented.",err,error,*999)
7479 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7481 CALL flagerror(local_error,err,error,*999)
7485 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
7486 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
7488 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
7489 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
7490 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type,err, &
7492 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
7493 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1, &
7495 SELECT CASE(equations_set%SOLUTION_METHOD)
7499 CALL flagerror(
"Not implemented.",err,error,*999)
7501 CALL flagerror(
"Not implemented.",err,error,*999)
7503 CALL flagerror(
"Not implemented.",err,error,*999)
7505 CALL flagerror(
"Not implemented.",err,error,*999)
7507 CALL flagerror(
"Not implemented.",err,error,*999)
7509 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7511 CALL flagerror(local_error,err,error,*999)
7517 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 7519 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%INDEPENDENT% &
7520 & independent_field,err,error,*999)
7521 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
7522 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_independent_type, &
7524 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
7525 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_decomposition, &
7527 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
7528 & geometric_field,err,error,*999)
7529 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,2,err,error,*999)
7530 CALL field_variable_types_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,[field_u_variable_type, &
7531 & field_v_variable_type],err,error,*999)
7533 CALL field_dimension_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7534 & field_scalar_dimension_type,err,error,*999)
7536 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7537 & field_dp_type,err,error,*999)
7538 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type, &
7539 & field_intg_type,err,error,*999)
7541 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7544 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7547 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7550 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type, &
7551 & number_of_dimensions+1,err,error,*999)
7553 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7554 & 1,geometric_mesh_component,err,error,*999)
7555 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7556 & 1,geometric_mesh_component,err,error,*999)
7558 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7559 & 2,geometric_mesh_component,err,error,*999)
7560 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7561 & 3,geometric_mesh_component,err,error,*999)
7562 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7563 & 4,geometric_mesh_component,err,error,*999)
7564 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7565 & 5,geometric_mesh_component,err,error,*999)
7566 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7567 & 6,geometric_mesh_component,err,error,*999)
7569 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7570 & 2,geometric_mesh_component,err,error,*999)
7571 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7572 & 3,geometric_mesh_component,err,error,*999)
7573 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7574 & 4,geometric_mesh_component,err,error,*999)
7575 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7576 & 5,geometric_mesh_component,err,error,*999)
7578 SELECT CASE(equations_set%SOLUTION_METHOD)
7581 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7582 & field_u_variable_type,1,field_gauss_point_based_interpolation,err,error,*999)
7584 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7585 & field_u_variable_type,2,field_gauss_point_based_interpolation,err,error,*999)
7586 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7587 & field_u_variable_type,3,field_gauss_point_based_interpolation,err,error,*999)
7588 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7589 & field_u_variable_type,4,field_gauss_point_based_interpolation,err,error,*999)
7590 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7591 & field_u_variable_type,5,field_gauss_point_based_interpolation,err,error,*999)
7592 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7593 & field_u_variable_type,6,field_gauss_point_based_interpolation,err,error,*999)
7595 DO component_idx=1,number_of_dimensions
7596 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7597 & field_v_variable_type,component_idx,field_element_based_interpolation,err,error,*999)
7600 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
7601 CALL field_scaling_type_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
7603 CALL flagerror(
"Not implemented.",err,error,*999)
7605 CALL flagerror(
"Not implemented.",err,error,*999)
7607 CALL flagerror(
"Not implemented.",err,error,*999)
7609 CALL flagerror(
"Not implemented.",err,error,*999)
7611 CALL flagerror(
"Not implemented.",err,error,*999)
7613 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7615 CALL flagerror(local_error,err,error,*999)
7619 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
7620 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
7622 CALL field_number_of_variables_check(equations_set_setup%FIELD,2,err,error,*999)
7623 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_v_variable_type],err, &
7626 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_scalar_dimension_type,err, &
7629 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
7630 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_intg_type,err,error,*999)
7632 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1, &
7635 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,6, &
7638 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,5, &
7641 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type,number_of_dimensions+1, &
7643 SELECT CASE(equations_set%SOLUTION_METHOD)
7647 CALL flagerror(
"Not implemented.",err,error,*999)
7649 CALL flagerror(
"Not implemented.",err,error,*999)
7651 CALL flagerror(
"Not implemented.",err,error,*999)
7653 CALL flagerror(
"Not implemented.",err,error,*999)
7655 CALL flagerror(
"Not implemented.",err,error,*999)
7657 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7659 CALL flagerror(local_error,err,error,*999)
7664 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 7666 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%INDEPENDENT% &
7667 & independent_field,err,error,*999)
7668 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
7669 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_independent_type, &
7671 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
7672 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_decomposition, &
7674 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
7675 & geometric_field,err,error,*999)
7676 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,3,err,error,*999)
7677 CALL field_variable_types_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,[field_u_variable_type, &
7678 & field_v_variable_type,field_u1_variable_type],err,error,*999)
7679 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7680 & field_dp_type,err,error,*999)
7681 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type, &
7682 & field_intg_type,err,error,*999)
7683 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type, &
7684 & field_dp_type,err,error,*999)
7685 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7687 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_v_variable_type, &
7688 & number_of_dimensions+1,err,error,*999)
7689 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type, &
7692 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7693 & 1,geometric_mesh_component,err,error,*999)
7694 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7695 & 1,geometric_mesh_component,err,error,*999)
7696 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7697 & 2,geometric_mesh_component,err,error,*999)
7698 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type, &
7699 & 1,geometric_mesh_component,err,error,*999)
7700 SELECT CASE(equations_set%SOLUTION_METHOD)
7703 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7704 & field_u_variable_type,1,field_gauss_point_based_interpolation,err,error,*999)
7705 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7706 & field_u1_variable_type,1,field_gauss_point_based_interpolation,err,error,*999)
7707 DO component_idx=1,number_of_dimensions
7708 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7709 & field_v_variable_type,component_idx,field_element_based_interpolation,err,error,*999)
7712 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
7713 CALL field_scaling_type_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
7715 CALL flagerror(
"Not implemented.",err,error,*999)
7717 CALL flagerror(
"Not implemented.",err,error,*999)
7719 CALL flagerror(
"Not implemented.",err,error,*999)
7721 CALL flagerror(
"Not implemented.",err,error,*999)
7723 CALL flagerror(
"Not implemented.",err,error,*999)
7725 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7727 CALL flagerror(local_error,err,error,*999)
7731 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
7732 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
7734 CALL field_number_of_variables_check(equations_set_setup%FIELD,3,err,error,*999)
7735 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type,field_v_variable_type, &
7736 & field_u1_variable_type],err,error,*999)
7737 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
7738 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_intg_type,err,error,*999)
7739 CALL field_data_type_check(equations_set_setup%FIELD,field_u1_variable_type,field_dp_type,err,error,*999)
7740 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,1, &
7742 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type,number_of_dimensions+1, &
7744 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u1_variable_type,3, &
7746 SELECT CASE(equations_set%SOLUTION_METHOD)
7750 CALL flagerror(
"Not implemented.",err,error,*999)
7752 CALL flagerror(
"Not implemented.",err,error,*999)
7754 CALL flagerror(
"Not implemented.",err,error,*999)
7756 CALL flagerror(
"Not implemented.",err,error,*999)
7758 CALL flagerror(
"Not implemented.",err,error,*999)
7760 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7762 CALL flagerror(local_error,err,error,*999)
7767 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 7769 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%INDEPENDENT% &
7770 & independent_field,err,error,*999)
7771 CALL field_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_general_type,err,error,*999)
7772 CALL field_dependent_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_independent_type, &
7774 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
7775 CALL field_mesh_decomposition_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_decomposition, &
7777 CALL field_geometric_field_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,equations_set%GEOMETRY% &
7778 & geometric_field,err,error,*999)
7779 CALL field_number_of_variables_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,1,err,error,*999)
7780 CALL field_variable_types_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,[field_u_variable_type],err, &
7782 CALL field_data_type_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7783 & field_dp_type,err,error,*999)
7784 CALL field_number_of_components_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7787 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7788 & 1,geometric_mesh_component,err,error,*999)
7789 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7790 & 1,geometric_mesh_component,err,error,*999)
7791 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7792 & 2,geometric_mesh_component,err,error,*999)
7793 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7794 & 3,geometric_mesh_component,err,error,*999)
7795 CALL field_component_mesh_component_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7796 & 4,geometric_mesh_component,err,error,*999)
7797 SELECT CASE(equations_set%SOLUTION_METHOD)
7800 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7801 & field_u_variable_type,1,field_gauss_point_based_interpolation,err,error,*999)
7802 CALL field_component_interpolation_set_and_lock(equations_set%INDEPENDENT%INDEPENDENT_FIELD, &
7803 & field_u_variable_type,2,field_gauss_point_based_interpolation,err,error,*999)
7805 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
7806 CALL field_scaling_type_set(equations_set%INDEPENDENT%INDEPENDENT_FIELD,geometric_scaling_type,err,error,*999)
7808 CALL flagerror(
"Not implemented.",err,error,*999)
7810 CALL flagerror(
"Not implemented.",err,error,*999)
7812 CALL flagerror(
"Not implemented.",err,error,*999)
7814 CALL flagerror(
"Not implemented.",err,error,*999)
7816 CALL flagerror(
"Not implemented.",err,error,*999)
7818 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7820 CALL flagerror(local_error,err,error,*999)
7824 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
7825 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
7827 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
7828 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err, &
7830 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
7832 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type,4, &
7835 SELECT CASE(equations_set%SOLUTION_METHOD)
7839 CALL flagerror(
"Not implemented.",err,error,*999)
7841 CALL flagerror(
"Not implemented.",err,error,*999)
7843 CALL flagerror(
"Not implemented.",err,error,*999)
7845 CALL flagerror(
"Not implemented.",err,error,*999)
7847 CALL flagerror(
"Not implemented.",err,error,*999)
7849 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
7851 CALL flagerror(local_error,err,error,*999)
7856 local_error=
"The third equations set specification of "// &
7858 &
" is invalid for an independent field of a finite elasticity equation." 7859 CALL flagerror(local_error,err,error,*999)
7862 IF(equations_set%INDEPENDENT%INDEPENDENT_FIELD_AUTO_CREATED)
THEN 7863 CALL field_create_finish(equations_set%INDEPENDENT%INDEPENDENT_FIELD,err,error,*999)
7866 CALL field_number_of_components_get(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7867 & number_of_components,err,error,*999)
7868 DO component_idx=1,number_of_components
7869 CALL field_component_values_initialise(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7870 & field_values_set_type,component_idx,0.0_dp,err,error,*999)
7875 CALL field_parameter_set_create(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u_variable_type, &
7876 & field_previous_values_set_type,err,error,*999)
7877 CALL field_parameter_set_create(equations_set%INDEPENDENT%INDEPENDENT_FIELD,field_u1_variable_type, &
7878 & field_previous_values_set_type,err,error,*999)
7881 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
7882 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
7883 &
" is invalid for a finite elasticity equation" 7884 CALL flagerror(local_error,err,error,*999)
7891 SELECT CASE(equations_set_setup%ACTION_TYPE)
7893 equations_materials=>equations_set%MATERIALS
7894 IF(
ASSOCIATED(equations_materials))
THEN 7895 number_of_fluid_components=0
7896 SELECT CASE(equations_set_subtype)
7901 number_of_components=2;
7903 number_of_components=8;
7905 number_of_components=8;
7908 number_of_components=3;
7910 number_of_components=5;
7912 number_of_components=6;
7914 number_of_components=8;
7920 IF (number_of_dimensions==3)
THEN 7921 number_of_components=3
7923 number_of_components=2
7926 number_of_components=2;
7928 number_of_components=2;
7930 number_of_components=5;
7932 number_of_components=4;
7934 number_of_components=5;
7936 number_of_components=8;
7938 number_of_components=12;
7940 number_of_components=11;
7942 number_of_components=7;
7945 number_of_components=3;
7948 number_of_components=8;
7950 number_of_components=2;
7952 number_of_components=3;
7956 number_of_components=4;
7958 number_of_components=6;
7959 number_of_fluid_components=8
7961 number_of_components=4
7962 number_of_fluid_components=8
7964 number_of_components=6
7965 number_of_fluid_components=8
7967 CALL flagerror(
"Materials field is not required for CellML based constituative laws.",err,error,*999)
7969 CALL flagerror(
"Materials field is not required for CellML based constituative laws.",err,error,*999)
7971 local_error=
"The third equations set specification of "// &
7973 &
" is not valid for a finite elasticity type of an elasticity equation set." 7974 CALL flagerror(local_error,err,error,*999)
7976 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 7978 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_materials% &
7979 & materials_field,err,error,*999)
7980 CALL field_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_material_type,err,error,*999)
7981 CALL field_dependent_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_independent_type,err,error,*999)
7982 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
7983 CALL field_mesh_decomposition_set_and_lock(equations_materials%MATERIALS_FIELD,geometric_decomposition, &
7985 CALL field_geometric_field_set_and_lock(equations_materials%MATERIALS_FIELD,equations_set%GEOMETRY% &
7986 & geometric_field,err,error,*999)
7987 CALL field_component_mesh_component_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
7988 & 1,geometric_mesh_component,err,error,*999)
7992 IF(number_of_fluid_components>0)
THEN 7994 CALL field_number_of_variables_set_and_lock(equations_materials%MATERIALS_FIELD,3,err,error,*999)
7995 CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,[field_u_variable_type, &
7996 & field_v_variable_type,field_u1_variable_type],err,error,*999)
7998 CALL field_number_of_variables_set_and_lock(equations_materials%MATERIALS_FIELD,2,err,error,*999)
7999 CALL field_variable_types_set_and_lock(equations_materials%MATERIALS_FIELD,[field_u_variable_type, &
8000 & field_v_variable_type],err,error,*999)
8002 CALL field_label_set(equations_materials%MATERIALS_FIELD,
"Materials",err,error,*999)
8004 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
8005 & field_vector_dimension_type,err,error,*999)
8006 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
8007 & field_dp_type,err,error,*999)
8008 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
8009 & number_of_components,err,error,*999)
8010 CALL field_dimension_set_and_lock(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
8011 & field_vector_dimension_type,err,error,*999)
8012 CALL field_data_type_set_and_lock(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
8013 & field_dp_type,err,error,*999)
8014 CALL field_variable_label_set(equations_materials%MATERIALS_FIELD,field_u_variable_type,
"Parameters",err,error,*999)
8017 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
8019 CALL field_component_interpolation_set_and_lock(equations_materials%MATERIALS_FIELD, &
8020 & field_v_variable_type,1 ,field_gauss_point_based_interpolation,err,error,*999)
8023 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
8025 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
8026 & 1,field_constant_interpolation,err,error,*999)
8027 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
8028 & 1,geometric_mesh_component,err,error,*999)
8029 CALL field_variable_label_set(equations_materials%MATERIALS_FIELD,field_v_variable_type,
"Density",err,error,*999)
8032 DO component_idx=1,number_of_components
8034 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
8035 & component_idx,field_constant_interpolation,err,error,*999)
8036 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
8037 & component_idx,geometric_mesh_component,err,error,*999)
8040 IF(number_of_fluid_components>0)
THEN 8041 CALL field_number_of_components_set_and_lock(equations_materials%MATERIALS_FIELD,field_u1_variable_type, &
8042 & number_of_fluid_components,err,error,*999)
8043 CALL field_variable_label_set(equations_materials%MATERIALS_FIELD,field_u1_variable_type,
"Fluid Parameters", &
8046 DO component_idx=1,number_of_fluid_components
8047 CALL field_component_interpolation_set(equations_materials%MATERIALS_FIELD,field_u1_variable_type, &
8048 & component_idx,field_constant_interpolation,err,error,*999)
8049 CALL field_component_mesh_component_set(equations_materials%MATERIALS_FIELD,field_u1_variable_type, &
8050 & component_idx,geometric_mesh_component,err,error,*999)
8054 CALL field_scaling_type_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_scaling_type,err,error,*999)
8055 CALL field_scaling_type_set(equations_materials%MATERIALS_FIELD,geometric_scaling_type,err,error,*999)
8058 CALL field_type_check(equations_set_setup%FIELD,field_material_type,err,error,*999)
8059 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
8060 CALL field_number_of_variables_get(equations_set_setup%FIELD,equations_set_field_number_of_variables,err,error,*999)
8061 SELECT CASE(equations_set_field_number_of_variables)
8063 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
8065 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type, &
8066 & field_v_variable_type],err,error,*999)
8068 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type, &
8069 & field_v_variable_type,field_u1_variable_type],err,error,*999)
8071 local_error=
"Invalid number of variables. The number of variables for field number "// &
8074 &
" but should be either 1, 2 or 3" 8075 CALL flagerror(local_error,err,error,*999)
8077 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
8079 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
8080 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
8081 & number_of_components,err,error,*999)
8082 IF (equations_set_field_number_of_variables>1)
THEN 8083 CALL field_data_type_check(equations_set_setup%FIELD,field_v_variable_type,field_dp_type,err,error,*999)
8084 CALL field_number_of_components_check(equations_set_setup%FIELD,field_v_variable_type, &
8087 IF (equations_set_field_number_of_variables>2)
THEN 8088 CALL field_data_type_check(equations_set_setup%FIELD,field_u1_variable_type,field_dp_type,err,error,*999)
8089 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u1_variable_type, &
8090 & number_of_fluid_components,err,error,*999)
8094 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
8097 equations_materials=>equations_set%MATERIALS
8098 IF(
ASSOCIATED(equations_materials))
THEN 8099 IF(equations_materials%MATERIALS_FIELD_AUTO_CREATED)
THEN 8101 CALL field_create_finish(equations_materials%MATERIALS_FIELD,err,error,*999)
8104 CALL field_number_of_components_get(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
8105 & number_of_components,err,error,*999)
8106 DO component_idx=1,number_of_components
8107 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_u_variable_type, &
8108 & field_values_set_type,component_idx,1.0_dp,err,error,*999)
8111 CALL field_component_values_initialise(equations_materials%MATERIALS_FIELD,field_v_variable_type, &
8112 & field_values_set_type,1,0.0_dp,err,error,*999)
8115 CALL flagerror(
"Equations set materials is not associated.",err,error,*999)
8118 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
8119 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
8120 &
" is invalid for a finite elasticity equation." 8121 CALL flagerror(local_error,err,error,*999)
8124 IF(
ASSOCIATED(equations_set%GEOMETRY%GEOMETRIC_FIELD))
THEN 8125 CALL field_number_of_components_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,field_u_variable_type, &
8126 & number_of_dimensions,err,error,*999)
8127 number_of_components=number_of_dimensions
8129 CALL flagerror(
"Equations set geometrc field is not associated",err,error,*999)
8131 SELECT CASE(equations_set_setup%ACTION_TYPE)
8133 IF(equations_set%SOURCE%SOURCE_FIELD_AUTO_CREATED)
THEN 8134 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%SOURCE% &
8136 CALL field_type_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,field_general_type,err,error,*999)
8137 CALL field_label_set(equations_set%SOURCE%SOURCE_FIELD,
"Source Field",err,error,*999)
8138 CALL field_dependent_type_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,field_independent_type, &
8140 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
8141 CALL field_mesh_decomposition_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,geometric_decomposition, &
8143 CALL field_geometric_field_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,equations_set%GEOMETRY% &
8144 & geometric_field,err,error,*999)
8146 CALL field_number_of_variables_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,1,err,error,*999)
8147 CALL field_variable_types_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,[field_u_variable_type],err,error,*999)
8148 CALL field_dimension_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
8149 & field_vector_dimension_type,err,error,*999)
8150 CALL field_data_type_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
8151 & field_dp_type,err,error,*999)
8152 CALL field_number_of_components_set_and_lock(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
8153 & number_of_components,err,error,*999)
8155 CALL field_variable_label_set(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type,
"Gravity",err,error,*999)
8156 CALL field_component_label_set(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type,1,
"g1",err,error,*999)
8157 CALL field_component_label_set(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type,2,
"g2",err,error,*999)
8158 IF(number_of_components==3)
THEN 8159 CALL field_component_label_set(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type,3,
"g3",err,error,*999)
8162 DO component_idx=1,number_of_components
8163 CALL field_component_interpolation_set_and_lock(equations_set%SOURCE%SOURCE_FIELD, &
8164 & field_u_variable_type,component_idx,field_constant_interpolation,err,error,*999)
8168 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
8169 CALL field_dependent_type_check(equations_set_setup%FIELD,field_independent_type,err,error,*999)
8170 CALL field_number_of_variables_check(equations_set_setup%FIELD,1,err,error,*999)
8171 CALL field_variable_types_check(equations_set_setup%FIELD,[field_u_variable_type],err,error,*999)
8172 CALL field_dimension_check(equations_set_setup%FIELD,field_u_variable_type,field_vector_dimension_type, &
8174 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
8175 CALL field_number_of_components_check(equations_set_setup%FIELD,field_u_variable_type, &
8176 & number_of_components,err,error,*999)
8179 IF(
ASSOCIATED(equations_set%SOURCE))
THEN 8180 IF(equations_set%SOURCE%SOURCE_FIELD_AUTO_CREATED)
THEN 8182 CALL field_create_finish(equations_set%SOURCE%SOURCE_FIELD,err,error,*999)
8184 CALL field_number_of_components_get(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
8185 & number_of_components,err,error,*999)
8186 DO component_idx=1,number_of_components-1
8187 CALL field_component_values_initialise(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
8188 & field_values_set_type,component_idx,0.0_dp,err,error,*999)
8190 CALL field_component_values_initialise(equations_set%SOURCE%SOURCE_FIELD,field_u_variable_type, &
8191 & field_values_set_type,number_of_components,-9.80665_dp,err,error,*999)
8194 CALL flagerror(
"Equations set source is not associated.",err,error,*999)
8197 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
8198 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
8199 &
" is invalid for a finite elasticity equation." 8200 CALL flagerror(local_error,err,error,*999)
8203 SELECT CASE(equations_set_setup%ACTION_TYPE)
8205 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 8206 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
8207 IF(
ASSOCIATED(dependent_field))
THEN 8208 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
8209 IF(
ASSOCIATED(geometric_field))
THEN 8210 SELECT CASE(equations_set_setup%ANALYTIC_FUNCTION_TYPE)
8217 local_error=
"The thrid equations set specification of "// &
8219 &
" is invalid. The analytic function type of "// &
8221 &
" requires that the third equations set specification be a Mooney-Rivlin finite elasticity equation." 8222 CALL flagerror(local_error,err,error,*999)
8225 local_error=
"The specified analytic function type of "// &
8227 &
" is invalid for a finite elasticity equation." 8228 CALL flagerror(local_error,err,error,*999)
8231 CALL flagerror(
"Equations set geometric field is not associated.",err,error,*999)
8234 CALL flagerror(
"Equations set dependent field is not associated.",err,error,*999)
8237 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
8240 IF(
ASSOCIATED(equations_set%ANALYTIC))
THEN 8241 analytic_field=>equations_set%ANALYTIC%ANALYTIC_FIELD
8242 IF(
ASSOCIATED(analytic_field))
THEN 8243 IF(equations_set%ANALYTIC%ANALYTIC_FIELD_AUTO_CREATED)
THEN 8244 CALL field_create_finish(equations_set%DEPENDENT%DEPENDENT_FIELD,err,error,*999)
8248 CALL flagerror(
"Equations set analytic is not associated.",err,error,*999)
8251 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
8252 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
8253 &
" is invalid for a finite elasticity equation." 8254 CALL flagerror(local_error,err,error,*999)
8257 SELECT CASE(equations_set_setup%ACTION_TYPE)
8259 IF(equations_set%DEPENDENT%DEPENDENT_FINISHED)
THEN 8270 CALL flagerror(
"Equations set dependent field has not been finished.",err,error,*999)
8273 SELECT CASE(equations_set%SOLUTION_METHOD)
8280 SELECT CASE(equations_set_subtype)
8287 & [field_u_variable_type,field_v_variable_type],err,error,*999)
8298 SELECT CASE(equations%SPARSITY_TYPE)
8308 local_error=
"The equations matrices sparsity type of "// &
8310 CALL flagerror(local_error,err,error,*999)
8317 CALL flagerror(
"Not implemented.",err,error,*999)
8319 CALL flagerror(
"Not implemented.",err,error,*999)
8321 CALL flagerror(
"Not implemented.",err,error,*999)
8323 CALL flagerror(
"Not implemented.",err,error,*999)
8325 CALL flagerror(
"Not implemented.",err,error,*999)
8327 local_error=
"The solution method of "//
trim(
number_to_vstring(equations_set%SOLUTION_METHOD,
"*",err,error))// &
8329 CALL flagerror(local_error,err,error,*999)
8332 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
8333 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
8334 &
" is invalid for a finite elasticity equation." 8335 CALL flagerror(local_error,err,error,*999)
8340 SELECT CASE(equations_set_setup%ACTION_TYPE)
8342 IF(equations_set%derived%derivedFieldAutoCreated)
THEN 8343 CALL field_create_start(equations_set_setup%FIELD_USER_NUMBER,equations_set%REGION,equations_set%derived% &
8344 & derivedfield,err,error,*999)
8345 CALL field_type_set_and_lock(equations_set%derived%derivedField,field_general_type,err,error,*999)
8346 CALL field_label_set(equations_set%derived%derivedField,
"Derived Field",err,error,*999)
8347 CALL field_dependent_type_set_and_lock(equations_set%derived%derivedField,field_dependent_type, &
8349 CALL field_mesh_decomposition_get(equations_set%GEOMETRY%GEOMETRIC_FIELD,geometric_decomposition,err,error,*999)
8350 CALL field_mesh_decomposition_set_and_lock(equations_set%derived%derivedField,geometric_decomposition, &
8352 CALL field_geometric_field_set_and_lock(equations_set%derived%derivedField,equations_set%GEOMETRY% &
8353 & geometric_field,err,error,*999)
8356 IF(
ASSOCIATED(equations_set%derived))
THEN 8357 ALLOCATE(variable_types(equations_set%derived%numberOfVariables),stat=err)
8358 IF(err/=0)
CALL flagerror(
"Could not allocate derived field variable types.",err,error,*999)
8361 IF(equations_set%derived%variableTypes(derivedidx)/=0)
THEN 8363 variable_types(varidx)=equations_set%derived%variableTypes(derivedidx)
8366 IF(equations_set%derived%derivedFieldAutoCreated)
THEN 8367 CALL field_number_of_variables_set_and_lock(equations_set%derived%derivedField, &
8368 & equations_set%derived%numberOfVariables,err,error,*999)
8369 CALL field_variable_types_set_and_lock(equations_set%derived%derivedField,variable_types,err,error,*999)
8371 variabletype=equations_set%derived%variableTypes(derivedidx)
8372 IF(variabletype/=0)
THEN 8373 CALL field_data_type_set_and_lock(equations_set%derived%derivedField,variabletype, &
8374 & field_dp_type,err,error,*999)
8375 SELECT CASE(derivedidx)
8377 CALL field_dimension_set_and_lock(equations_set%derived%derivedField,variabletype, &
8378 & field_vector_dimension_type,err,error,*999)
8379 CALL field_variable_label_set(equations_set%derived%derivedField,variabletype,
"Strain",err,error,*999)
8380 CALL field_number_of_components_set_and_lock(equations_set%derived%derivedField,variabletype, &
8383 CALL field_dimension_set_and_lock(equations_set%derived%derivedField,variabletype, &
8384 & field_vector_dimension_type,err,error,*999)
8385 CALL field_variable_label_set(equations_set%derived%derivedField,variabletype,
"Stress",err,error,*999)
8386 CALL field_number_of_components_set_and_lock(equations_set%derived%derivedField,variabletype, &
8390 &
" is not supported for a finite elasticity equations set type.",err,error,*999)
8395 CALL field_create_finish(equations_set%derived%derivedField,err,error,*999)
8398 CALL field_type_check(equations_set_setup%FIELD,field_general_type,err,error,*999)
8399 CALL field_dependent_type_check(equations_set_setup%FIELD,field_dependent_type,err,error,*999)
8400 CALL field_number_of_variables_check(equations_set_setup%FIELD, &
8401 & equations_set%derived%numberOfVariables,err,error,*999)
8402 CALL field_variable_types_check(equations_set_setup%FIELD,variable_types,err,error,*999)
8405 variabletype=equations_set%derived%variableTypes(derivedidx)
8406 IF(variabletype/=0)
THEN 8407 CALL field_data_type_check(equations_set_setup%FIELD,field_u_variable_type,field_dp_type,err,error,*999)
8408 SELECT CASE(derivedidx)
8410 CALL field_dimension_check(equations_set%derived%derivedField,variabletype, &
8411 & field_vector_dimension_type,err,error,*999)
8412 CALL field_number_of_components_check(equations_set%derived%derivedField,variabletype, &
8415 CALL field_dimension_check(equations_set%derived%derivedField,variabletype, &
8416 & field_vector_dimension_type,err,error,*999)
8417 CALL field_number_of_components_check(equations_set%derived%derivedField,variabletype, &
8421 &
" is not supported for a finite elasticity equations set type.",err,error,*999)
8427 CALL flagerror(
"Equations set derived is not associated.",err,error,*999)
8430 local_error=
"The action type of "//
trim(
number_to_vstring(equations_set_setup%ACTION_TYPE,
"*",err,error))// &
8431 &
" for a setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
8432 &
" is invalid for a finite elasticity equation." 8433 CALL flagerror(local_error,err,error,*999)
8436 local_error=
"The setup type of "//
trim(
number_to_vstring(equations_set_setup%SETUP_TYPE,
"*",err,error))// &
8437 &
" is invalid for a finite elasticity equation." 8438 CALL flagerror(local_error,err,error,*999)
8441 local_error=
"The third equations set specification of "//
trim(
number_to_vstring(equations_set_subtype,
"*",err,error))// &
8442 &
" is not valid for a finite elasticity type of an elasticity equation set." 8443 CALL flagerror(local_error,err,error,*999)
8446 CALL flagerror(
"Equations set is not associated.",err,error,*999)
8449 exits(
"FINITE_ELASTICITY_EQUATIONS_SET_SETUP")
8451 999 errorsexits(
"FINITE_ELASTICITY_EQUATIONS_SET_SETUP",err,error)
8464 INTEGER(INTG),
INTENT(IN) :: SOLUTION_METHOD
8465 INTEGER(INTG),
INTENT(OUT) :: ERR
8470 enters(
"FiniteElasticity_EquationsSetSolutionMethodSet",err,error,*999)
8472 IF(
ASSOCIATED(equations_set))
THEN 8473 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 8474 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
8475 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 8476 CALL flagerror(
"Equations set specification must have three entries for a finite elasticity type equations set.", &
8479 SELECT CASE(equations_set%SPECIFICATION(3))
8510 SELECT CASE(solution_method)
8514 CALL flagerror(
"Not implemented.",err,error,*999)
8516 CALL flagerror(
"Not implemented.",err,error,*999)
8518 CALL flagerror(
"Not implemented.",err,error,*999)
8520 CALL flagerror(
"Not implemented.",err,error,*999)
8522 CALL flagerror(
"Not implemented.",err,error,*999)
8524 local_error=
"The specified solution method of "//
trim(
number_to_vstring(solution_method,
"*",err,error))//
" is invalid." 8525 CALL flagerror(local_error,err,error,*999)
8528 local_error=
"Equations set subtype of "//
trim(
number_to_vstring(equations_set%SPECIFICATION(3),
"*",err,error))// &
8529 &
" is not valid for a finite elasticity equation type of an elasticity equations set class." 8530 CALL flagerror(local_error,err,error,*999)
8533 CALL flagerror(
"Equations set is not associated.",err,error,*999)
8536 exits(
"FiniteElasticity_EquationsSetSolutionMethodSet")
8538 999
errors(
"FiniteElasticity_EquationsSetSolutionMethodSet",err,error)
8539 exits(
"FiniteElasticity_EquationsSetSolutionMethodSet")
8553 INTEGER(INTG),
INTENT(IN) :: specification(:)
8554 INTEGER(INTG),
INTENT(OUT) :: err
8558 INTEGER(INTG) :: subtype
8560 enters(
"FiniteElasticity_EquationsSetSpecificationSet",err,error,*999)
8562 IF(
ASSOCIATED(equationsset))
THEN 8563 IF(
SIZE(specification,1)/=3)
THEN 8564 CALL flagerror(
"Equations set specification must have three entries for a finite elasticity type equations set.", &
8567 subtype=specification(3)
8568 SELECT CASE(subtype)
8597 IF(
ALLOCATED(equationsset%specification))
THEN 8598 CALL flagerror(
"Equations set specification is already allocated.",err,error,*999)
8600 ALLOCATE(equationsset%specification(3),stat=err)
8601 IF(err/=0)
CALL flagerror(
"Could not allocate equations set specification.",err,error,*999)
8606 &
" is not valid for a finite elasticity equation type of an elasticity equations set class." 8607 CALL flagerror(localerror,err,error,*999)
8610 CALL flagerror(
"Equations set is not associated.",err,error,*999)
8613 exits(
"FiniteElasticity_EquationsSetSpecificationSet")
8615 999
errors(
"FiniteElasticity_EquationsSetSpecificationSet",err,error)
8616 exits(
"FiniteElasticity_EquationsSetSpecificationSet")
8631 INTEGER(INTG),
INTENT(OUT) :: ERR
8641 INTEGER(INTG) :: PROBLEM_SUBTYPE
8643 enters(
"FINITE_ELASTICITY_PROBLEM_SETUP",err,error,*999)
8645 NULLIFY(control_loop)
8647 NULLIFY(cellml_solver)
8648 NULLIFY(solver_equations)
8650 NULLIFY(cellml_equations)
8652 IF(
ASSOCIATED(problem))
THEN 8653 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 8654 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
8655 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 8656 CALL flagerror(
"Problem specification must have three entries for a finite elasticity problem.",err,error,*999)
8658 problem_subtype=problem%SPECIFICATION(3)
8659 SELECT CASE(problem_subtype)
8664 SELECT CASE(problem_setup%SETUP_TYPE)
8666 SELECT CASE(problem_setup%ACTION_TYPE)
8672 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
8674 &
" is invalid for a finite elasticity problem." 8675 CALL flagerror(local_error,err,error,*999)
8678 SELECT CASE(problem_setup%ACTION_TYPE)
8690 control_loop_root=>problem%CONTROL_LOOP
8694 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
8696 &
" is invalid for a finite elasticity problem." 8697 CALL flagerror(local_error,err,error,*999)
8701 control_loop_root=>problem%CONTROL_LOOP
8703 SELECT CASE(problem_setup%ACTION_TYPE)
8707 SELECT CASE(problem_subtype)
8722 NULLIFY(cellml_solver)
8760 local_error=
"The third problem specification of "//
trim(
number_to_vstring(problem_subtype,
"*",err,error))// &
8761 &
" is not valid for a finite elasticity type of an elasticity problem." 8762 CALL flagerror(local_error,err,error,*999)
8776 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
8778 &
" is invalid for a finite elasticity problem." 8779 CALL flagerror(local_error,err,error,*999)
8782 SELECT CASE(problem_setup%ACTION_TYPE)
8785 control_loop_root=>problem%CONTROL_LOOP
8789 SELECT CASE(problem_subtype)
8820 local_error=
"The third problem specification of "//
trim(
number_to_vstring(problem_subtype,
"*",err,error))// &
8821 &
" is not valid for a finite elasticity type of an elasticity problem." 8822 CALL flagerror(local_error,err,error,*999)
8826 control_loop_root=>problem%CONTROL_LOOP
8830 SELECT CASE(problem_subtype)
8847 local_error=
"The third problem specification of "//
trim(
number_to_vstring(problem_subtype,
"*",err,error))// &
8848 &
" is not valid for a finite elasticity type of an elasticity problem." 8849 CALL flagerror(local_error,err,error,*999)
8852 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
8854 &
" is invalid for a finite elasticity problem." 8855 CALL flagerror(local_error,err,error,*999)
8858 SELECT CASE(problem_setup%ACTION_TYPE)
8861 control_loop_root=>problem%CONTROL_LOOP
8864 SELECT CASE(problem_subtype)
8869 NULLIFY(cellml_solver)
8870 NULLIFY(cellml_equations)
8890 local_error=
"The third problem specification of "//
trim(
number_to_vstring(problem_subtype,
"*",err,error))// &
8891 &
" is not valid for a finite elasticity type of an elasticity problem." 8892 CALL flagerror(local_error,err,error,*999)
8896 control_loop_root=>problem%CONTROL_LOOP
8899 SELECT CASE(problem_subtype)
8907 NULLIFY(cellml_solver)
8908 NULLIFY(cellml_equations)
8932 local_error=
"The third problem specification of "//
trim(
number_to_vstring(problem_subtype,
"*",err,error))// &
8933 &
" is not valid for a finite elasticity type of an elasticity problem." 8934 CALL flagerror(local_error,err,error,*999)
8937 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
8939 &
" is invalid for a finite elasticity equation." 8940 CALL flagerror(local_error,err,error,*999)
8943 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
8944 &
" is invalid for a finite elasticity problem." 8945 CALL flagerror(local_error,err,error,*999)
8949 &
" is not valid for a finite elasticity type of an elasticity problem class." 8950 CALL flagerror(local_error,err,error,*999)
8953 CALL flagerror(
"Problem is not associated.",err,error,*999)
8956 exits(
"FINITE_ELASTICITY_PROBLEM_SETUP")
8958 999 errorsexits(
"FINITE_ELASTICITY_PROBLEM_SETUP",err,error)
8972 INTEGER(INTG),
INTENT(OUT) :: ERR
8976 TYPE(
solver_type),
POINTER :: nonlinearSolver,transformationSolver
8980 INTEGER(INTG) :: PROBLEM_SUBTYPE
8982 enters(
"FINITE_ELASTICITY_PROBLEM_SETUP",err,error,*999)
8984 NULLIFY(control_loop)
8985 NULLIFY(nonlinearsolver)
8986 NULLIFY(transformationsolver)
8987 NULLIFY(solver_equations)
8990 IF(
ASSOCIATED(problem))
THEN 8991 IF(.NOT.
ALLOCATED(problem%SPECIFICATION))
THEN 8992 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
8993 ELSE IF(
SIZE(problem%SPECIFICATION,1)<3)
THEN 8994 CALL flagerror(
"Problem specification must have three entries for a finite elasticity problem.",err,error,*999)
8996 problem_subtype=problem%SPECIFICATION(3)
8997 SELECT CASE(problem_subtype)
8999 SELECT CASE(problem_setup%SETUP_TYPE)
9001 SELECT CASE(problem_setup%ACTION_TYPE)
9007 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
9009 &
" is invalid for a finite elasticity problem." 9010 CALL flagerror(local_error,err,error,*999)
9013 SELECT CASE(problem_setup%ACTION_TYPE)
9020 control_loop_root=>problem%CONTROL_LOOP
9024 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
9026 &
" is invalid for a finite elasticity problem." 9027 CALL flagerror(local_error,err,error,*999)
9031 control_loop_root=>problem%CONTROL_LOOP
9033 SELECT CASE(problem_setup%ACTION_TYPE)
9052 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
9054 &
" is invalid for a finite elasticity problem." 9055 CALL flagerror(local_error,err,error,*999)
9058 SELECT CASE(problem_setup%ACTION_TYPE)
9061 control_loop_root=>problem%CONTROL_LOOP
9073 control_loop_root=>problem%CONTROL_LOOP
9082 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
9084 &
" is invalid for a finite elasticity problem." 9085 CALL flagerror(local_error,err,error,*999)
9088 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
9089 &
" is invalid for a finite elasticity problem." 9090 CALL flagerror(local_error,err,error,*999)
9093 SELECT CASE(problem_setup%SETUP_TYPE)
9095 SELECT CASE(problem_setup%ACTION_TYPE)
9101 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
9103 &
" is invalid for a finite elasticity problem." 9104 CALL flagerror(local_error,err,error,*999)
9107 SELECT CASE(problem_setup%ACTION_TYPE)
9114 control_loop_root=>problem%CONTROL_LOOP
9118 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
9120 &
" is invalid for a finite elasticity problem." 9121 CALL flagerror(local_error,err,error,*999)
9125 control_loop_root=>problem%CONTROL_LOOP
9127 SELECT CASE(problem_setup%ACTION_TYPE)
9143 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
9145 &
" is invalid for a finite elasticity problem." 9146 CALL flagerror(local_error,err,error,*999)
9149 SELECT CASE(problem_setup%ACTION_TYPE)
9152 control_loop_root=>problem%CONTROL_LOOP
9164 control_loop_root=>problem%CONTROL_LOOP
9173 local_error=
"The action type of "//
trim(
number_to_vstring(problem_setup%ACTION_TYPE,
"*",err,error))// &
9175 &
" is invalid for a finite elasticity problem." 9176 CALL flagerror(local_error,err,error,*999)
9179 local_error=
"The setup type of "//
trim(
number_to_vstring(problem_setup%SETUP_TYPE,
"*",err,error))// &
9180 &
" is invalid for a finite elasticity problem." 9181 CALL flagerror(local_error,err,error,*999)
9185 &
" is not valid for a finite elasticity contact type of an elasticity problem class." 9186 CALL flagerror(local_error,err,error,*999)
9189 CALL flagerror(
"Problem is not associated.",err,error,*999)
9192 exits(
"FiniteElasticity_ContactProblemSetup")
9194 999 errorsexits(
"FiniteElasticity_ContactProblemSetup",err,error)
9207 INTEGER(INTG),
INTENT(IN) :: problemSpecification(:)
9208 INTEGER(INTG),
INTENT(OUT) :: err
9212 INTEGER(INTG) :: problemSubtype
9214 enters(
"FiniteElasticity_ProblemSpecificationSet",err,error,*999)
9216 IF(
ASSOCIATED(problem))
THEN 9217 IF(
SIZE(problemspecification,1)<3)
THEN 9220 ELSE IF(
SIZE(problemspecification,1)==3)
THEN 9221 problemsubtype=problemspecification(3)
9222 SELECT CASE(problemsubtype)
9234 localerror=
"The third problem specification of "//
trim(
numbertovstring(problemsubtype,
"*",err,error))// &
9235 &
" is not valid for a finite elasticity type of an elasticity problem." 9236 CALL flagerror(localerror,err,error,*999)
9239 CALL flagerror(
"Finite elasticity problem specification may only have up to 3 entries.",err,error,*999)
9241 IF(
ALLOCATED(problem%specification))
THEN 9242 CALL flagerror(
"Problem specification is already allocated.",err,error,*999)
9244 ALLOCATE(problem%specification(3),stat=err)
9245 IF(err/=0)
CALL flagerror(
"Could not allocate problem specification.",err,error,*999)
9249 CALL flagerror(
"Problem is not associated.",err,error,*999)
9252 exits(
"FiniteElasticity_ProblemSpecificationSet")
9254 999
errors(
"FiniteElasticity_ProblemSpecificationSet",err,error)
9255 exits(
"FiniteElasticity_ProblemSpecificationSet")
9269 INTEGER(INTG),
INTENT(IN) :: problemSpecification(:)
9270 INTEGER(INTG),
INTENT(OUT) :: err
9274 INTEGER(INTG) :: problemSubtype
9276 enters(
"FiniteElasticity_ContactProblemSpecificationSet",err,error,*999)
9278 IF(
ASSOCIATED(problem))
THEN 9279 IF(
SIZE(problemspecification,1)<3)
THEN 9282 ELSE IF(
SIZE(problemspecification,1)==3)
THEN 9283 problemsubtype=problemspecification(3)
9284 SELECT CASE(problemsubtype)
9294 localerror=
"The third problem specification of "//
trim(
numbertovstring(problemsubtype,
"*",err,error))// &
9295 &
" is not valid for a finite elasticity contact type of an elasticity problem." 9296 CALL flagerror(localerror,err,error,*999)
9299 CALL flagerror(
"Finite elasticity contact problem specification may only have up to 3 entries.",err,error,*999)
9301 IF(
ALLOCATED(problem%specification))
THEN 9302 CALL flagerror(
"Problem specification is already allocated.",err,error,*999)
9304 ALLOCATE(problem%specification(3),stat=err)
9305 IF(err/=0)
CALL flagerror(
"Could not allocate problem specification.",err,error,*999)
9309 CALL flagerror(
"Problem is not associated.",err,error,*999)
9312 exits(
"FiniteElasticity_ContactProblemSpecificationSet")
9314 999
errors(
"FiniteElasticity_ContactProblemSpecificationSet",err,error)
9315 exits(
"FiniteElasticity_ContactProblemSpecificationSet")
9330 INTEGER(INTG),
INTENT(OUT) :: ERR
9335 TYPE(
field_type),
POINTER :: INDEPENDENT_FIELD
9337 enters(
"FINITE_ELASTICITY_POST_SOLVE",err,error,*999)
9339 IF(
ASSOCIATED(control_loop))
THEN 9340 IF(
ASSOCIATED(solver))
THEN 9341 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 9342 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 9343 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
9344 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 9345 CALL flagerror(
"Problem specification must have three entries for a finite elasticity problem.",err,error,*999)
9347 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
9349 IF(solver%GLOBAL_NUMBER==2)
THEN 9357 IF(control_loop%SUB_LOOP_INDEX==1)
THEN 9365 independent_field=>solver%SOLVERS%SOLVERS(1)%PTR%SOLVER_EQUATIONS%SOLVER_MAPPING% &
9366 & equations_sets(1)%PTR%INDEPENDENT%INDEPENDENT_FIELD
9369 CALL field_parameterstofieldparameterscopy(independent_field,&
9370 & field_u_variable_type,field_values_set_type,i+6, &
9371 & independent_field,field_u_variable_type,field_values_set_type,i+2,err,error,*999)
9376 IF(
ASSOCIATED(solver%DAE_SOLVER))
THEN 9378 ELSE IF(
ASSOCIATED(solver%NONLINEAR_SOLVER))
THEN 9386 CALL flagerror(
"Problem is not associated.",err,error,*999)
9389 CALL flagerror(
"Solver is not associated.",err,error,*999)
9392 CALL flagerror(
"Control loop is not associated.",err,error,*999)
9395 exits(
"FINITE_ELASTICITY_POST_SOLVE")
9397 999 errorsexits(
"FINITE_ELASTICITY_POST_SOLVE",err,error)
9411 INTEGER(INTG),
INTENT(OUT) :: ERR
9421 CHARACTER(14) :: FILE
9422 CHARACTER(14) :: OUTPUT_FILE
9423 LOGICAL :: EXPORT_FIELD
9424 INTEGER(INTG) :: CURRENT_LOOP_ITERATION
9425 INTEGER(INTG) :: OUTPUT_ITERATION_NUMBER
9426 INTEGER(INTG) :: equations_set_idx,loop_idx
9428 enters(
"FINITE_ELASTICITY_POST_SOLVE_OUTPUT_DATA",err,error,*999)
9430 IF(
ASSOCIATED(control_loop))
THEN 9431 IF(
ASSOCIATED(solver))
THEN 9432 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 9433 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 9434 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
9435 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 9436 CALL flagerror(
"Problem specification must have three entries for a finite elasticity problem.",err,error,*999)
9438 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
9442 solver_equations=>solver%SOLVER_EQUATIONS
9443 IF(
ASSOCIATED(solver_equations))
THEN 9444 solver_mapping=>solver_equations%SOLVER_MAPPING
9445 IF(
ASSOCIATED(solver_mapping))
THEN 9447 DO equations_set_idx=1,solver_mapping%NUMBER_OF_EQUATIONS_SETS
9448 equations_set=>solver_mapping%EQUATIONS_SETS(equations_set_idx)%PTR
9451 export_field=.false.
9452 IF(export_field)
THEN 9458 &
"STATICSOLIDSOLUTION",err,error,*999)
9466 solver_equations=>solver%SOLVER_EQUATIONS
9467 IF(
ASSOCIATED(solver_equations))
THEN 9468 solver_mapping=>solver_equations%SOLVER_MAPPING
9469 IF(
ASSOCIATED(solver_mapping))
THEN 9471 DO equations_set_idx=1,solver_mapping%NUMBER_OF_EQUATIONS_SETS
9472 equations_set=>solver_mapping%EQUATIONS_SETS(equations_set_idx)%PTR
9473 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 9474 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
9475 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)<2)
THEN 9476 CALL flagerror(
"Equations set specification does not have a type.", &
9480 time_loop=>control_loop
9482 DO loop_idx=1,control_loop%CONTROL_LOOP_LEVEL-1
9483 IF(
ASSOCIATED(time_loop%PARENT_LOOP))
THEN 9484 time_loop=>time_loop%PARENT_LOOP
9486 CALL flagerror(
"Could not find a time control loop.",err,error,*999)
9489 current_loop_iteration=time_loop%TIME_LOOP%ITERATION_NUMBER
9490 output_iteration_number=time_loop%TIME_LOOP%OUTPUT_NUMBER
9493 IF(time_loop%TIME_LOOP%CURRENT_TIME<=time_loop%TIME_LOOP%STOP_TIME)
THEN 9494 WRITE(output_file,
'("S_TIMESTP_",I4.4)') current_loop_iteration
9498 IF(export_field)
THEN 9499 IF(output_iteration_number/=0.AND.mod(current_loop_iteration,output_iteration_number)==0)
THEN 9518 local_error=
"The third problem specification of "// &
9520 &
" is not valid for a finite elasticity problem class." 9521 CALL flagerror(local_error,err,error,*999)
9524 CALL flagerror(
"Problem is not associated.",err,error,*999)
9527 CALL flagerror(
"Solver is not associated.",err,error,*999)
9530 CALL flagerror(
"Control loop is not associated.",err,error,*999)
9533 exits(
"FINITE_ELASTICITY_POST_SOLVE_OUTPUT_DATA")
9535 999 errorsexits(
"FINITE_ELASTICITY_POST_SOLVE_OUTPUT_DATA",err,error)
9548 INTEGER(INTG),
INTENT(OUT) :: ERR
9554 TYPE(
field_type),
POINTER :: INDEPENDENT_FIELD
9556 NULLIFY(solver_solid)
9557 NULLIFY(control_loop_solid)
9559 enters(
"FiniteElasticity_ControlTimeLoopPreLoop",err,error,*999)
9561 IF(
ASSOCIATED(control_loop))
THEN 9562 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 9563 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 9564 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
9565 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 9566 CALL flagerror(
"Problem specification must have three entries for a finite elasticity problem.",err,error,*999)
9568 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
9570 control_loop_solid=>control_loop
9572 independent_field=>solver_solid%SOLVER_EQUATIONS%SOLVER_MAPPING% &
9573 & equations_sets(1)%PTR%INDEPENDENT%INDEPENDENT_FIELD
9575 CALL field_component_values_initialise(independent_field,field_u_variable_type, &
9576 & field_values_set_type,1,control_loop%TIME_LOOP%TIME_INCREMENT,err,error,*999)
9578 CALL field_component_values_initialise(independent_field,field_u_variable_type, &
9579 & field_values_set_type,2,control_loop%TIME_LOOP%CURRENT_TIME,err,error,*999)
9600 CALL flagerror(
"Problem is not associated.",err,error,*999)
9603 CALL flagerror(
"Control loop is not associated.",err,error,*999)
9606 exits(
"FiniteElasticity_ControlTimeLoopPreLoop")
9608 999 errorsexits(
"FiniteElasticity_ControlTimeLoopPreLoop",err,error)
9622 INTEGER(INTG),
INTENT(OUT) :: err
9631 INTEGER(INTG) :: solverIdx,equationsSetIdx,incrementIdx,outputNumber
9635 enters(
"FiniteElasticity_ControlLoadIncrementLoopPostLoop",err,error,*999)
9637 IF(
ASSOCIATED(controlloop))
THEN 9639 incrementidx=controlloop%LOAD_INCREMENT_LOOP%ITERATION_NUMBER
9640 outputnumber=controlloop%LOAD_INCREMENT_LOOP%OUTPUT_NUMBER
9641 IF(outputnumber>0)
THEN 9642 IF(mod(incrementidx,outputnumber)==0)
THEN 9643 solvers=>controlloop%SOLVERS
9644 IF(
ASSOCIATED(solvers))
THEN 9645 DO solveridx=1,solvers%NUMBER_OF_SOLVERS
9646 solver=>solvers%SOLVERS(solveridx)%PTR
9647 IF(
ASSOCIATED(solver))
THEN 9648 solverequations=>solver%SOLVER_EQUATIONS
9649 IF(
ASSOCIATED(solverequations))
THEN 9650 solvermapping=>solver%SOLVER_EQUATIONS%SOLVER_MAPPING
9651 IF(
ASSOCIATED(solvermapping))
THEN 9652 DO equationssetidx=1,solvermapping%NUMBER_OF_EQUATIONS_SETS
9653 region=>solvermapping%EQUATIONS_SETS(equationssetidx)%PTR%REGION
9655 fields=>region%FIELDS
9656 directory=
"results_load/" 9657 INQUIRE(file=
char(directory),exist=direxist)
9658 IF(.NOT.direxist)
THEN 9659 CALL system(
char(
"mkdir "//directory))
9672 CALL flagerror(
"Control loop solvers is not associated.",err,error,*999)
9678 CALL flagerror(
"Control loop is not associated.",err,error,*999)
9681 exits(
"FiniteElasticity_ControlLoadIncrementLoopPostLoop")
9683 999
errors(
"FiniteElasticity_ControlLoadIncrementLoopPostLoop",err,error)
9684 exits(
"FiniteElasticity_ControlLoadIncrementLoopPostLoop")
9699 INTEGER(INTG),
INTENT(OUT) :: ERR
9703 INTEGER(INTG) :: solver_matrix_idx,equations_set_idx
9704 LOGICAL :: CELLMLSOLVER,NONLINEARSOLVER,VALID_SUBTYPE
9705 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
9715 enters(
"FINITE_ELASTICITY_PRE_SOLVE",err,error,*999)
9717 IF(
ASSOCIATED(control_loop))
THEN 9718 IF(
ASSOCIATED(solver))
THEN 9719 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 9720 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 9721 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
9722 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 9723 CALL flagerror(
"Problem specification must have three entries for a finite elasticity problem.",err,error,*999)
9725 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
9731 IF(solver%GLOBAL_NUMBER==1)
THEN 9733 nonlinearsolver=.false.
9735 cellmlsolver=.false.
9736 nonlinearsolver=.true.
9739 cellmlsolver=.false.
9740 nonlinearsolver=.true.
9742 IF(cellmlsolver)
THEN 9746 IF(nonlinearsolver)
THEN 9747 solver_equations=>solver%SOLVER_EQUATIONS
9748 IF(
ASSOCIATED(solver_equations))
THEN 9749 solver_mapping=>solver_equations%SOLVER_MAPPING
9750 IF(
ASSOCIATED(solver_mapping))
THEN 9751 valid_subtype=.false.
9752 DO equations_set_idx=1,solver_mapping%NUMBER_OF_EQUATIONS_SETS
9753 equations_set=>solver_mapping%EQUATIONS_SETS(equations_set_idx)%PTR
9756 valid_subtype=.true.
9758 dependent_field=>equations_set%EQUATIONS%INTERPOLATION%DEPENDENT_FIELD
9760 & field_u1_variable_type,err,error,*999)
9762 cellml_solver=>solver%NONLINEAR_SOLVER%NEWTON_SOLVER%CELLML_EVALUATOR_SOLVER
9763 IF(
ASSOCIATED(cellml_solver))
THEN 9769 IF(valid_subtype .NEQV. .true.)
THEN 9770 local_error=
"The third equations set specification of "// &
9772 & error))//
"is not valid for a finite elasticity third problem specification of "//
trim( &
9774 CALL flagerror(local_error,err,error,*999)
9777 CALL flagerror(
"Solver mapping is not associated.",err,error,*999)
9780 CALL flagerror(
"Solver equations is not associated.",err,error,*999)
9807 solver_equations=>solver%SOLVER_EQUATIONS
9808 IF(
ASSOCIATED(solver_equations))
THEN 9809 solver_mapping=>solver_equations%SOLVER_MAPPING
9810 IF(
ASSOCIATED(solver_mapping))
THEN 9811 solver_matrices=>solver_equations%SOLVER_MATRICES
9812 IF(
ASSOCIATED(solver_matrices))
THEN 9813 DO solver_matrix_idx=1,solver_mapping%NUMBER_OF_SOLVER_MATRICES
9814 solver_matrix=>solver_matrices%MATRICES(solver_matrix_idx)%PTR
9815 IF(
ASSOCIATED(solver_matrix))
THEN 9816 solver_matrix%UPDATE_MATRIX=.true.
9818 CALL flagerror(
"Solver Matrix is not associated.",err,error,*999)
9822 CALL flagerror(
"Solver Matrices is not associated.",err,error,*999)
9825 CALL flagerror(
"Solver mapping is not associated.",err,error,*999)
9828 CALL flagerror(
"Solver equations is not associated.",err,error,*999)
9831 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
9832 &
" is not valid for a finite elasticity problem class." 9833 CALL flagerror(local_error,err,error,*999)
9836 CALL flagerror(
"Problem is not associated.",err,error,*999)
9839 CALL flagerror(
"Solver is not associated.",err,error,*999)
9842 CALL flagerror(
"Control loop is not associated.",err,error,*999)
9845 exits(
"FINITE_ELASTICITY_PRE_SOLVE")
9847 999 errorsexits(
"FINITE_ELASTICITY_PRE_SOLVE",err,error)
9860 INTEGER(INTG),
INTENT(OUT) :: ERR
9869 INTEGER(INTG) :: solver_matrix_idx,equations_set_idx
9871 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD,INDEPENDENT_FIELD,FIBRE_FIELD,GEOMETRIC_FIELD,MATERIALS_FIELD
9873 INTEGER(INTG) :: gauss_idx,element_idx,ne
9874 INTEGER(INTG) :: DEPENDENT_NUMBER_OF_GAUSS_POINTS
9880 & FIBRE_INTERPOLATION_PARAMETERS,MATERIALS_INTERPOLATION_PARAMETERS,DEPENDENT_INTERPOLATION_PARAMETERS
9882 & MATERIALS_INTERPOLATED_POINT,DEPENDENT_INTERPOLATED_POINT,INDEPENDENT_INTERPOLATED_POINT
9884 & DEPENDENT_INTERPOLATED_POINT_METRICS
9887 INTEGER(INTG) :: FIELD_VAR_TYPE
9888 INTEGER(INTG) :: dof_idx,idx,i,j,LWORK
9889 INTEGER(INTG) :: MESH_COMPONENT_NUMBER
9890 REAL(DP) :: DZDXI(3,3),DZDNU(3,3),DZDNUT(3,3),TEMP(3,3)
9891 REAL(DP),
DIMENSION (:),
POINTER :: C
9893 REAL(DP) :: TOL,TOL1,UP,LOW
9894 REAL(DP) :: F_e(3,3),F_a_inv(3,3),F_a_inv_T(3,3),F_a_T(3,3),C_a(3,3),C_a_inv(3,3),lambda_a,C_e(3,3),F_e_T(3,3)
9895 REAL(DP) :: REFERENCE_VOLUME,XB_STIFFNESS,XB_DISTORTION
9896 REAL(DP) :: SARCO_LENGTH,FREE_ENERGY,FREE_ENERGY_0,XB_ENERGY_PER_VOLUME,SLOPE,lambda_f,A_1,A_2,x_1,x_2
9897 REAL(DP) :: MAX_XB_NUMBER_PER_VOLUME,ENERGY_PER_XB,FORCE_LENGTH,I_1e,EVALUES(3),EVECTOR_1(3),EVECTOR_2(3),EVECTOR_3(3)
9898 REAL(DP) :: EMATRIX_1(3,3),EMATRIX_2(3,3),EMATRIX_3(3,3),TEMP1(3,3),TEMP2(3,3),TEMP3(3,3),N1(3,3),N2(3,3),N3(3,3)
9899 INTEGER(INTG),
PARAMETER :: LWMAX=1000
9900 REAL(DP) :: WORK(lwmax)
9902 enters(
"FINITE_ELASTICITY_EVALUATE_EVOLUTION_LAW",err,error,*999)
9904 NULLIFY(elements_mapping)
9905 NULLIFY(decomposition)
9906 NULLIFY(dependent_basis,geometric_basis)
9908 NULLIFY(dependent_field,fibre_field,geometric_field,materials_field,independent_field)
9909 NULLIFY(field_variable)
9910 NULLIFY(dependent_quadrature_scheme)
9911 NULLIFY(geometric_interpolation_parameters,fibre_interpolation_parameters)
9912 NULLIFY(materials_interpolation_parameters,dependent_interpolation_parameters)
9913 NULLIFY(independent_interpolation_parameters)
9914 NULLIFY(geometric_interpolated_point,fibre_interpolated_point)
9915 NULLIFY(geometric_interpolated_point_metrics,dependent_interpolated_point_metrics)
9916 NULLIFY(materials_interpolated_point,dependent_interpolated_point)
9917 NULLIFY(independent_interpolated_point)
9920 solver_equations=>solver%SOLVER_EQUATIONS
9921 IF(
ASSOCIATED(solver_equations))
THEN 9922 solver_mapping=>solver_equations%SOLVER_MAPPING
9923 IF(
ASSOCIATED(solver_mapping))
THEN 9924 DO equations_set_idx=1,solver_mapping%NUMBER_OF_EQUATIONS_SETS
9925 equations_set=>solver_mapping%EQUATIONS_SETS(equations_set_idx)%PTR
9926 equations=>equations_set%EQUATIONS
9928 fibre_field =>equations%INTERPOLATION%FIBRE_FIELD
9929 geometric_field =>equations%INTERPOLATION%GEOMETRIC_FIELD
9930 materials_field =>equations%INTERPOLATION%MATERIALS_FIELD
9931 dependent_field =>equations%INTERPOLATION%DEPENDENT_FIELD
9932 independent_field=>equations%INTERPOLATION%INDEPENDENT_FIELD
9936 dependent_field=>equations%INTERPOLATION%DEPENDENT_FIELD
9937 independent_field=>equations%INTERPOLATION%INDEPENDENT_FIELD
9938 fibre_field=>equations%INTERPOLATION%FIBRE_FIELD
9940 decomposition=>dependent_field%DECOMPOSITION
9942 elements_mapping=>decomposition%DOMAIN(decomposition%MESH_COMPONENT_NUMBER)% &
9943 &
ptr%MAPPINGS%ELEMENTS
9945 DO element_idx=elements_mapping%INTERNAL_START,elements_mapping%INTERNAL_FINISH
9946 ne=elements_mapping%DOMAIN_LIST(element_idx)
9948 mesh_component_number=decomposition%MESH_COMPONENT_NUMBER
9950 dependent_basis=>decomposition%DOMAIN(mesh_component_number)%PTR%TOPOLOGY%ELEMENTS% &
9951 & elements(ne)%BASIS
9952 dependent_quadrature_scheme=>dependent_basis%QUADRATURE% &
9954 dependent_number_of_gauss_points=dependent_quadrature_scheme%NUMBER_OF_GAUSS
9955 geometric_basis=>geometric_field%DECOMPOSITION%DOMAIN(geometric_field%DECOMPOSITION%MESH_COMPONENT_NUMBER)%&
9956 &
ptr%TOPOLOGY%ELEMENTS%ELEMENTS(ne)%BASIS
9961 dzdnu(idx,idx)=1.0_dp
9965 field_var_type=equations%EQUATIONS_MAPPING%NONLINEAR_MAPPING%RESIDUAL_VARIABLES(1)%PTR%VARIABLE_TYPE
9966 dependent_interpolation_parameters=>equations%INTERPOLATION%DEPENDENT_INTERP_PARAMETERS(field_var_type)%PTR
9967 geometric_interpolation_parameters=>equations%INTERPOLATION% &
9968 & geometric_interp_parameters(field_u_variable_type)%PTR
9969 IF(
ASSOCIATED(fibre_field))
THEN 9970 fibre_interpolation_parameters=>equations%INTERPOLATION%FIBRE_INTERP_PARAMETERS(field_u_variable_type)%PTR
9972 IF(
ASSOCIATED(materials_field))
THEN 9973 materials_interpolation_parameters=>equations%INTERPOLATION% &
9974 & materials_interp_parameters(field_u_variable_type)%PTR
9979 CALL field_interpolation_parameters_element_get(field_values_set_type,ne, &
9980 & geometric_interpolation_parameters,err,error,*999)
9981 IF(
ASSOCIATED(fibre_field))
THEN 9982 CALL field_interpolation_parameters_element_get(field_values_set_type,ne, &
9983 & fibre_interpolation_parameters,err,error,*999)
9985 IF(
ASSOCIATED(materials_field))
THEN 9986 CALL field_interpolation_parameters_element_get(field_values_set_type,ne, &
9987 & materials_interpolation_parameters,err,error,*999)
9989 CALL field_interpolation_parameters_element_get(field_values_set_type,ne, &
9990 & dependent_interpolation_parameters,err,error,*999)
9995 geometric_interpolated_point=>equations%INTERPOLATION%GEOMETRIC_INTERP_POINT(field_u_variable_type)%PTR
9996 geometric_interpolated_point_metrics=>equations%INTERPOLATION% &
9997 & geometric_interp_point_metrics(field_u_variable_type)%PTR
9998 IF(
ASSOCIATED(fibre_field))
THEN 9999 fibre_interpolated_point=>equations%INTERPOLATION%FIBRE_INTERP_POINT(field_u_variable_type)%PTR
10001 IF(
ASSOCIATED(materials_field))
THEN 10002 materials_interpolated_point=>equations%INTERPOLATION%MATERIALS_INTERP_POINT(field_u_variable_type)%PTR
10004 dependent_interpolated_point=>equations%INTERPOLATION%DEPENDENT_INTERP_POINT(field_var_type)%PTR
10005 dependent_interpolated_point_metrics=>equations%INTERPOLATION% &
10006 & dependent_interp_point_metrics(field_var_type)%PTR
10009 c=>materials_interpolated_point%VALUES(:,1)
10012 DO gauss_idx=1,dependent_number_of_gauss_points
10016 & dependent_interpolated_point,err,error,*999)
10017 CALL field_interpolated_point_metrics_calculate(dependent_basis%NUMBER_OF_XI, &
10018 & dependent_interpolated_point_metrics,err,error,*999)
10020 & geometric_interpolated_point,err,error,*999)
10021 CALL field_interpolated_point_metrics_calculate(geometric_basis%NUMBER_OF_XI, &
10022 & geometric_interpolated_point_metrics,err,error,*999)
10023 IF(
ASSOCIATED(fibre_field))
THEN 10025 & fibre_interpolated_point,err,error,*999)
10028 & materials_interpolated_point,err,error,*999)
10034 & geometric_interpolated_point_metrics,fibre_interpolated_point,dzdnu,err,error,*999)
10037 NULLIFY(field_variable)
10038 CALL field_variable_get(independent_field,field_u_variable_type,field_variable,err,error,*999)
10040 dof_idx=field_variable%COMPONENTS(1)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_idx,ne)
10041 CALL field_parameter_set_get_local_dof(independent_field,field_u_variable_type,field_values_set_type, &
10042 & dof_idx,a_1,err,error,*999)
10043 dof_idx=field_variable%COMPONENTS(2)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_idx,ne)
10044 CALL field_parameter_set_get_local_dof(independent_field,field_u_variable_type,field_values_set_type, &
10045 & dof_idx,a_2,err,error,*999)
10046 dof_idx=field_variable%COMPONENTS(3)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_idx,ne)
10047 CALL field_parameter_set_get_local_dof(independent_field,field_u_variable_type,field_values_set_type, &
10048 & dof_idx,x_1,err,error,*999)
10049 dof_idx=field_variable%COMPONENTS(4)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_idx,ne)
10050 CALL field_parameter_set_get_local_dof(independent_field,field_u_variable_type,field_values_set_type, &
10051 & dof_idx,x_2,err,error,*999)
10054 sarco_length=dzdnu(1,1)
10056 IF(sarco_length.LE.0.635_dp)
THEN 10057 force_length=0.0_dp
10058 ELSE IF(sarco_length.LE.0.835_dp)
THEN 10059 force_length=4.2_dp*(sarco_length-0.635_dp)
10060 ELSE IF(sarco_length.LE.1.0_dp)
THEN 10061 force_length=0.84_dp+0.9697_dp*(sarco_length-0.835_dp)
10062 ELSE IF(sarco_length.LE.1.125_dp)
THEN 10063 force_length=1.0_dp
10064 ELSE IF(sarco_length.LE.1.825_dp)
THEN 10065 force_length=1.0_dp-1.4286_dp*(sarco_length-1.125_dp)
10067 force_length=0.0_dp
10070 reference_volume=1.4965e-03_dp
10071 max_xb_number_per_volume=120.0_dp*2.0_dp/reference_volume
10072 energy_per_xb=0.5_dp*x_2**2*c(8)
10075 xb_energy_per_volume=max_xb_number_per_volume*force_length*energy_per_xb*a_2
10077 xb_energy_per_volume=xb_energy_per_volume*1e+08_dp
10083 f_a_inv(1,1)=1.0_dp/lambda_a
10084 f_a_inv(2,2)=1.0_dp
10085 f_a_inv(3,3)=1.0_dp
10093 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
10094 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
10095 lwork=min(lwmax,int(work(1)))
10096 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
10097 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
10104 ematrix_1(i,j)=evector_1(i)*evector_1(j)
10105 ematrix_2(i,j)=evector_2(i)*evector_2(j)
10106 ematrix_3(i,j)=evector_3(i)*evector_3(j)
10117 free_energy_0=0.0_dp
10119 free_energy_0=free_energy_0+c(i)/c(i+3)*( &
10120 & evalues(1)**(c(i+3)/2.0_dp)+ &
10121 & evalues(2)**(c(i+3)/2.0_dp)+ &
10122 & evalues(3)**(c(i+3)/2.0_dp)-3.0_dp)
10124 free_energy_0=c(7)*free_energy_0
10126 free_energy=free_energy_0
10128 VALUE=xb_energy_per_volume-(free_energy-free_energy_0)
10137 DO WHILE (abs(
VALUE).GE.tol)
10140 IF (abs(
VALUE).GE.tol1)
THEN 10141 lambda_a=up-(up-low)/2.0_dp
10144 f_a_inv(1,1)=1.0_dp/lambda_a
10145 f_a_inv(2,2)=1.0_dp
10146 f_a_inv(3,3)=1.0_dp
10152 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
10153 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
10154 lwork=min(lwmax,int(work(1)))
10155 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
10156 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
10163 ematrix_1(i,j)=evector_1(i)*evector_1(j)
10164 ematrix_2(i,j)=evector_2(i)*evector_2(j)
10165 ematrix_3(i,j)=evector_3(i)*evector_3(j)
10178 free_energy=free_energy+c(i)/c(i+3)*( &
10179 & evalues(1)**(c(i+3)/2.0_dp)+ &
10180 & evalues(2)**(c(i+3)/2.0_dp)+ &
10181 & evalues(3)**(c(i+3)/2.0_dp)-3.0_dp)
10183 free_energy=c(7)*free_energy
10185 VALUE=xb_energy_per_volume-(free_energy-free_energy_0)
10187 IF (
VALUE.GE.0)
THEN 10205 & c(i)*evalues(1)**(c(i+3)/2.0_dp-1.0_dp)*temp1+ &
10206 & c(i)*evalues(2)**(c(i+3)/2.0_dp-1.0_dp)*temp2+ &
10207 & c(i)*evalues(3)**(c(i+3)/2.0_dp-1.0_dp)*temp3
10211 lambda_a=lambda_a-
VALUE/slope
10218 f_a_inv(1,1)=1.0_dp/lambda_a
10219 f_a_inv(2,2)=1.0_dp
10220 f_a_inv(3,3)=1.0_dp
10226 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,-1,err)
10227 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
10228 lwork=min(lwmax,int(work(1)))
10229 CALL dsyev(
'V',
'U',3,c_e,3,evalues,work,lwork,err)
10230 IF(err.NE.0)
CALL flagerror(
"Error in Eigenvalue computation",err,error,*999)
10237 ematrix_1(i,j)=evector_1(i)*evector_1(j)
10238 ematrix_2(i,j)=evector_2(i)*evector_2(j)
10239 ematrix_3(i,j)=evector_3(i)*evector_3(j)
10252 free_energy=free_energy+c(i)/c(i+3)*( &
10253 & evalues(1)**(c(i+3)/2.0_dp)+ &
10254 & evalues(2)**(c(i+3)/2.0_dp)+ &
10255 & evalues(3)**(c(i+3)/2.0_dp)-3.0_dp)
10257 free_energy=c(7)*free_energy
10259 VALUE=xb_energy_per_volume-(free_energy-free_energy_0)
10264 dof_idx=field_variable%COMPONENTS(5)%PARAM_TO_DOF_MAP%GAUSS_POINT_PARAM2DOF_MAP%GAUSS_POINTS(gauss_idx,ne)
10265 CALL field_parameter_set_update_local_dof(independent_field,field_u_variable_type,field_values_set_type, &
10266 & dof_idx,lambda_a,err,error,*999)
10271 local_error=
"This routine is not implemented for the third equations set specification of "// &
10273 &
" of a finite elasticity type of an elasticity equation set." 10274 CALL flagerror(local_error,err,error,*999)
10280 exits(
"FINITE_ELASTICITY_EVALUATE_EVOLUTION_LAW")
10282 999
errors(
"FINITE_ELASTICITY_EVALUATE_EVOLUTION_LAW",err,error)
10283 exits(
"FINITE_ELASTICITY_EVALUATE_EVOLUTION_LAW")
10296 INTEGER(INTG),
INTENT(OUT) :: ERR
10300 TYPE(
solver_type),
POINTER :: SOLVER_FINITE_ELASTICITY
10301 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD_FINITE_ELASTICITY
10308 REAL(DP),
POINTER :: MESH_DISPLACEMENT_VALUES(:)
10309 REAL(DP),
POINTER :: DUMMY_VALUES2(:)
10310 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT
10312 INTEGER(INTG) :: NUMBER_OF_DIMENSIONS,NDOFS_TO_PRINT
10313 INTEGER(INTG) :: INPUT_TYPE,INPUT_OPTION
10314 INTEGER(INTG) :: loop_idx
10316 enters(
"FiniteElasticity_PreSolveGetSolidDisplacement",err,error,*999)
10320 NULLIFY(solver_finite_elasticity)
10321 NULLIFY(mesh_displacement_values)
10322 NULLIFY(dummy_values2)
10324 IF(
ASSOCIATED(control_loop))
THEN 10325 control_time_loop=>control_loop
10326 DO loop_idx=1,control_loop%CONTROL_LOOP_LEVEL
10331 IF (
ASSOCIATED(control_loop%PARENT_LOOP))
THEN 10332 control_time_loop=>control_time_loop%PARENT_LOOP
10334 CALL flagerror(
"Could not find a time control loop.",err,error,*999)
10338 IF(
ASSOCIATED(solver))
THEN 10339 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 10340 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 10341 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
10342 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 10343 CALL flagerror(
"Problem specification must have three entries for a finite elasticity problem.",err,error,*999)
10345 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
10351 IF(solver%GLOBAL_NUMBER==1)
THEN 10353 solver_equations_finite_elasticity=>solver_finite_elasticity%SOLVER_EQUATIONS
10354 IF(
ASSOCIATED(solver_equations_finite_elasticity))
THEN 10355 solver_mapping_finite_elasticity=>solver_equations_finite_elasticity%SOLVER_MAPPING
10356 IF(
ASSOCIATED(solver_mapping_finite_elasticity))
THEN 10357 equations_set_finite_elasticity=>solver_mapping_finite_elasticity%EQUATIONS_SETS(1)%PTR
10358 IF(
ASSOCIATED(equations_set_finite_elasticity))
THEN 10359 dependent_field_finite_elasticity=>equations_set_finite_elasticity%DEPENDENT%DEPENDENT_FIELD
10361 CALL flagerror(
"Finite elasticity equations set is not associated.",err,error,*999)
10365 CALL field_number_of_components_get(equations_set_finite_elasticity%GEOMETRY%GEOMETRIC_FIELD, &
10366 & field_u_variable_type,number_of_dimensions,err,error,*999)
10373 CALL field_parameter_set_data_get(equations_set_finite_elasticity%DEPENDENT%DEPENDENT_FIELD, &
10374 & field_u_variable_type,field_values_set_type,mesh_displacement_values,err,error,*999)
10376 & number_of_dimensions,input_type,input_option,control_loop%TIME_LOOP%ITERATION_NUMBER,1.0_dp)
10377 CALL field_parameter_set_update_start(equations_set_finite_elasticity%DEPENDENT%DEPENDENT_FIELD, &
10378 & field_u_variable_type,field_values_set_type,err,error,*999)
10379 CALL field_parameter_set_update_finish(equations_set_finite_elasticity%DEPENDENT%DEPENDENT_FIELD, &
10380 & field_u_variable_type,field_values_set_type,err,error,*999)
10382 CALL flagerror(
"Finite elasticity solver mapping is not associated.",err,error,*999)
10385 CALL flagerror(
"Finite elasticity solver equations are not associated.",err,error,*999)
10389 ndofs_to_print =
SIZE(mesh_displacement_values,1)
10391 & mesh_displacement_values,
'(" MESH_DISPLACEMENT_VALUES = ",4(X,E13.6))',
'4(4(X,E13.6))', &
10398 local_error=
"Problem subtype "//
trim(
number_to_vstring(control_loop%PROBLEM%SPECIFICATION(3),
"*",err,error))// &
10399 &
" is not valid for a Finite elasticity equation fluid type of a fluid mechanics problem class." 10400 CALL flagerror(local_error,err,error,*999)
10403 CALL flagerror(
"Problem is not associated.",err,error,*999)
10406 CALL flagerror(
"Solver is not associated.",err,error,*999)
10409 CALL flagerror(
"Control loop is not associated.",err,error,*999)
10412 exits(
"FiniteElasticity_PreSolveGetSolidDisplacement")
10414 999
errors(
"FiniteElasticity_PreSolveGetSolidDisplacement",err,error)
10415 exits(
"FiniteElasticity_PreSolveGetSolidDisplacement")
10430 INTEGER(INTG),
INTENT(OUT) :: ERR
10439 TYPE(
field_type),
POINTER :: DEPENDENT_FIELD, GEOMETRIC_FIELD
10444 REAL(DP) :: CURRENT_TIME,TIME_INCREMENT,ALPHA
10445 REAL(DP),
POINTER :: GEOMETRIC_FIELD_VALUES(:)
10446 REAL(DP),
POINTER :: MESH_POSITION_VALUES(:)
10447 REAL(DP),
POINTER :: DUMMY_VALUES1(:), CURRENT_PRESSURE_VALUES(:)
10448 REAL(DP),
ALLOCATABLE :: NEW_PRESSURE_VALUES(:)
10450 INTEGER(INTG) :: BOUNDARY_CONDITION_CHECK_VARIABLE
10451 INTEGER(INTG) :: dof_number,GEOMETRY_NUMBER_OF_DOFS,DEPENDENT_NUMBER_OF_DOFS
10452 INTEGER(INTG) :: NDOFS_TO_PRINT
10453 INTEGER(INTG) :: loop_idx
10454 INTEGER(INTG) :: SUBITERATION_NUMBER
10456 enters(
"FiniteElasticity_PreSolveUpdateBoundaryConditions",err,error,*999)
10459 NULLIFY( current_pressure_values, dummy_values1 )
10462 IF(
ASSOCIATED(control_loop))
THEN 10463 control_time_loop=>control_loop
10464 DO loop_idx=1,control_loop%CONTROL_LOOP_LEVEL
10469 IF (
ASSOCIATED(control_loop%PARENT_LOOP))
THEN 10470 control_time_loop=>control_time_loop%PARENT_LOOP
10472 CALL flagerror(
"Could not find a time control loop.",err,error,*999)
10475 IF(
ASSOCIATED(solver))
THEN 10476 IF(solver%GLOBAL_NUMBER==1)
THEN 10477 IF(
ASSOCIATED(control_loop%PROBLEM))
THEN 10478 IF(.NOT.
ALLOCATED(control_loop%PROBLEM%SPECIFICATION))
THEN 10479 CALL flagerror(
"Problem specification is not allocated.",err,error,*999)
10480 ELSE IF(
SIZE(control_loop%PROBLEM%SPECIFICATION,1)<3)
THEN 10481 CALL flagerror(
"Problem specification must have three entries for a finite elasticity problem.",err,error,*999)
10483 SELECT CASE(control_loop%PROBLEM%SPECIFICATION(3))
10485 solver_equations=>solver%SOLVER_EQUATIONS
10486 IF(
ASSOCIATED(solver_equations))
THEN 10487 solver_mapping=>solver_equations%SOLVER_MAPPING
10488 IF(
ASSOCIATED(solver_mapping))
THEN 10489 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
10490 IF(
ASSOCIATED(equations))
THEN 10491 equations_set=>equations%EQUATIONS_SET
10492 IF(
ASSOCIATED(equations_set))
THEN 10493 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 10494 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
10495 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 10496 CALL flagerror(
"Equations set specification must have three entries for a finite elasticity type "// &
10497 &
"equations set.",err,error,*999)
10499 SELECT CASE(equations_set%SPECIFICATION(3))
10502 subiteration_number=control_loop%sub_loops(1)%ptr%while_loop%iteration_number
10503 write(*,*)
'SUBITERATION_NUMBER = ',subiteration_number
10505 CALL flagerror(
"Could not find SUBITERATION_NUMBER.",err,error,*999)
10508 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
10509 IF(
ASSOCIATED(dependent_field))
THEN 10510 boundary_conditions=>solver_equations%BOUNDARY_CONDITIONS
10511 IF(
ASSOCIATED(boundary_conditions))
THEN 10512 equations_mapping=>equations_set%EQUATIONS%EQUATIONS_MAPPING
10513 IF(
ASSOCIATED(equations_mapping))
THEN 10514 CALL field_variable_get(dependent_field,field_deludeln_variable_type,field_variable, &
10516 IF(
ASSOCIATED(field_variable))
THEN 10518 & boundary_conditions_variable,err,error,*999)
10519 IF(
ASSOCIATED(boundary_conditions_variable))
THEN 10521 CALL field_parameter_set_data_get(dependent_field,field_deludeln_variable_type, &
10522 & field_pressure_values_set_type,current_pressure_values,err,error,*999)
10525 ndofs_to_print =
SIZE(current_pressure_values,1)
10527 & ndofs_to_print,current_pressure_values, &
10528 &
'(" DEP_FIELD,FIELD_U_VAR_TYPE,FIELD_PRESSURE_VAL_SET_TYPE (before) = ",4(X,E13.6))',&
10529 &
'4(4(X,E13.6))',err,error,*999)
10530 CALL field_parameter_set_data_restore(dependent_field,field_deludeln_variable_type, &
10531 & field_pressure_values_set_type,current_pressure_values,err,error,*999)
10534 dependent_number_of_dofs=dependent_field%VARIABLE_TYPE_MAP(field_deludeln_variable_type)% &
10535 &
ptr%NUMBER_OF_DOFS
10537 ALLOCATE(new_pressure_values(dependent_number_of_dofs))
10541 alpha = ( current_time + time_increment ) / current_time
10542 new_pressure_values(1:dependent_number_of_dofs) = alpha * &
10543 & current_pressure_values(1:dependent_number_of_dofs)
10547 DO dof_number=1,dependent_number_of_dofs
10548 CALL field_parameter_set_update_local_dof(dependent_field, &
10549 & field_deludeln_variable_type,field_pressure_values_set_type,dof_number, &
10550 & new_pressure_values(dof_number),err,error,*999)
10552 CALL field_parameter_set_update_start(dependent_field, &
10553 & field_deludeln_variable_type, field_pressure_values_set_type,err,error,*999)
10554 CALL field_parameter_set_update_finish(dependent_field, &
10555 & field_deludeln_variable_type, field_pressure_values_set_type,err,error,*999)
10557 DEALLOCATE(new_pressure_values)
10560 NULLIFY( dummy_values1 )
10561 CALL field_parameter_set_data_get(dependent_field,field_deludeln_variable_type, &
10562 & field_pressure_values_set_type,dummy_values1,err,error,*999)
10563 ndofs_to_print =
SIZE(dummy_values1,1)
10565 & ndofs_to_print,dummy_values1, &
10566 &
'(" DEP_FIELD,FIELD_U_VAR_TYPE,FIELD_PRESSURE_VAL_SET_TYPE (after) = ",4(X,E13.6))', &
10567 &
'4(4(X,E13.6))',err,error,*999)
10568 CALL field_parameter_set_data_restore(dependent_field,field_deludeln_variable_type, &
10569 & field_pressure_values_set_type,dummy_values1,err,error,*999)
10571 CALL field_parameter_set_data_restore(dependent_field,field_deludeln_variable_type, &
10572 & field_pressure_values_set_type,current_pressure_values,err,error,*999)
10575 CALL flagerror(
"Boundary condition variable is not associated.",err,error,*999)
10578 CALL flagerror(
"Dependent field DelUDelN variable is not associated.",err,error,*999)
10581 CALL flagerror(
"EQUATIONS_MAPPING is not associated.",err,error,*999)
10584 CALL flagerror(
"Boundary conditions are not associated.",err,error,*999)
10587 CALL flagerror(
"Dependent field is not associated.",err,error,*999)
10598 CALL flagerror(
"Equations set is not associated.",err,error,*999)
10601 CALL flagerror(
"Equations are not associated.",err,error,*999)
10604 CALL flagerror(
"Solver mapping is not associated.",err,error,*999)
10607 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
10611 solver_equations=>solver%SOLVER_EQUATIONS
10612 IF(
ASSOCIATED(solver_equations))
THEN 10613 solver_mapping=>solver_equations%SOLVER_MAPPING
10614 IF(
ASSOCIATED(solver_mapping))
THEN 10615 equations=>solver_mapping%EQUATIONS_SET_TO_SOLVER_MAP(1)%EQUATIONS
10616 IF(
ASSOCIATED(equations))
THEN 10617 equations_set=>equations%EQUATIONS_SET
10618 IF(
ASSOCIATED(equations_set))
THEN 10619 IF(.NOT.
ALLOCATED(equations_set%SPECIFICATION))
THEN 10620 CALL flagerror(
"Equations set specification is not allocated.",err,error,*999)
10621 ELSE IF(
SIZE(equations_set%SPECIFICATION,1)/=3)
THEN 10622 CALL flagerror(
"Equations set specification must have three entries for a finite elasticity type "// &
10623 &
"equations set.",err,error,*999)
10625 SELECT CASE(equations_set%SPECIFICATION(3))
10632 dependent_field=>equations_set%DEPENDENT%DEPENDENT_FIELD
10633 geometric_field=>equations_set%GEOMETRY%GEOMETRIC_FIELD
10634 IF(
ASSOCIATED(dependent_field).AND.
ASSOCIATED(geometric_field))
THEN 10635 boundary_conditions=>solver_equations%BOUNDARY_CONDITIONS
10636 IF(
ASSOCIATED(boundary_conditions))
THEN 10637 equations_mapping=>equations_set%EQUATIONS%EQUATIONS_MAPPING
10638 IF(
ASSOCIATED(equations_mapping))
THEN 10639 CALL field_variable_get(dependent_field,field_u_variable_type,field_variable,err,error,*999)
10640 IF(
ASSOCIATED(field_variable))
THEN 10642 & boundary_conditions_variable,err,error,*999)
10643 IF(
ASSOCIATED(boundary_conditions_variable))
THEN 10645 NULLIFY( dummy_values1 )
10646 CALL field_parameter_set_data_get(dependent_field,field_u_variable_type, &
10647 & field_values_set_type,dummy_values1,err,error,*999)
10648 ndofs_to_print =
SIZE(dummy_values1,1)
10650 & ndofs_to_print,dummy_values1, &
10651 &
'(" DEPENDENT_FIELD,FIELD_U_VARIABLE_TYPE,FIELD_VALUES_SET_TYPE (bef) = ",4(X,E13.6))',&
10652 &
'4(4(X,E13.6))',err,error,*999)
10653 CALL field_parameter_set_data_restore(dependent_field,field_u_variable_type, &
10654 & field_values_set_type,dummy_values1,err,error,*999)
10660 alpha = 0.10_dp * sin( 2.0_dp *
pi * current_time / 4.0_dp )
10661 CALL field_parameter_sets_copy(geometric_field,field_u_variable_type, &
10662 & field_values_set_type,field_mesh_displacement_set_type,alpha,err,error,*999)
10664 NULLIFY(geometric_field_values)
10665 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type, &
10666 & field_values_set_type,geometric_field_values,err,error,*999)
10668 geometry_number_of_dofs=geometric_field%VARIABLE_TYPE_MAP(field_u_variable_type)% &
10669 &
ptr%NUMBER_OF_DOFS
10670 DO dof_number=1,geometry_number_of_dofs
10671 boundary_condition_check_variable=boundary_conditions_variable% &
10672 & condition_types(dof_number)
10676 CALL field_parameter_set_add_local_dof(geometric_field, &
10677 & field_u_variable_type,field_mesh_displacement_set_type,dof_number, &
10678 & geometric_field_values(dof_number),err,error,*999)
10684 NULLIFY(mesh_position_values)
10685 CALL field_parameter_set_data_get(geometric_field,field_u_variable_type, &
10686 & field_mesh_displacement_set_type,mesh_position_values,err,error,*999)
10688 dependent_number_of_dofs=dependent_field%VARIABLE_TYPE_MAP(field_u_variable_type)% &
10689 &
ptr%NUMBER_OF_DOFS
10690 DO dof_number=1,dependent_number_of_dofs
10691 boundary_condition_check_variable=boundary_conditions_variable% &
10692 & condition_types(dof_number)
10700 CALL field_parameter_set_update_local_dof(dependent_field, &
10701 & field_u_variable_type,field_boundary_conditions_set_type,dof_number, &
10702 & mesh_position_values(dof_number),err,error,*999)
10705 CALL field_parameter_set_update_local_dof(dependent_field, &
10706 & field_u_variable_type,field_values_set_type,dof_number, &
10707 & mesh_position_values(dof_number),err,error,*999)
10717 CALL field_parameter_set_update_start(dependent_field, &
10718 & field_u_variable_type, field_boundary_conditions_set_type,err,error,*999)
10719 CALL field_parameter_set_update_finish(dependent_field, &
10720 & field_u_variable_type, field_boundary_conditions_set_type,err,error,*999)
10722 CALL field_parameter_set_update_start(dependent_field, &
10723 & field_u_variable_type, field_values_set_type,err,error,*999)
10724 CALL field_parameter_set_update_finish(dependent_field, &
10725 & field_u_variable_type, field_values_set_type,err,error,*999)
10729 NULLIFY( dummy_values1 )
10730 CALL field_parameter_set_data_get(dependent_field,field_u_variable_type, &
10731 & field_values_set_type,dummy_values1,err,error,*999)
10732 ndofs_to_print =
SIZE(dummy_values1,1)
10734 & ndofs_to_print,dummy_values1, &
10735 &
'(" DEPENDENT_FIELD,FIELD_U_VAR_TYPE,FIELD_VALUES_SET_TYPE (after) = ",4(X,E13.6))', &
10736 &
'4(4(X,E13.6))',err,error,*999)
10737 CALL field_parameter_set_data_restore(dependent_field,field_u_variable_type, &
10738 & field_values_set_type,dummy_values1,err,error,*999)
10741 CALL flagerror(
"Boundary condition variable is not associated.",err,error,*999)
10743 CALL field_parameter_set_update_start(dependent_field,field_u_variable_type, &
10744 & field_values_set_type,err,error,*999)
10745 CALL field_parameter_set_update_finish(dependent_field,field_u_variable_type, &
10746 & field_values_set_type,err,error,*999)
10748 CALL flagerror(
"Dependent field U variable is not associated.",err,error,*999)
10751 CALL flagerror(
"EQUATIONS_MAPPING is not associated.",err,error,*999)
10754 CALL flagerror(
"Boundary conditions are not associated.",err,error,*999)
10757 CALL flagerror(
"Dependent field and/or geometric field is/are not associated.",err,error,*999)
10767 CALL flagerror(
"Equations set is not associated.",err,error,*999)
10770 CALL flagerror(
"Equations are not associated.",err,error,*999)
10773 CALL flagerror(
"Solver mapping is not associated.",err,error,*999)
10776 CALL flagerror(
"Solver equations are not associated.",err,error,*999)
10785 CALL flagerror(
"Problem is not associated.",err,error,*999)
10793 CALL flagerror(
"Solver is not associated.",err,error,*999)
10796 CALL flagerror(
"Control loop is not associated.",err,error,*999)
10799 exits(
"FiniteElasticity_PreSolveUpdateBoundaryConditions")
10801 999
errors(
"FiniteElasticity_PreSolveUpdateBoundaryConditions",err,error)
10802 exits(
"FiniteElasticity_PreSolveUpdateBoundaryConditions")
10816 REAL(DP),
INTENT(IN) :: Jznu
10817 REAL(DP),
INTENT(OUT) :: ffact
10818 REAL(DP),
INTENT(OUT) :: dfdJfact
10819 INTEGER(INTG),
INTENT(OUT) :: ERR
10822 enters(
"EVALUATE_CHAPELLE_FUNCTION",err,error,*999)
10825 IF( abs(jznu-1.0_dp) > 1.0e-10_dp )
THEN 10827 ffact = 2.0_dp * (jznu - 1.0_dp - log(jznu)) / (jznu - 1.0_dp)**2.0_dp
10828 dfdjfact = ( 2.0_dp * (1.0_dp - 1.0_dp/jznu) * (jznu - 1.0_dp)**2.0_dp &
10829 & - 4.0_dp * (jznu - 1.0_dp - log(jznu)) * (jznu - 1.0_dp) ) / (jznu - 1.0_dp)**4.0_dp
10835 exits(
"EVALUATE_CHAPELLE_FUNCTION")
10837 999 errorsexits(
"EVALUATE_CHAPELLE_FUNCTION",err,error)
10850 REAL(DP),
INTENT(IN) :: AZL(3,3)
10851 REAL(DP),
INTENT(IN) :: AZU(3,3)
10852 REAL(DP),
INTENT(IN) :: DARCY_MASS_INCREASE
10853 REAL(DP),
INTENT(OUT) :: PIOLA_TENSOR_ADDITION(3,3)
10854 INTEGER(INTG),
INTENT(OUT) :: ERR
10859 REAL(DP) :: dfdJfact
10860 REAL(DP) :: Mfact, bfact, p0fact
10861 REAL(DP) :: DARCY_VOL_INCREASE, DARCY_RHO_0_F
10862 INTEGER(INTG) :: i,j
10865 enters(
"EVALUATE_CHAPELLE_PIOLA_TENSOR_ADDITION",err,error,*999)
10870 darcy_vol_increase = darcy_mass_increase / darcy_rho_0_f
10873 IF( abs(jznu) < 1.0e-10_dp )
THEN 10874 CALL flagerror(
"EVALUATE_CHAPELLE_PIOLA_TENSOR_ADDITION: ABS(Jznu) < 1.0E-10_DP",err,error,*999)
10883 piola_tensor_addition(i,j) = 0.5_dp * mfact * darcy_vol_increase**2.0_dp * jznu * azu(i,j)
10897 & 3,3,azu,
write_string_matrix_name_and_indices,
'(" AZU',
'(",I1,",:)',
' :",3(X,E13.6))', &
10898 &
'(17X,3(X,E13.6))',err,error,*999)
10900 & 3,3,piola_tensor_addition, &
10902 &
'(17X,3(X,E13.6))',err,error,*999)
10905 exits(
"EVALUATE_CHAPELLE_PIOLA_TENSOR_ADDITION")
10907 999 errorsexits(
"EVALUATE_CHAPELLE_PIOLA_TENSOR_ADDITION",err,error)
10919 REAL(DP),
INTENT(OUT) :: DARCY_RHO_0_F
10920 REAL(DP),
INTENT(OUT) :: Mfact
10921 REAL(DP),
INTENT(OUT) :: bfact
10922 REAL(DP),
INTENT(OUT) :: p0fact
10923 INTEGER(INTG),
INTENT(OUT) :: ERR
10926 enters(
"GET_DARCY_FINITE_ELASTICITY_PARAMETERS",err,error,*999)
10929 darcy_rho_0_f = 1.0_dp
10935 exits(
"GET_DARCY_FINITE_ELASTICITY_PARAMETERS")
10937 999 errorsexits(
"GET_DARCY_FINITE_ELASTICITY_PARAMETERS",err,error)
10950 INTEGER(INTG),
INTENT(IN) :: ITERATION_NUMBER
10951 INTEGER(INTG),
INTENT(IN) :: MAXIMUM_NUMBER_OF_ITERATIONS
10952 INTEGER(INTG),
INTENT(OUT) :: ERR
10958 REAL(DP) :: INCREMENT
10960 enters(
"FINITE_ELASTICITY_LOAD_INCREMENT_APPLY",err,error,*999)
10962 IF(
ASSOCIATED(equations_set))
THEN 10963 equations=>equations_set%EQUATIONS
10964 IF(
ASSOCIATED(equations))
THEN 10965 source_field=>equations%INTERPOLATION%SOURCE_FIELD
10966 IF(
ASSOCIATED(source_field))
THEN 10967 IF(maximum_number_of_iterations>1)
THEN 10968 IF(iteration_number==1)
THEN 10970 CALL field_parametersetensurecreated(source_field,field_u_variable_type,field_initial_values_set_type,err,error,*999)
10971 CALL field_parameter_sets_copy(source_field,field_u_variable_type,field_values_set_type, &
10972 & field_initial_values_set_type,1.0_dp,err,error,*999)
10974 increment=
REAL(iteration_number)/
REAL(maximum_number_of_iterations)
10975 CALL field_parameter_sets_copy(source_field,field_u_variable_type,field_initial_values_set_type, &
10976 & field_values_set_type,increment,err,error,*999)
10980 CALL flagerror(
"Equations set equations is not associated.",err,error,*999)
10983 CALL flagerror(
"Equations set is not associated.",err,error,*999)
10986 exits(
"FINITE_ELASTICITY_LOAD_INCREMENT_APPLY")
10988 999 errorsexits(
"FINITE_ELASTICITY_LOAD_INCREMENT_APPLY",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.
integer(intg), parameter, public boundary_condition_moved_wall
The dof is fixed as a boundary condition.
subroutine, public solvers_create_finish(SOLVERS, ERR, ERROR,)
Finish the creation of solvers.
integer, parameter ptr
Pointer integer kind.
subroutine, public finite_elasticity_equations_set_setup(EQUATIONS_SET, EQUATIONS_SET_SETUP, ERR, ERROR,)
Sets up the finite elasticity equation type of an elasticity equations set class. ...
real(dp) function finite_elasticity_cylinder_analytic_func_evaluate(MU1, PIN, POUT, LAMBDA, TSI, A1, A2, C1, C2)
Evaluates the residual function required to solve for MU1, in the cylinder analytic example...
This module contains all coordinate transformation and support routines.
Contains information on the Jacobian matrix for nonlinear problems.
integer(intg), parameter equations_set_evaluate_second_pk_stress_tensor
Second Piola Kirchhoff stress tensor.
Contains information on the equations mapping i.e., how field variable DOFS are mapped to the rows an...
Contains information about the CellML equations for a solver.
Contains information about the equations in an equations set.
subroutine, public finite_elasticity_post_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the finite elasticity problem post solve.
integer(intg), parameter equations_set_gfem_solution_method
Grid-based Finite Element Method solution method.
Returns the inverse of a matrix.
integer(intg), parameter equations_set_transverse_isotropic_exponential_subtype
Contains information for a region.
integer(intg), parameter problem_control_time_loop_type
Time control loop.
subroutine, public solver_nonlinear_divergence_exit(SOLVER, ERR, ERROR,)
Instead of warning on nonlinear divergence, exit with error.
integer(intg), parameter equations_set_holzapfel_ogden_activecontraction_subtype
integer(intg), parameter, public boundary_condition_moved_wall_incremented
The dof is fixed as a boundary condition, to be used with load increment loop.
integer(intg), parameter problem_setup_control_type
Solver setup for a problem.
subroutine, public finite_elasticity_post_solve_output_data(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the finite elasticity problem post solve output data.
This module handles all problem wide constants.
integer(intg), parameter, public control_loop_node
The identifier for a each "leaf" node in a control loop.
Returns the transpose of a matrix A in A^T.
integer(intg), parameter equations_set_membrane_subtype
integer(intg), parameter no_global_deriv
No global derivative i.e., u.
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.
integer(intg) numberofdimensions
Contains information on the mesh decomposition.
integer(intg), parameter problem_multiscale_finite_elasticity_subtype
integer(intg), parameter problem_no_subtype
subroutine finiteelasticity_surfacepressureresidualevaluate(EQUATIONS_SET, ELEMENT_NUMBER, var1, var2, ERR, ERROR,)
integer(intg), parameter equations_set_standard_monodomain_elasticity_subtype
subroutine, public equations_matrices_create_start(EQUATIONS, EQUATIONS_MATRICES, ERR, ERROR,)
Starts the creation of the equations matrices and rhs for the the equations.
Contains information on the type of solver to be used.
integer(intg), parameter equations_set_constitutive_and_growth_law_in_cellml_subtype
integer(intg), parameter problem_fe_contact_reproject_subtype
integer(intg), parameter, public solver_petsc_library
PETSc solver library.
integer(intg), parameter equations_set_finite_elasticity_cylinder
real(dp), parameter pi
The double precision value of pi.
subroutine, public solvers_number_set(SOLVERS, NUMBER_OF_SOLVERS, ERR, ERROR,)
Sets/changes the number of solvers.
integer(intg), parameter no_part_deriv
No partial derivative i.e., u.
integer(intg), parameter equations_set_anisotropic_polynomial_subtype
integer(intg), parameter equations_set_multi_compartment_darcy_subtype
integer(intg), parameter, public coordinate_jacobian_area_type
Area type Jacobian.
integer(intg), parameter problem_quasistatic_finite_elasticity_subtype
type(field_interpolated_point_ptr_type), dimension(:), pointer source_interpolated_point
This module handles all equations matrix and rhs routines.
Contains the topology information for a domain.
integer(intg), parameter, public finite_elasticity_analytic_cylinder_param_lambda_idx
Lambda parameter index.
subroutine, public solver_type_set(SOLVER, SOLVE_TYPE, ERR, ERROR,)
Sets/changes the type for a solver.
integer(intg), parameter problem_monodomain_elasticity_w_titin_subtype
integer(intg), parameter equations_static
The equations are static and have no time dependence.
Contains information on an equations set.
subroutine, public finiteelasticity_straincalculate(equationsSet, strainField, strainFieldVariableType, err, error,)
Calculates the strain field for a finite elasticity finite element equations set. ...
subroutine, public finiteelasticity_equationssetsolutionmethodset(EQUATIONS_SET, SOLUTION_METHOD, ERR, ERROR,)
Sets/changes the solution method for a finite elasticity equation type of an elasticity equations set...
This module handles all equations routines.
integer(intg), parameter equations_set_standard_elasticity_darcy_subtype
integer(intg), parameter, public solver_dae_type
A differential-algebraic equation solver.
integer(intg), parameter equations_set_setup_source_type
Source setup.
Contains information on the fields defined on a region.
integer(intg), parameter equations_set_no_subtype
subroutine finite_elasticity_push_elasticity_tensor(ELASTICITY_TENSOR, DZDNU, Jznu, ERR, ERROR,)
Push-forward the rank 4 elasticity tensor.
subroutine, public finiteelasticity_tensorinterpolatexi(equationsSet, tensorEvaluateType, userElementNumber, xi, values, err, error,)
Evaluates a tensor at a given element xi location.
This module contains all string manipulation and transformation routines.
type(field_type), pointer source_field
Flags a warning to the user.
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.
subroutine, public equations_derivedvariableget(equations, derivedType, fieldVariable, err, error,)
Gets the field variable for the derived variable type.
integer(intg), parameter equations_set_transverse_isotropic_guccione_subtype
subroutine finite_elasticity_gauss_stress_tensor(EQUATIONS_SET, DEPENDENT_INTERPOLATED_POINT, MATERIALS_INTERPOLATED_POINT, STRESS_TENSOR, DZDNU, Jznu, ELEMENT_NUMBER, GAUSS_POINT_NUMBER, ERR, ERROR,)
Evaluates the Cauchy stress tensor at a given Gauss point.
integer(intg), parameter equations_set_active_strain_subtype
integer(intg), parameter first_part_deriv
First partial derivative i.e., du/ds.
subroutine finiteelasticity_piolaaddactivecontraction(INDEPENDENT_FIELD, MATERIALS_FIELD, PIOLA_FF, E_FF, ELEMENT_NUMBER, GAUSS_POINT_NUMBER, ERR, ERROR,)
subroutine, public solver_newton_cellml_solver_get(SOLVER, CELLML_SOLVER, ERR, ERROR,)
Returns the CellML solver associated with a Newton solver.
integer(intg), parameter, public boundary_condition_pressure_incremented
The dof is a surface pressure boundary condition, to be used with load increment loop.
This module contains routines for timing the program.
subroutine, public control_loop_current_times_get(CONTROL_LOOP, CURRENT_TIME, TIME_INCREMENT, ERR, ERROR,)
Gets the current time parameters for a time control loop.
subroutine finiteelasticity_gaussgrowthtensor_newer123(equationsSet, numberOfDimensions, gaussPointNumber, elementNumber, dependentField, deformationGradientTensor, growthTensor, elasticDeformationGradientTensor, Jg, Je, err, error,)
Evaluates the growth tensor at a given Gauss point and calculates the elastic part of the deformation...
integer(intg), parameter equations_set_incompressible_elasticity_driven_mr_subtype
integer(intg), parameter solver_equations_static
Solver equations are static.
subroutine, public fluid_mechanics_io_write_cmgui(REGION, EQUATIONS_SET_GLOBAL_NUMBER, NAME, ERR, ERROR,)
Writes solution into cmgui formats exelem and exnode.
subroutine, public equations_time_dependence_type_set(EQUATIONS, TIME_DEPENDENCE_TYPE, ERR, ERROR,)
Sets/changes the time dependence type for equations.
integer(intg), parameter equations_set_elasticity_fluid_pressure_holmes_mow_subtype
integer(intg), parameter, public equations_timing_output
Timing information output.
subroutine, public solver_equations_sparsity_type_set(SOLVER_EQUATIONS, SPARSITY_TYPE, ERR, ERROR,)
Sets/changes the sparsity type for solver equations.
subroutine, public finiteelasticity_boundaryconditionsanalyticcalculate(EQUATIONS_SET, BOUNDARY_CONDITIONS, ERR, ERROR,)
Calculates the analytic solution and sets the boundary conditions for an analytic problem...
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.
integer(intg), parameter equations_set_1d3d_monodomain_elasticity_subtype
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 global_deriv_s2
First global derivative in the s2 direction i.e., du/ds2.
Contains information on a control loop.
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.
subroutine finiteelasticity_presolveupdateboundaryconditions(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Update boundary conditions for finite elasticity pre solve.
subroutine, public finiteelasticity_finiteelementpostresidualevaluate(EQUATIONS_SET, ERR, ERROR,)
Post-evaluates the residual for a finite elasticity finite element equations set. ...
integer(intg), parameter, public solver_sparse_matrices
Use sparse solver matrices.
integer(intg), parameter equations_set_anisotropic_polynomial_active_subtype
subroutine, public solver_equations_create_start(SOLVER, SOLVER_EQUATIONS, ERR, ERROR,)
Starts the process of creating solver equations.
integer(intg), parameter equations_set_evaluate_deformation_gradient_tensor
Deformation gradient tensor.
integer(intg), dimension(3, 3) other_xi_orientations3
OTHER_XI_ORIENTATIONSS3(ni,nii) gives the orientation of the given two xi directions. Is equal to leviCivita(ni,nii,OTHER_XI_DIRECTIONS3(ni,nii,2)) where leviCivita is the Levi-Civita or alternating symbol.
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) element_number
integer(intg), parameter, public finite_elasticity_analytic_cylinder_param_pout_idx
Outer pressure parameter index.
integer(intg), parameter equations_set_setup_independent_type
Independent variables.
This module contains all program wide constants.
integer(intg), parameter solver_equations_nonlinear
Solver equations are nonlinear.
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, public user_cpu
User CPU time type.
Calculates the vector cross product of two vectors.
integer(intg), parameter equations_set_number_of_derived_types
integer(intg), parameter equations_set_mooney_rivlin_activecontraction_subtype
subroutine finiteelasticity_gaussgrowthtensor(equationsSet, numberOfDimensions, gaussPointNumber, elementNumber, dependentField, deformationGradientTensor, growthTensor, elasticDeformationGradientTensor, Jg, Je, err, error,)
Evaluates the growth tensor at a given Gauss point and calculates the elastic part of the deformation...
subroutine, public equationsmapping_linearmatricesnumberset(EQUATIONS_MAPPING, NUMBER_OF_LINEAR_EQUATIONS_MATRICES, ERR, ERROR,)
Sets/changes the number of linear equations matrices.
Calculates and returns the matrix-product-transpose A*B^T in the matrix C.
Contains the information for a face in a decomposition.
Calculates the modified Bessel function of the first kind of order 1 using the approximation of Abrom...
integer(intg), parameter problem_finite_elasticity_type
integer(intg), parameter problem_setup_initial_type
Initial setup for a problem.
Contains the interpolated point coordinate metrics. Old CMISS name GL,GU,RG.
integer(intg), parameter problem_monodomain_elasticity_velocity_subtype
integer(intg), parameter equations_set_setup_derived_type
Derived field setup.
integer(intg), parameter equations_set_incompressible_elast_multi_comp_darcy_subtype
subroutine finiteelasticity_straintensor(deformationGradientTensor, rightCauchyDeformationTensor, fingerDeformationTensor, Jacobian, greenStrainTensor, err, error,)
Evaluates the strain tensor given the deformation gradient tensor.
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 finite_elasticity_gauss_elasticity_tensor(EQUATIONS_SET, DEPENDENT_INTERPOLATED_POINT, MATERIALS_INTERPOLATED_POINT, ELASTICITY_TENSOR, HYDRO_ELASTICITY_VOIGT, STRESS_TENSOR, DZDNU, Jznu, ELEMENT_NUMBER, GAUSS_POINT_NUMBER, ERR, ERROR,)
Evaluates the spatial elasticity and stress tensor in Voigt form at a given Gauss point...
subroutine finite_elasticity_fmm(TIME, DT, PREV_LAMBDA, CURR_LAMBDA, Q123, ISO_TA, TA)
type(field_interpolation_parameters_ptr_type), dimension(:), pointer source_interpolation_parameters
Contains information on the boundary conditions for a dependent field variable.
integer(intg), dimension(3, 3), parameter tensor_to_voigt3
integer(intg), parameter solver_equations_quasistatic
Solver equations are quasistatic.
subroutine finite_elasticity_gauss_cauchy_tensor(EQUATIONS_SET, DEPENDENT_INTERPOLATED_POINT, MATERIALS_INTERPOLATED_POINT, DARCY_DEPENDENT_INTERPOLATED_POINT, INDEPENDENT_INTERPOLATED_POINT, CAUCHY_TENSOR, Jznu, DZDNU, ELEMENT_NUMBER, GAUSS_POINT_NUMBER, ERR, ERROR,)
Evaluates the Cauchy stress tensor at a given Gauss point.
integer(intg), parameter, public finite_elasticity_analytic_cylinder_param_rout_idx
Outer radius parameter index.
subroutine, public coordinates_materialsystemcalculate(geometricInterpPointMetrics, fibreInterpPoint, dNudX, dXdNu, dNudXi, dXidNu, err, error,)
Calculates the tensor to get from material coordinate system, nu, to local coordinate system...
subroutine, public solver_equations_linearity_type_set(SOLVER_EQUATIONS, LINEARITY_TYPE, ERR, ERROR,)
Sets/changes the linearity type for solver equations.
integer, parameter dp
Double precision real kind.
integer(intg), parameter equations_set_setup_start_action
Start setup action.
subroutine, public finiteelasticity_contactproblemspecificationset(problem, problemSpecification, err, error,)
Sets/changes the problem subtype for a finite elasticity contact type .
subroutine, public cellml_equations_create_start(SOLVER, CELLML_EQUATIONS, ERR, ERROR,)
Starts the process of creating CellML equations.
Sets the storage type (sparsity) of the nonlinear (Jacobian) equations matrices.
Contains the topology information for a decomposition.
integer(intg), parameter problem_quasistatic_elasticity_transient_darcy_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.
integer(intg), parameter problem_fe_contact_transform_reproject_subtype
integer(intg), parameter equations_set_evaluate_r_cauchy_green_deformation_tensor
Right Cauchy-Green deformation field.
integer(intg), parameter equations_set_mooney_rivlin_subtype
This module contains all type definitions in order to avoid cyclic module references.
subroutine, public solver_cellml_equations_get(SOLVER, CELLML_EQUATIONS, ERR, ERROR,)
Returns a pointer to the CellML equations for a solver.
integer(intg), parameter equations_set_elasticity_class
Contains information on the equations mapping for nonlinear matrices i.e., how a field variable is ma...
Contains information on the equations matrices and vectors.
integer(intg), parameter, public equations_matrix_fem_structure
Finite element matrix structure.
integer(intg), dimension(3, 3, 2) other_xi_directions3
OTHER_XI_DIRECTIONS3(ni,nii,type) gives the other xi directions for direction ni for a three dimensio...
integer(intg), parameter problem_standard_elasticity_darcy_subtype
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
subroutine evaluate_chapelle_piola_tensor_addition(AZL, AZU, DARCY_MASS_INCREASE, PIOLA_TENSOR_ADDITION, ERR, ERROR,)
Evaluates the 2nd Piola-Kirchhoff stress tensor; Eq.(13) in Chapelle, Gerbeau, Sainte-Marie, Vignon-Clementel, Computational Mechanics (2010)
integer(intg), parameter, public equations_jacobian_finite_difference_calculated
Use finite differencing to calculate the Jacobian.
integer(intg), parameter equations_set_1d3d_monodomain_active_strain_subtype
integer(intg), parameter, public general_output_type
General output type.
integer(intg), parameter problem_finite_elasticity_contact_type
Contains information on the solver matrix.
subroutine, public get_darcy_finite_elasticity_parameters(DARCY_RHO_0_F, Mfact, bfact, p0fact, ERR, ERROR,)
Sets some data for the coupled Darcy / finite-elasticity model.
This module contains the interface descriptions to the LAPACK routines.
subroutine, public boundary_conditions_set_node(BOUNDARY_CONDITIONS, FIELD, VARIABLE_TYPE, VERSION_NUMBER, DERIVATIVE_NUMBER, USER_NODE_NUMBER, COMPONENT_NUMBER, CONDITION, VALUE, ERR, ERROR,)
Sets a boundary condition on the specified user node.
integer(intg), parameter equations_set_orthotropic_material_holzapfel_ogden_subtype
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...
integer(intg), parameter problem_fe_contact_transform_subtype
subroutine, public finiteelasticity_finiteelementpreresidualevaluate(EQUATIONS_SET, ERR, ERROR,)
Pre-evaluates the residual for a finite elasticity finite element equations set.
Returns the transpose of a matrix A in A^T.
subroutine, public control_loop_type_set(CONTROL_LOOP, LOOP_TYPE, ERR, ERROR,)
Sets/changes the control loop type.
integer(intg), parameter equations_set_activecontraction_subtype
integer(intg), parameter equations_set_guccione_activecontraction_subtype
integer(intg), parameter, public solver_nonlinear_type
A nonlinear solver.
Calculates and returns the matrix-transpose product A^T*B in the matrix C.
integer(intg), parameter, public system_cpu
System CPU time type.
integer(intg), parameter, public finite_elasticity_analytic_cylinder_param_c2_idx
c2 parameter index
integer(intg), parameter, public solver_geometric_transformation_type
An geometric transformation solver.
integer(intg), parameter equations_set_incompressible_mooney_rivlin_subtype
subroutine, public equations_set_equations_get(EQUATIONS_SET, EQUATIONS, ERR, ERROR,)
Gets the equations for an equations set.
This module contains all computational environment variables.
subroutine, public finiteelasticity_gaussdeformationgradienttensor(dependentInterpPointMetrics, geometricInterpPointMetrics, fibreInterpolatedPoint, dZdNu, err, error,)
Evaluates the deformation gradient tensor at a given Gauss point.
integer(intg), parameter, public solver_cellml_evaluator_type
A CellML evaluation solver.
Sets the structure (sparsity) of the nonlinear (Jacobian) equations matrices.
integer(intg), dimension(4) partial_derivative_first_derivative_map
PARTIAL_DERIVATIVE_FIRST_DERIVATIVE_MAP(nic) gives the partial derivative index for the first derivat...
subroutine, public equations_create_finish(EQUATIONS, ERR, ERROR,)
Finish the creation of equations.
This module handles all domain mappings routines.
integer(intg), parameter problem_setup_finish_action
Finish setup action.
integer(intg), parameter equations_set_transverse_isotropic_humphrey_yin_subtype
This module handles all equations mapping routines.
subroutine, public finiteelasticity_finiteelementjacobianevaluate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Evaluates the element Jacobian matrix for the given element number for a finite elasticity class fini...
integer(intg), parameter equations_set_multiscale_active_strain_subtype
Contains information about the solver equations for a solver.
A buffer type to allow for an array of pointers to a BASIS_TYPE.
integer(intg), parameter, public matrix_compressed_row_storage_type
Matrix compressed row storage type.
subroutine, public solver_newton_cellml_evaluator_create(SOLVER, CELLML_SOLVER, ERR, ERROR,)
Create a CellML evaluator solver for the Newton solver.
subroutine finite_elasticity_push_stress_tensor(STRESS_TENSOR, DZDNU, Jznu, ERR, ERROR,)
Push-forward the rank 2 Piola stress tensor.
integer(intg), parameter equations_set_gfv_solution_method
Grid-based Finite Volume solution method.
Contains information on a mesh defined on a region.
integer(intg), parameter, public finite_elasticity_analytic_cylinder_param_c1_idx
c1 parameter index
integer(intg), parameter equations_set_setup_geometry_type
Geometry setup.
integer(intg), parameter global_deriv_s1_s2
Global Cross derivative in the s1 and s2 direction i.e., d^2u/ds1ds2.
subroutine, public finiteelasticityequationsset_derivedvariablecalculate(equationsSet, derivedType, err, error,)
Calculated an output field for a finite elasticity equations set.
Contains information for a problem.
integer(intg), parameter problem_setup_cellml_equations_type
CellML equations setup for a problem.
integer(intg), parameter, public solver_progress_output
Progress output from solver routines.
Returns the determinant of a matrix.
integer(intg), parameter, public finite_elasticity_analytic_cylinder_param_rin_idx
Inner radius parameter index.
Contains information on a generated mesh.
integer(intg), parameter equations_set_transverse_isotropic_active_subtype
integer(intg), parameter equations_set_incompressible_finite_elasticity_darcy_subtype
Contains the topology information for the nodes of a domain.
integer(intg), parameter equations_set_incompressible_elasticity_driven_darcy_subtype
subroutine, public equations_matrices_create_finish(EQUATIONS_MATRICES, ERR, ERROR,)
Finishes the creation of the equations matrices and RHS for the the equations.
subroutine finiteelasticity_presolvegetsoliddisplacement(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Read in the displacement field for a PGM elasticity problem.
integer(intg), parameter equations_set_isotropic_exponential_subtype
logical, save, public diagnostics1
.TRUE. if level 1 diagnostic output is active in the current routine
This module handles all distributed matrix vector routines.
integer(intg), parameter equations_set_elasticity_fluid_pressure_static_inria_subtype
A buffer type to allow for an array of pointers to a QUADRATURE_SCHEME_TYPE.
integer(intg), parameter equations_set_orthotropic_material_costa_subtype
integer(intg), parameter global_deriv_s1
First global derivative in the s1 direction i.e., du/ds1.
This module handles all boundary conditions routines.
This module handles all solver routines.
subroutine finite_elasticity_gauss_dfdz(INTERPOLATED_POINT, ELEMENT_NUMBER, GAUSS_POINT_NUMBER, NUMBER_OF_DIMENSIONS, NUMBER_OF_XI, DFDZ, ERR, ERROR,)
Evaluates df/dz (derivative of interpolation function wrt deformed coord) matrix at a given Gauss poi...
subroutine, public equations_mapping_create_start(EQUATIONS, EQUATIONS_MAPPING, ERR, ERROR,)
Finishes the process of creating an equations mapping for a equations set equations.
subroutine, public finiteelasticity_finiteelementresidualevaluate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
Evaluates the residual and RHS vectors for a finite elasticity finite element equations set...
Contains the interpolated value (and the derivatives wrt xi) of a field at a point. Old CMISS name XG.
integer(intg), parameter equations_set_finite_elasticity_type
integer(intg), parameter problem_standard_elasticity_fluid_pressure_subtype
Contains information for a particular quadrature scheme.
subroutine, public solver_linked_solver_add(SOLVER, SOLVER_TO_LINK, SOLV_TYPE, ERR, ERROR,)
Adds a linked solver to the solver. Also sets the solver type for the linked solver, als well as its linking solver.
integer(intg), parameter equations_set_elasticity_darcy_inria_model_subtype
subroutine, public cpu_timer(TIME_TYPE, TIME, ERR, ERROR,)
CPU_TIMER returns the CPU time in TIME(1). TIME_TYPE indicates the type of time required.
logical, save, public diagnostics5
.TRUE. if level 5 diagnostic output is active in the current routine
Implements lists of Field IO operation.
subroutine finiteelasticity_cylinderanalyticcalculate(X, ANALYTIC_USER_PARAMS, DEFORMED_X, P, ERR, ERROR,)
Calcualates the analytic solution (deformed coordinates and hydrostatic pressure) for cylinder inflat...
This module contains all routines dealing with (non-distributed) matrix and vectors types...
integer(intg), parameter equations_set_derived_strain
Strain tensor field.
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.
type(field_type), pointer field
subroutine, public equationsmapping_residualvariablesnumberset(EQUATIONS_MAPPING, NUMBER_OF_VARIABLES, ERR, ERROR,)
Sets the mapping between a dependent field variable and the equations set residual vector...
integer(intg), parameter problem_setup_solver_equations_type
Solver equations setup for a problem.
integer(intg), parameter equations_set_constitutive_law_in_cellml_evaluate_subtype
integer(intg), parameter equations_set_monodomain_elasticity_velocity_subtype
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 domain_mappings_global_to_local_get(DOMAIN_MAPPING, GLOBAL_NUMBER, LOCAL_EXISTS, LOCAL_NUMBER, ERR, ERROR,)
Returns the local number, if it exists on the rank, for the specifed global number.
integer(intg), parameter problem_pgm_elasticity_darcy_subtype
integer(intg), parameter problem_finite_elasticity_with_growth_cellml_subtype
integer(intg), parameter equations_set_elasticity_multi_compartment_darcy_inria_subtype
integer(intg), parameter equations_set_transverse_isotropic_polynomial_subtype
Contains information on the solver matrices and rhs vector.
subroutine, public finite_elasticity_pre_solve(CONTROL_LOOP, SOLVER, ERR, ERROR,)
Sets up the finite elasticity problem pre-solve.
Contains information for a field variable defined on a field.
subroutine, public cellml_equations_create_finish(CELLML_EQUATIONS, ERR, ERROR,)
Finishes the process of creating CellML equations.
Returns the identity matrix.
subroutine, public finiteelasticity_equationssetspecificationset(equationsSet, specification, err, error,)
Sets the equation specification for a finite elasticity equation type of an elasticity equations set ...
integer(intg), parameter equations_set_fd_solution_method
Finite Difference solution method.
integer(intg), parameter, public equations_matrices_sparse_matrices
Use sparse equations matrices.
integer(intg), parameter equations_set_stvenant_kirchoff_activecontraction_subtype
subroutine finiteelasticity_surfacepressurejacobianevaluate(EQUATIONS_SET, ELEMENT_NUMBER, ERR, ERROR,)
integer(intg), parameter problem_finite_elasticity_cellml_subtype
integer(intg), parameter problem_control_load_increment_loop_type
Load increment control loop.
Contains information on the domain mappings (i.e., local and global numberings).
subroutine finiteelasticity_straintensor_newer123(deformationGradientTensor, rightCauchyDeformationTensor, fingerDeformationTensor, Jacobian, greenStrainTensor, err, error,)
Evaluates the strain tensor given the deformation gradient tensor.
integer(intg), parameter problem_quasistatic_elast_trans_darcy_mat_solve_subtype
Contains the parameters required to interpolate a field variable within an element. Old CMISS name XE.
Contains information on the setup information for an equations set.
A pointer to the domain decomposition for this domain.
integer(intg), parameter equations_set_elasticity_fluid_pres_holmes_mow_active_subtype
integer(intg), parameter problem_setup_start_action
Start setup action.
Contains information of the nolinear matrices and vectors for equations matrices. ...
integer(intg), dimension(2, 6), parameter voigt_to_tensor3
integer(intg), parameter, public finite_elasticity_analytic_cylinder_param_pin_idx
Inner pressure parameter index.
subroutine, public solver_equations_time_dependence_type_set(SOLVER_EQUATIONS, TIME_DEPENDENCE_TYPE, ERR, ERROR,)
Sets/changes the time dependence type for solver equations.
integer(intg), parameter equations_set_compressible_finite_elasticity_subtype
This module handles all control loop routines.
integer(intg), parameter, public solver_cmiss_library
CMISS (internal) solver library.
integer(intg), parameter equations_set_compressible_activecontraction_subtype
subroutine, public finiteelasticity_controlloadincrementlooppostloop(controlLoop, err, error,)
Executes after each loop of a control loop for finite elasticity problems, i.e., after each load incr...
Calculates and returns the matrix-product A*B in the matrix C.
subroutine, public equationsmatrices_jacobiantypesset(equationsMatrices, jacobianTypes, err, error,)
Sets the Jacobian calculation types of the residual variables.
integer(intg), parameter, public boundary_condition_fixed
The dof is fixed as a boundary condition.
subroutine, public errors(NAME, ERR, ERROR)
Records the exiting error of the subroutine.
integer(intg), parameter equations_set_evaluate_cauchy_stress_tensor
Cauchy stress tensor.
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.
integer(intg), parameter equations_set_monodomain_elasticity_w_titin_subtype
subroutine, public boundary_conditions_variable_get(BOUNDARY_CONDITIONS, FIELD_VARIABLE, BOUNDARY_CONDITIONS_VARIABLE, ERR, ERROR,)
Find the boundary conditions variable for a given field variable.
Contains all information about a basis .
integer(intg), parameter equations_set_fv_solution_method
Finite Volume solution method.
integer(intg), parameter, public matrix_block_storage_type
Matrix block storage type.
integer(intg), parameter equations_set_trans_isotropic_active_transition_subtype
integer(intg), parameter, public coordinate_jacobian_volume_type
Volume type Jacobian.
integer(intg), parameter equations_set_evaluate_green_lagrange_strain_tensor
Green-Lagrange strain tensor.
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, public boundary_condition_pressure
The dof is a surface pressure boundary condition.
subroutine finite_elasticity_evaluate_evolution_law(SOLVER, ERR, ERROR,)
Evaluates the evolution law of a multiscale active strain muscle model.
integer(intg), parameter equations_set_nearly_incompressible_mooney_rivlin_subtype
subroutine, public finite_elasticity_problem_setup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the finite elasticity problem.
integer(intg), parameter, public finite_elasticity_analytic_cylinder_param_tsi_idx
Tsi parameter index.
integer(intg), parameter problem_elasticity_class
integer(intg), parameter problem_monodomain_1d3d_active_strain_subtype
subroutine, public equationsmapping_residualvariabletypesset(EQUATIONS_MAPPING, RESIDUAL_VARIABLE_TYPES, ERR, ERROR,)
Sets the mapping between a dependent field variable and the equations set residual vector...
subroutine, public evaluate_chapelle_function(Jznu, ffact, dfdJfact, ERR, ERROR,)
Evaluates the functions f(J) and f\'(J); Eq.(21) in Chapelle, Gerbeau, Sainte-Marie, Vignon-Clementel, Computational Mechanics (2010)
integer(intg), parameter equations_quasistatic
The equations are quasi-static.
integer(intg), parameter equations_set_setup_analytic_type
Analytic setup.
subroutine, public solver_dae_times_set(SOLVER, START_TIME, END_TIME, ERR, ERROR,)
Set/change the times for a differential-algebraic equation solver.
Flags an error condition.
subroutine, public finiteelasticity_controltimelooppreloop(CONTROL_LOOP, ERR, ERROR,)
Runs before each time loop for a finite elasticity problem.
integer(intg), parameter problem_control_while_loop_type
While control loop.
integer(intg), parameter, public solver_linear_type
A linear solver.
This module handles all finite elasticity routines.
Calculates and returns the matrix-product A*B in the matrix C.
Contains information of the RHS vector for equations matrices.
subroutine, public field_io_elements_export(FIELDS, FILE_NAME, METHOD, ERR, ERROR,)
Export elemental information into multiple files.
integer(intg) function, public computational_node_number_get(ERR, ERROR)
Returns the number/rank of the computational nodes.
integer(intg), parameter equations_nonlinear
The equations are non-linear.
integer(intg), parameter problem_gudunov_monodomain_1d3d_elasticity_subtype
real(dp), parameter zero_tolerance
recursive subroutine, public solver_solve(SOLVER, ERR, ERROR,)
Solve the problem.
This module contains all kind definitions.
subroutine, public finite_elasticity_load_increment_apply(EQUATIONS_SET, ITERATION_NUMBER, MAXIMUM_NUMBER_OF_ITERATIONS, ERR, ERROR,)
Apply load increments to the gravity vector.
integer(intg), parameter equations_set_derived_stress
Stress tensor field.
Temporary IO routines for fluid mechanics.
subroutine, public field_io_nodes_export(FIELDS, FILE_NAME, METHOD, ERR, ERROR,)
Export nodal information.
Contains the information for an element in a decomposition.
subroutine, public finiteelasticity_problemspecificationset(problem, problemSpecification, err, error,)
Sets the problem specification for a finite elasticity type problem.
integer(intg), parameter equations_set_setup_finish_action
Finish setup action.
subroutine, public finiteelasticity_contactproblemsetup(PROBLEM, PROBLEM_SETUP, ERR, ERROR,)
Sets up the finite elasticity problem.
integer(intg), parameter problem_gudunov_monodomain_simple_elasticity_subtype