Skip to content
Browse files

Merge pull request #93 from adamreeve/master

Check for fibre field for finite elascitity equations
  • Loading branch information...
2 parents 67b2fde + 989a9ca commit 6824556db3df75a29c93965e7cd3ce06af2a7252 @chrispbradley chrispbradley committed Apr 26, 2012
Showing with 18 additions and 15 deletions.
  1. +18 −15 src/finite_elasticity_routines.f90
View
33 src/finite_elasticity_routines.f90
@@ -2796,12 +2796,15 @@ SUBROUTINE FINITE_ELASTICITY_EQUATIONS_SET_SETUP(EQUATIONS_SET,EQUATIONS_SET_SET
END SELECT
CASE(EQUATIONS_SET_SETUP_GEOMETRY_TYPE)
!\todo Check dimension of geometric field
- IF(EQUATIONS_SET%SUBTYPE==EQUATIONS_SET_INCOMPRESSIBLE_FINITE_ELASTICITY_DARCY_SUBTYPE .OR. &
- & EQUATIONS_SET%SUBTYPE==EQUATIONS_SET_INCOMPRESSIBLE_ELASTICITY_DRIVEN_DARCY_SUBTYPE .OR. &
- & EQUATIONS_SET%SUBTYPE==EQUATIONS_SET_ELASTICITY_DARCY_INRIA_MODEL_SUBTYPE .OR. &
- & EQUATIONS_SET%SUBTYPE==EQUATIONS_SET_INCOMPRESSIBLE_ELAST_MULTI_COMP_DARCY_SUBTYPE) THEN
- SELECT CASE(EQUATIONS_SET_SETUP%ACTION_TYPE)
- CASE(EQUATIONS_SET_SETUP_START_ACTION)
+ SELECT CASE(EQUATIONS_SET_SETUP%ACTION_TYPE)
+ CASE(EQUATIONS_SET_SETUP_START_ACTION)
+ IF(.NOT.ASSOCIATED(EQUATIONS_SET%GEOMETRY%FIBRE_FIELD)) CALL FLAG_ERROR( &
+ & "Finite elascitiy equations require a fibre field.",ERR,ERROR,*999)
+ IF(EQUATIONS_SET%SUBTYPE==EQUATIONS_SET_INCOMPRESSIBLE_FINITE_ELASTICITY_DARCY_SUBTYPE .OR. &
+ & EQUATIONS_SET%SUBTYPE==EQUATIONS_SET_INCOMPRESSIBLE_ELASTICITY_DRIVEN_DARCY_SUBTYPE .OR. &
+ & EQUATIONS_SET%SUBTYPE==EQUATIONS_SET_ELASTICITY_DARCY_INRIA_MODEL_SUBTYPE .OR. &
+ & EQUATIONS_SET%SUBTYPE==EQUATIONS_SET_INCOMPRESSIBLE_ELAST_MULTI_COMP_DARCY_SUBTYPE) THEN
+ ! Set up mesh displacement and equations set field info for elasticity Darcy problems
FIELD_VARIABLE=>EQUATIONS_SET%GEOMETRY%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(FIELD_U_VARIABLE_TYPE)%PTR
IF(.NOT.ASSOCIATED(FIELD_VARIABLE%PARAMETER_SETS%SET_TYPE(FIELD_MESH_DISPLACEMENT_SET_TYPE)%PTR)) THEN
CALL FIELD_PARAMETER_SET_CREATE(EQUATIONS_SET%GEOMETRY%GEOMETRIC_FIELD, FIELD_U_VARIABLE_TYPE, &
@@ -2838,15 +2841,15 @@ SUBROUTINE FINITE_ELASTICITY_EQUATIONS_SET_SETUP(EQUATIONS_SET,EQUATIONS_SET_SET
!Do nothing
ENDIF
ENDIF
- CASE(EQUATIONS_SET_SETUP_FINISH_ACTION)
- ! do nothing
- CASE DEFAULT
- LOCAL_ERROR="The action type of "//TRIM(NUMBER_TO_VSTRING(EQUATIONS_SET_SETUP%ACTION_TYPE,"*",ERR,ERROR))// &
- & " for a setup type of "//TRIM(NUMBER_TO_VSTRING(EQUATIONS_SET_SETUP%SETUP_TYPE,"*",ERR,ERROR))// &
- & " is invalid for a linear diffusion equation."
- CALL FLAG_ERROR(LOCAL_ERROR,ERR,ERROR,*999)
- END SELECT
- END IF
+ END IF
+ CASE(EQUATIONS_SET_SETUP_FINISH_ACTION)
+ ! do nothing
+ CASE DEFAULT
+ LOCAL_ERROR="The action type of "//TRIM(NUMBER_TO_VSTRING(EQUATIONS_SET_SETUP%ACTION_TYPE,"*",ERR,ERROR))// &
+ & " for a setup type of "//TRIM(NUMBER_TO_VSTRING(EQUATIONS_SET_SETUP%SETUP_TYPE,"*",ERR,ERROR))// &
+ & " is invalid for a linear diffusion equation."
+ CALL FLAG_ERROR(LOCAL_ERROR,ERR,ERROR,*999)
+ END SELECT
CASE(EQUATIONS_SET_SETUP_DEPENDENT_TYPE)
SELECT CASE(EQUATIONS_SET%SUBTYPE)
!-----------------------------------------------------------------------

0 comments on commit 6824556

Please sign in to comment.
Something went wrong with that request. Please try again.