sfepy.discrete.conditions module¶
The Dirichlet, periodic and linear combination boundary condition classes, as well as the initial condition class.

class
sfepy.discrete.conditions.
Condition
(name, **kwargs)[source]¶ Common boundary condition methods.

class
sfepy.discrete.conditions.
Conditions
(objs=None, **kwargs)[source]¶ Container for various conditions.

canonize_dof_names
(self, dofs)[source]¶ Canonize the DOF names using the full list of DOFs of a variable.

group_by_variables
(self, groups=None)[source]¶ Group boundary conditions of each variable. Each condition is a group is a single condition.
 Parameters
 groupsdict, optional
If present, update the groups dictionary.
 Returns
 outdict
The dictionary with variable names as keys and lists of single condition instances as values.


class
sfepy.discrete.conditions.
EssentialBC
(name, region, dofs, key='', times=None)[source]¶ Essential boundary condidion.
 Parameters
 namestr
The boundary condition name.
 regionRegion instance
The region where the boundary condition is applied.
 dofsdict
The boundary condition specification defining the constrained DOFs and their values.
 keystr, optional
The sorting key.
 timeslist or str, optional
The list of time intervals or a function returning True at time steps, when the condition applies.

class
sfepy.discrete.conditions.
InitialCondition
(name, region, dofs, key='')[source]¶ Initial condidion.
 Parameters
 namestr
The initial condition name.
 regionRegion instance
The region where the initial condition is applied.
 dofsdict
The initial condition specification defining the constrained DOFs and their values.
 keystr, optional
The sorting key.

class
sfepy.discrete.conditions.
LinearCombinationBC
(name, regions, dofs, dof_map_fun, kind, key='', times=None, arguments=None)[source]¶ Linear combination boundary condidion.
 Parameters
 namestr
The boundary condition name.
 regionslist of two Region instances
The constrained (master) DOFs region and the new (slave) DOFs region. The latter can be None if new DOFs are not field variable DOFs.
 dofsdict
The boundary condition specification defining the constrained DOFs and the new DOFs (can be None).
 dof_map_funstr
The name of function for mapping the constrained DOFs to new DOFs (can be None).
 kindstr
The linear combination condition kind.
 keystr, optional
The sorting key.
 timeslist or str, optional
The list of time intervals or a function returning True at time steps, when the condition applies.
 arguments: tuple, optional
Additional arguments, depending on the condition kind.

class
sfepy.discrete.conditions.
PeriodicBC
(name, regions, dofs, match, key='', times=None)[source]¶ Periodic boundary condidion.
 Parameters
 namestr
The boundary condition name.
 regionslist of two Region instances
The master region and the slave region where the DOFs should match.
 dofsdict
The boundary condition specification defining the DOFs in the master region and the corresponding DOFs in the slave region.
 matchstr
The name of function for matching corresponding nodes in the two regions.
 keystr, optional
The sorting key.
 timeslist or str, optional
The list of time intervals or a function returning True at time steps, when the condition applies.