Classes of equations composed of terms.
Collect variables present in the terms of the equation.
Ensures that corresponding primary variables of test/parameter variables are always in the list, even if they are not directly used in the terms.
Apply essential (Dirichlet) boundary conditions to a state vector.
Create tangent matrix graph, i.e. preallocate and initialize the sparse storage needed for the tangent matrix. Order of DOF connectivities is not important.
Parameters: | any_dof_conn : bool
rdcs, cdcs : arrays, optional
shape : tuple, optional
verbose : bool
|
---|---|
Returns: | matrix : csr_matrix
|
Create sub-equations containing only terms with the given virtual variables.
Parameters: | var_names : list
known_var_names : list
|
---|---|
Returns: | subequations : Equations instance
|
Evaluate (assemble) residual vectors.
Parameters: | state : array
by_blocks : bool
names : list of str, optional
|
---|---|
Returns: | out : array or dict of array
|
Evaluate (assemble) tangent matrices.
Parameters: | state : array
tangent_matrix : csr_matrix
by_blocks : bool
names : list of str, optional
|
---|---|
Returns: | out : csr_matrix or dict of csr_matrix
|
Evaluate the equations.
Parameters: | mode : one of ‘eval’, ‘el_avg’, ‘qp’, ‘weak’
names : str or sequence of str, optional
|
---|---|
Returns: | out : dict or result
|
Get DOF connectivities needed for creating tangent matrix graph.
Parameters: | any_dof_conn : bool
rdcs, cdcs : arrays, optional
|
---|---|
Returns: | rdcs, cdcs : arrays
|
Return parts of a state vector corresponding to individual state variables.
Parameters: | vec : array, optional
|
---|---|
Returns: | out : dict
|
For each virtual variable get names of state/parameter variables that are present in terms with that virtual variable.
The virtual variables define the actual equations and their dependencies define the variables needed to evaluate the equations.
Returns: | deps : dict
|
---|
Make a full DOF vector satisfying E(P)BCs from a reduced DOF vector.
Clear material data so that next materials.time_update() is performed even for stationary materials.
Set data (vectors of DOF values) of variables.
Parameters: | data : array
step : int, optional
ignore_unknown : bool, optional
|
---|
Set data (vectors of DOF values) of variables.
Parameters: | data : array
step : int
|
---|
Strip a full vector by removing EBC dofs.
Notes
If ‘follow_epbc’ is True, values of EPBC master dofs are not simply thrown away, but added to the corresponding slave dofs, just like when assembling. For vectors with state (unknown) variables it should be set to False, for assembled vectors it should be set to True.
Update the equations for current time step.
The update involves creating the mapping of active DOFs from/to all DOFs for all state variables, the setup of linear combination boundary conditions operators and the setup of active DOF connectivities.
Parameters: | ts : TimeStepper instance
ebcs : Conditions instance, optional
epbcs : Conditions instance, optional
lcbcs : Conditions instance, optional
functions : Functions instance, optional
problem : Problem instance, optional
verbose : bool
|
---|---|
Returns: | graph_changed : bool
|
Update data materials for current time and possibly also state.
Parameters: | ts : TimeStepper instance
mode : ‘normal’, ‘update’ or ‘force’
problem : Problem instance, optional
verbose : bool
|
---|