Skip to content

Constraints formulas in the PF module #16085

Discussion options

You must be logged in to vote

I just wrote codes about eta1 * c1 + eta2 * c2 +eta3 * c3 =c, and there is no error when making.
But I am afraid there will be problems. Could anyone help me check the expressions of computeQpJacobian and computeQpOffDiagJacobian?
Thanks a lot!

Real
ConstraintConcentration::computeQpResidual()
{
Real sum = 0.0;
for (unsigned int i = 0; i < _cs_num; ++i)
sum += (* _cs[i])[_qp] * (* _etas[i])[_qp];
return _test[_i][_qp] * (sum - _u[_qp]);
}

Real
ConstraintConcentration::computeQpJacobian()
{
return -_test[_i][_qp] * _phi[_j][_qp];
}

Real
ConstraintConcentration::computeQpOffDiagJacobian(unsigned int jvar)
{
auto cjvar = mapJvarToCvar(jvar, _cs_map);
if (cjvar >= 0)
return _test[_i][_qp] * (…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@LiuPengPeter
Comment options

Comment options

You must be logged in to vote
2 replies
@dschwen
Comment options

dschwen Nov 5, 2020
Collaborator

@LiuPengPeter
Comment options

Answer selected by aeslaughter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants