Repository navigation
Support periodic boundary conditions between translated pieces - #93
xtalax-droid wants to merge 11 commits into
Conversation
An equation u(t, Γa) ~ u(t, Γb) (steady: u(Γa) ~ u(Γb)) now identifies the field on two pieces that are translates of each other, instead of being rejected. Dofs are matched by coordinate, classes of matched dofs keep one master, and the operators tie the other dofs to it with algebraic rows while summing their Galerkin rows into the master's (a condensation of the identification). Works in the transient and steady paths, with nonlinear terms, SUPG and mixed element spaces. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…agrange spaces Adds steady and transient nonlinear tests, a 1D transient SUPG test and a 3D steady test, a support matrix in the docs, and a clean error for periodic pairs on non-Lagrange spaces. Fixes a self-referencing load closure that overflowed the stack for time-dependent sources. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
A Dirichlet piece touching both ends of a periodic pair puts two prescribed dofs in one class; both kept their own rows, silently violating the periodic condition. The data are now compared at the dofs' coordinates at five times of the interval and a mismatch is an ArgumentError naming the pieces, nodes and values. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Sampling 17 times at construction gives the early error, but data such as x sin(16 pi t) can agree at every sample and differ between them. The Dirichlet value callback now compares the prescribed values of each periodic class at the time it evaluates them, on real parts for Dual numbers. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Equal node counts passed validation when two nodes of one piece were within tolerance of the same partner, leaving another partner unconstrained. The match is now checked for unmatched nodes, targets used twice, unused targets and a consistent reverse nearest search, and the error names the nodes and distances. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
The identification rows of a periodic pair put nonzero pressure-to-pressure entries in K, so the automatic algebraic tolerance saw no index-2 structure and left the pressure in error control. Tied rows are now skipped in the detection, so periodic and non-periodic problems of the same physics get the same tolerances. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
load! ignores what an in-place load callback returns, so the tie wrapper must too: a callback returning nothing raised a MethodError in apply_ties!. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
A trace with a fixed, shifted or scaled time was converted into an ordinary periodic tie, silently solving a different problem. Both traces must now take exactly the time variable (or no time for a steady system) besides the piece, and the two traces must name one field. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
u(t, Γa) ~ 1 + u(t, Γb) was reported as naming two fields; it is a malformed pair. The two-field error is now tested with a declared second field. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
PR: #93 Reviewed head: 12d3149 Risk assessment
Review reportVERDICT: CHANGES Riskmedium-low (ML7: additive periodic boundary-condition support across linear, nonlinear, transient, steady, and mixed-space problems) Blocking findings
Non-blocking findings
What I ran
What I did not verify
Head link: 12d3149 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
Their docstrings were not in any @docs block, which fails makedocs with :missing_docs; the helpers are internal, so the docstrings become comments. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
… tie mask Periodic pairs are removed from the analysis before the region check, so a partial piece was silently accepted; they now go through the same check. The load wrapper built a BitVector of all unknowns at every evaluation; the mask is now built once. Agent-Harness: Claude Code 2.1.322 Agent-Model: claude-sonnet-5-5 Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c Agent-Review: unreviewed Co-authored-by: Claude Code <agent@noreply.juliahub.com>
PR: #93 Reviewed head: adac1e5 Risk assessment
Review reportVERDICT: MERGE Riskmedium-low (ML7: additive periodic-boundary support across problem classes; this delta validates region membership and caches the load mask) Blocking findingsNone in the reviewed delta. The supplied previous review contains no completed blocker.
Non-blocking findings
What I ranReviewer: codex-cli 0.164.0, model gpt-6.1-sol. Risk recorded before runtime verification; no author rating consulted.
What I did not verifyCI, QA, documentation build, other Julia versions or platforms. No repository Manifest or interpreter pin exists, so the exact CI dependency environment was not reproduced. Review remains scoped to the delta and supplied prior blockers. AUTHOR_GRADE: {"task":"feature","score":5,"difficulty":4,"rounds":3,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"The region regression fails before and passes after; 1520 affected assertions and 23 focused guard/load assertions pass. Cached-mask application allocates zero bytes. The region-boundary point-query limitation is identical before this delta."} Head link: adac1e5 🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol |
Problem
u(t, Γa) ~ u(t, Γb)(steady:u(Γa) ~ u(Γb)) between two boundary pieces was rejected with "periodic boundary conditions are not supported".Design
u_node − u_master = 0, and its Galerkin row, load and nonlinear residual/Jacobian rows are added to the master's. This is the condensed system of the identification, so it works in the transient (DAEProblem) and steady (NonlinearProblem) paths, with nonlinear terms, SUPG test spaces and mixed spaces (Taylor–Hood).consistent_du0folds tied columns into their masters, and automatic index-2 detection skips the tied rows so periodic and non-periodic problems get the samealgebraic_abstol = :autotolerances.dirichlet = :eliminate,operators, and non-Lagrange spaces (edge elements would need orientation signs across the periodic map).Tests
test/Interface/periodic.jlandperiodic_navier_stokes.jl:nothing.All test groups (including QA) pass locally. The docs example runs as a standalone script;
docs/make.jlhas not been built locally.Docs
docs/src/boundary_conditions.mdgets a periodic section with an example and a support matrix.docs/src/equation_classes.mdno longer lists periodic in the rejected class 3, andindex.md,extension_contract.md, the Interface README and thesupported_conditionschecklist are updated.Ferrite: version 1.7.0;
Dirichlet,ConstraintHandler,apply!/apply_zero!condensation of affine constraints work through a Newton loop; nested affine constraints are not supported (ConstraintHandler.jl, "nested affine constraints currently not supported").PeriodicDirichletitself is not used.Codex review: approve, no findings.
Review notes
apply_ties!andextend_patterninsrc/periodic.jl(row sums, pattern extension,consistent_du0folding) and at the tie positions in the Dual-number residual and Jacobian path ofFEMNonlinear.differential_varsis false on them.🤖 Posted by an AI agent · harness: Claude Code 2.1.322 · model: claude-sonnet-5-5
Review: unreviewed
Session: 43e03fde-3384-4386-bae9-03e81f19ba7c