*TIE with the same surface as slave and master: ccx loops forever printing "zero coefficient on the dependent side of an equation" (up to 2.21 an *ERROR)

Summary

A plain (tied contact) *TIE whose slave and master surface are the same surface is accepted. ccx then never finishes. It prints

 *WARNING in cascade: zero coefficient on the
          dependent side of an equation
          dependent node: 5          direction: 1

over and over, about 200 MB of output per second, until it is killed or the disk is full. The same happens with two different surfaces that share nodes (two faces of one element with a common edge).

The manual says this input is not allowed. Section 7.133 (*TIE) of the 2.23 manual: “This option is used to tie two surfaces”, and “Only nodes on an axis of cyclic symmetry can belong to both the slave as well as to the master surface.” So this is a missing input check: ccx should stop with an *ERROR instead of looping.

The loop is also a regression. Up to version 2.21, cascade.c stopped with “*ERROR in cascade: zero coefficient on the dependent side of an equation” at this point. In 2021 a tie between surfaces with shared nodes ended that way (Mesh partitioning for Hex+tet combination in ccx - #6 by manny9808). Commit 79aa045 (“provided a solution for zero coefficients in the cascade.c routine”, 8 Dec 2023, first released in 2.22) replaced the stop by a small new coefficient and lets the substitution go on. For an MPC whose dependent DOF is also one of its own independent terms, the next pass zeroes the coefficient again, so the loop never ends.

Version

ccx 2.23 (macOS arm64). Source: master 9ba5d76 (16 Oct 2026).

Already reported or fixed?

Not reported: I found no matching GitHub issue (open or closed) or pull request in Dhondtguido/CalculiX, and no calculix.discourse.group topic (searched 21 Oct 2026). Not fixed: ties.f, gentiedmpc.f and cascade.c are unchanged on master (9ba5d76).

Related:

Minimal input

self_tie.inp: one C3D8 cube. The top face is tied to itself.

*NODE, NSET=NALL
1, 0., 0., 0.
2, 1., 0., 0.
3, 1., 1., 0.
4, 0., 1., 0.
5, 0., 0., 1.
6, 1., 0., 1.
7, 1., 1., 1.
8, 0., 1., 1.
*ELEMENT, TYPE=C3D8, ELSET=EALL
1, 1, 2, 3, 4, 5, 6, 7, 8
*NSET, NSET=BOT
1, 2, 3, 4
*NSET, NSET=TOP
5, 6, 7, 8
*SURFACE, NAME=STOP
1, S2
*TIE, NAME=T1
STOP, STOP
*MATERIAL, NAME=MAT
*ELASTIC
1000., 0.3
*SOLID SECTION, ELSET=EALL, MATERIAL=MAT
*BOUNDARY
BOT, 1, 3
*STEP
*STATIC
*BOUNDARY
TOP, 3, 3, 0.01
*NODE PRINT, NSET=TOP, TOTALS=ONLY
RF
*END STEP

edge_tie.inp ties the side face y = 0 (S3: nodes 1, 5, 6, 2) to the top face (S2). The two faces share nodes 5 and 6. It is self_tie.inp with the two *TIE lines replaced by these four:

*SURFACE, NAME=SSIDE
1, S3
*TIE, NAME=T1
SSIDE, STOP

no_tie.inp is self_tie.inp without the two *TIE lines.

How to run

ccx self_tie > self_tie.out. Stop it after a few seconds (Ctrl-C), or run it under a file-size limit, e.g. ulimit -f 409600 (200 MB).

Expected

An *ERROR, because the slave and master surface are the same, or because a node belongs to both surfaces (section 7.133). Without the tie (no_tie.inp) the run ends normally: total force on TOP = 1.098901E+01 in z.

Actual

self_tie.inp and edge_tie.inp both print the banner and " Decascading the MPC’s", then the warning above in an endless loop, always for node 5, direction 1:

 *WARNING in cascade: zero coefficient on the
          dependent side of an equation
          dependent node: 5          direction: 1

 new coefficient = 3.081488e-38

From the second warning on, the new coefficient is always 3.081488e-43. With a 200 MB file-size limit the output reached the limit after 1.1 s (1,233,617 warnings), and ccx was killed by SIGXFSZ. With no limit, ccx keeps writing until it is killed or the disk is full.

Where it goes wrong

  • ties.f lines 116-128 store the slave and master surface names for a tied contact *TIE without comparing them.
  • gentiedmpc.f attaches each slave node to the master face it projects onto (attach_2d, line 378). It then writes the MPC u(node) - Σ ratio(k) u(nodef(k)) = 0 (lines 435-455). It does not check whether node is itself one of the face nodes nodef(k). For node 5 on its own face, ratio = 1 at node 5, so the MPC’s dependent DOF is also one of its independent terms.
  • gentiedmpc.f has the same MPC code twice: lines 378-456 for slave nodes listed one by one, and lines 634-712 for generated node ranges (node=ialset(j-2) at line 462). Neither checks for the slave node among the face nodes.
  • cascade.c resolves MPCs that depend on other MPCs by substitution, in the loop that starts at line 127 (“decascading using simple substitution”). The loop ends only when a pass changes nothing (line 349: if(ichange==0) break;). For this MPC, the independent term node 5, direction 1, is found as the dependent DOF of an MPC (the same MPC). The dependent coefficient collects to zero, and the warning is printed. Line 223 resets the coefficient to 1.e-5*coefmin, and line 236 sets ichange=1. The next pass does the same, so the loop never ends.
  • Before commit 79aa045 (8 Dec 2023), the place of line 223 held FORTRAN(stop,()); (it is still there, commented out, at line 225). The same change was made at lines 331-333.

Fix

  • ties.f: for a plain (tied contact) *TIE, stop with an *ERROR when the slave and master surface names are equal.
  • gentiedmpc.f: before writing the MPC, check whether the slave node is one of nodef(1..nnodelem). If so, write no MPC and issue a warning, as is already done for a DOF that is already dependent (lines 392-420). Or stop with an *ERROR. The check is needed in both blocks: after line 378 (nodes listed one by one) and after line 634 (generated node ranges). This also covers different surfaces that share nodes.
  • cascade.c: stop with an *ERROR naming the MPC when the dependent coefficient of the same MPC vanishes again in a later pass, or restore the stop that 79aa045 removed (as #124 asks). Either is better than looping.

Confirmed using official build of ccx 2.23 on Windows, needs a GitHub ticket.

Indeed, it enters an infinite loop with warning messages.

 *WARNING in cascade: zero coefficient on the
          dependent side of an equation
          dependent node: 5          direction: 1

 new coefficient = 3.081488e-43

posted: *TIE with the same surface as slave and master: ccx loops forever printing "zero coefficient on the dependent side of an equation" (up to 2.21 an *ERROR) · Issue #288 · Dhondtguido/CalculiX · GitHub

1 Like