pymoto.AssembleMass
- class pymoto.AssembleMass(domain: VoxelDomain, *args, material_property: float = 1.0, ndof: int = 1, bcdiagval: float = 0.0, **kwargs)
Consistent mass matrix or equivalents assembly by scaling elements \(\mathbf{M} = \sum_e x_e \mathbf{M}_e\)
- Input Signal:
x: Scaling vector of size(Nel)
- Output Signal:
M: Mass matrix of size(n, n)
- __init__(domain: VoxelDomain, *args, material_property: float = 1.0, ndof: int = 1, bcdiagval: float = 0.0, **kwargs)
Initialize mass assembly module
- Parameters:
domain (
pymoto.VoxelDomain) – The domain to assemble for; this determines the element size and dimensionality*args – Other arguments are passed to
pymoto.AssembleGeneralmaterial_property (float, optional) – Material property to use in the element matrix (for mass matrix the material density is used; for damping the damping parameter, and for a thermal capacity matrix the thermal capacity multiplied with density). Defaults to 1.0.
ndof (int, optional) – Amount of dofs per node (for mass and damping: ndof = domain.dim; else ndof=1). Defaults to 1.
bcdiagval (float, optional) – The value to put on the diagonal in case of boundary conditions (bc). Defaults to 0.0.
**kwargs – Other keyword arguments are passed to
pymoto.AssembleGeneral
Methods
__init__(domain, *args[, material_property, ...])Initialize mass assembly module
connect(sig_in[, sig_out])Connect without automatic adding to a function network
get_input_sensitivities([as_list])get_input_states([as_list])get_output_sensitivities([as_list])get_output_states([as_list])reset()Reset the state of the sensitivities (they are set to zero or to None)
response()Calculate the response from sig_in and output this to sig_out
Calculate sensitivities using backpropagation
Attributes
Get the number of input signals
Get the number of output signals
- connect(sig_in: Signal | Iterable[Signal], sig_out: Signal | Iterable[Signal] = None)
Connect without automatic adding to a function network
- get_input_sensitivities(as_list=False)
- get_input_states(as_list=False)
- get_output_sensitivities(as_list=False)
- get_output_states(as_list=False)
- property n_in: int
Get the number of input signals
- property n_out: int
Get the number of output signals
Note: Cannot be used in the initial __call__()
- reset()
Reset the state of the sensitivities (they are set to zero or to None)
- response()
Calculate the response from sig_in and output this to sig_out
- sensitivity()
Calculate sensitivities using backpropagation
Based on the sensitivity we get from sig_out, reverse the process and output the new sensitivities to sig_in
- sig_in: List = None
- sig_out: List = None