Muscat.FE.KR.KRFromDistribution module¶
- class KRFromDistribution[source]¶
Bases:
KRBase
Class to impose values in the primary unknown of the system for the moment this only work with iso-parametric fields
- FixUsingFEFields(inputFEFields: Dict[str, FEField]) KRFromDistribution [source]¶
Set the fields to be used to impose the dof values
- Parameters:
inputFEFields (List[FEField]) – a list of FEField (the order is not important)
- Returns:
self
- Return type:
- FixUsingNodeFields(mesh: Mesh, nodalField: Dict[str, ArrayLike]) KRFromDistribution [source]¶
Set the fields to be used to impose the dof values. Internally we convert the numpy array into fields with the function : Muscat.FE.Fields.FieldTools.NodeFieldToFEField()
- Parameters:
mesh (Mesh) – the mesh
nodalField (Dict[str,ArrayLike]) – a dict with key:value in the form of “u”:numpy(3,NbNodes)
- Returns:
self
- Return type:
- GenerateEquations(mesh: Mesh, fields: List[FEField], CH: ConstraintsHolder | None = None, solutionFields: List[FEField] | None = None, reactionFields: List[FEField] | None = None) ConstraintsHolder [source]¶
Generate the equation to impose the constraints defined by this class. More information about this
- Parameters:
mesh (Mesh) – The mesh
fields (List[FEField]) – The list of fields to be used to compute the numbering (in the order on the linear system to be solved)
CH (Optional[ConstraintsHolder], optional) – the ConstraintsHolder to store the equations, if None is provided a new object is created, by default None
solutionFields (Optional[List[FEField]], optional) – In the case of an iterative solver (i.e. in a newton loop) the current solution, by default None
reactionFields (Optional[List[FEField]], optional) – The user can provide the reactions fields ( the integral of the internal forces), by default None
- Returns:
the ConstraintsHolder with the new equations
- Return type:
- Raises:
RuntimeError – if no data is provided. the user must call FixUsingFEFields or FixUsingNodeField to provide the fields
LookupError – If the user impose a restriction on a field (using .AddArg()) but not available on the problem