You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explicitly specifying either FINITE_DIFFERENCE or ANALYTIC results in
ERROR: 1: Vector matrices is not associated for the vector equations.
EquationsVector_VectorMatricesGet
cmfe_Equations_JacobianMatricesTypesSet
The code in cmfe_Equations_JacobianMatricesTypesSet from Jenny's last commit (jennyhelyanwe@606a887): equationsMatrices=>equations%equations%EQUATIONS_MATRICES CALL EquationsMatrices_JacobianTypesSet(equationsMatrices,[jacobianTypes],err,error,*999)
and is now the following in latest develop branch: NULLIFY(vectorEquations) CALL Equations_VectorEquationsGet(equations%equations,vectorEquations,err,error,*999) NULLIFY(vectorMatrices) CALL EquationsVector_VectorMatricesGet(vectorEquations,vectorMatrices,err,error,*999) CALL EquationsMatrices_JacobianTypesSet(vectorMatrices,[jacobianTypes],err,error,*999)
Most likely because vectorMatrices are only associated during equations create finish producing a chicken and egg situation?
The text was updated successfully, but these errors were encountered:
Ok, so the problem is that VectorMatrices are only created in equations_set create finish for the specific type of equation set being considered (e.g. finite elasticity, poisson etc). (CALL EquationsMatrices_VectorCreateStart(vectorEquations,vectorMatrices,err,error,*999)
).
Once created, cmfe_Equations_JacobianMatricesTypesSet is called.
However, as expected, calling cmfe_Equations_JacobianMatricesTypesSet directly from your python/fortran script raises an error because vectorMatrices are not created yet.
Solution maybe not to directly set the JacobianMatricesType inside the Jacobian vector Matrix type, but set it as a cached variable then, transfer the values to the Jacobian vector Matrix once these have been created during equation_set finish.
There is currently no cache values type for the equations_set.
Create equations
equations = iron.Equations()
equationsSet.EquationsCreateStart(equations)
#equations.JacobianMatricesTypesSet(iron.EquationsJacobianCalculated.FINITE_DIFFERENCE)
equations.JacobianMatricesTypesSet(iron.EquationsJacobianCalculated.ANALYTIC)
equationsSet.EquationsCreateFinish()
Explicitly specifying either FINITE_DIFFERENCE or ANALYTIC results in
The code in cmfe_Equations_JacobianMatricesTypesSet from Jenny's last commit (jennyhelyanwe@606a887):
equationsMatrices=>equations%equations%EQUATIONS_MATRICES CALL EquationsMatrices_JacobianTypesSet(equationsMatrices,[jacobianTypes],err,error,*999)
and is now the following in latest develop branch:
NULLIFY(vectorEquations) CALL Equations_VectorEquationsGet(equations%equations,vectorEquations,err,error,*999) NULLIFY(vectorMatrices) CALL EquationsVector_VectorMatricesGet(vectorEquations,vectorMatrices,err,error,*999) CALL EquationsMatrices_JacobianTypesSet(vectorMatrices,[jacobianTypes],err,error,*999)
Most likely because vectorMatrices are only associated during equations create finish producing a chicken and egg situation?
The text was updated successfully, but these errors were encountered: