Permalink
Browse files

Merge pull request #94 from adamreeve/master

Add missing nullify calls
  • Loading branch information...
2 parents 6824556 + d5811cc commit 9ac8d1a1189a9bc17ff8ca6570322b65c92bced7 @chrispbradley chrispbradley committed Apr 30, 2012
Showing with 22 additions and 5 deletions.
  1. +6 −5 src/advection_diffusion_equation_routines.f90
  2. +8 −0 src/field_routines.f90
  3. +8 −0 src/solver_matrices_routines.f90
View
11 src/advection_diffusion_equation_routines.f90
@@ -114,17 +114,19 @@ SUBROUTINE ADVECTION_DIFFUSION_EQUATION_ANALYTIC_CALCULATE(EQUATIONS_SET,BOUNDAR
TYPE(DOMAIN_NODES_TYPE), POINTER :: DOMAIN_NODES
TYPE(FIELD_TYPE), POINTER :: DEPENDENT_FIELD,GEOMETRIC_FIELD,INDEPENDENT_FIELD,SOURCE_FIELD,MATERIALS_FIELD
TYPE(FIELD_VARIABLE_TYPE), POINTER :: FIELD_VARIABLE,GEOMETRIC_VARIABLE
- TYPE(VARYING_STRING) :: LOCAL_ERROR
+ TYPE(VARYING_STRING) :: LOCAL_ERROR
REAL(DP) :: alpha, phi, Peclet,tanphi
-
CALL ENTERS("ADVECTION_DIFFUSION_EQUATION_ANALYTIC_CALCULATE",ERR,ERROR,*999)
-
+
+ NULLIFY(GEOMETRIC_VARIABLE)
+ NULLIFY(GEOMETRIC_PARAMETERS)
+
alpha = 1.0_DP
phi = 0.2_DP
tanphi = TAN(phi)
Peclet= 10.0_DP
-
+
!>Set the analytic boundary conditions
IF(ASSOCIATED(EQUATIONS_SET)) THEN
IF(ASSOCIATED(EQUATIONS_SET%ANALYTIC)) THEN
@@ -133,7 +135,6 @@ SUBROUTINE ADVECTION_DIFFUSION_EQUATION_ANALYTIC_CALCULATE(EQUATIONS_SET,BOUNDAR
GEOMETRIC_FIELD=>EQUATIONS_SET%GEOMETRY%GEOMETRIC_FIELD
IF(ASSOCIATED(GEOMETRIC_FIELD)) THEN
CALL FIELD_NUMBER_OF_COMPONENTS_GET(GEOMETRIC_FIELD,FIELD_U_VARIABLE_TYPE,NUMBER_OF_DIMENSIONS,ERR,ERROR,*999)
- NULLIFY(GEOMETRIC_VARIABLE)
CALL FIELD_VARIABLE_GET(GEOMETRIC_FIELD,FIELD_U_VARIABLE_TYPE,GEOMETRIC_VARIABLE,ERR,ERROR,*999)
CALL FIELD_PARAMETER_SET_DATA_GET(GEOMETRIC_FIELD,FIELD_U_VARIABLE_TYPE,FIELD_VALUES_SET_TYPE,GEOMETRIC_PARAMETERS, &
& ERR,ERROR,*999)
View
8 src/field_routines.f90
@@ -1989,6 +1989,8 @@ SUBROUTINE FIELD_COMPONENT_VALUES_INITIALISE_INTG(FIELD,VARIABLE_TYPE,FIELD_SET_
CALL ENTERS("FIELD_COMPONENT_VALUES_INITIALISE_INTG",ERR,ERROR,*999)
+ NULLIFY(FIELD_PARAMETERS)
+
IF(ASSOCIATED(FIELD)) THEN
IF(FIELD%FIELD_FINISHED) THEN
!Check the variable type
@@ -2208,6 +2210,8 @@ SUBROUTINE FIELD_COMPONENT_VALUES_INITIALISE_SP(FIELD,VARIABLE_TYPE,FIELD_SET_TY
CALL ENTERS("FIELD_COMPONENT_VALUES_INITIALISE_SP",ERR,ERROR,*999)
+ NULLIFY(FIELD_PARAMETERS)
+
IF(ASSOCIATED(FIELD)) THEN
IF(FIELD%FIELD_FINISHED) THEN
!Check the variable type
@@ -2426,6 +2430,8 @@ SUBROUTINE FIELD_COMPONENT_VALUES_INITIALISE_DP(FIELD,VARIABLE_TYPE,FIELD_SET_TY
CALL ENTERS("FIELD_COMPONENT_VALUES_INITIALISE_DP",ERR,ERROR,*999)
+ NULLIFY(FIELD_PARAMETERS)
+
IF(ASSOCIATED(FIELD)) THEN
IF(FIELD%FIELD_FINISHED) THEN
!Check the variable type
@@ -2644,6 +2650,8 @@ SUBROUTINE FIELD_COMPONENT_VALUES_INITIALISE_L(FIELD,VARIABLE_TYPE,FIELD_SET_TYP
CALL ENTERS("FIELD_COMPONENT_VALUES_INITIALISE_L",ERR,ERROR,*999)
+ NULLIFY(FIELD_PARAMETERS)
+
IF(ASSOCIATED(FIELD)) THEN
IF(FIELD%FIELD_FINISHED) THEN
!Check the variable type
View
8 src/solver_matrices_routines.f90
@@ -709,6 +709,10 @@ SUBROUTINE SOLVER_MATRIX_EQUATIONS_MATRIX_ADD(SOLVER_MATRIX,equations_set_idx,AL
CALL ENTERS("SOLVER_MATRIX_EQUATIONS_MATRIX_ADD",ERR,ERROR,*999)
+ NULLIFY(EQUATIONS_MATRIX_DATA)
+ NULLIFY(COLUMN_INDICES)
+ NULLIFY(ROW_INDICES)
+
IF(ASSOCIATED(SOLVER_MATRIX)) THEN
IF(ASSOCIATED(EQUATIONS_MATRIX)) THEN
IF(ABS(ALPHA)>ZERO_TOLERANCE) THEN
@@ -928,6 +932,10 @@ SUBROUTINE SOLVER_MATRIX_INTERFACE_MATRIX_ADD(SOLVER_MATRIX,interface_condition_
CALL ENTERS("SOLVER_MATRIX_INTERFACE_MATRIX_ADD",ERR,ERROR,*999)
+ NULLIFY(INTERFACE_MATRIX_DATA)
+ NULLIFY(COLUMN_INDICES)
+ NULLIFY(ROW_INDICES)
+
IF(ASSOCIATED(SOLVER_MATRIX)) THEN
IF(ASSOCIATED(INTERFACE_MATRIX)) THEN
IF(ABS(ALPHA)>ZERO_TOLERANCE) THEN

0 comments on commit 9ac8d1a

Please sign in to comment.