conatus.expert.Problem¶
- class conatus.expert.Problem(variables, *, name=None, symmetry=None, namespace=None)[source]¶
Bases:
objectCommon machinery: variables, equations, LHS/RHS checks, counting, explain().
- Parameters:
variables (Iterable[Field])
name (str | None)
symmetry (SymmetrySubspace | None)
namespace (Any)
- kind = 'abstract'¶
- add_equation(eq, namespace=None)[source]¶
Add
Equation,(lhs, rhs)or a string"lhs = rhs"(parsed byconatus.ir.parsein the declared namespace: the variables,self.namespaceandnamespace; no eval).- Parameters:
eq (Equation | tuple | str)
namespace (Any)
- Return type:
Equation
- add_bc(*conditions, into=None)[source]¶
Add boundary conditions and their tau terms (standard tau), declared in explain().
Each condition is an expression meaning
expr = 0or a tuple(lhs, rhs). All conditions of one call act along one coordinate (read off theirinterpnodes). For each condition one tau variable (constant along that coordinate) is created and lifted into the next highest mode of the target equation’s basis: N-1, N-2, … in the order of the conditions. The target is the only bulk equation along the coordinate, orinto(equation index) when there are several: never guessed. With a symmetry subspace the taus and their parities must be declared by hand (refused here).- Parameters:
conditions (Any)
into (int | None)
- Return type:
list[Equation]
- symmetry_report()[source]¶
Parities of the equations and unknowns under each declared reflection.
- Return type:
str
- check()[source]¶
Whole-problem consistency checks that single equations cannot see (hook).
- Return type:
None
- ncc_fields()[source]¶
Non-variable fields appearing in LHS terms (non-constant coefficients).
- Return type:
frozenset[Field]