pycufsm.jupyter_notebooks.gui_widgets ===================================== .. py:module:: pycufsm.jupyter_notebooks.gui_widgets Classes ------- .. autoapisummary:: pycufsm.jupyter_notebooks.gui_widgets.Preprocess Functions --------- .. autoapisummary:: pycufsm.jupyter_notebooks.gui_widgets.prevals Module Contents --------------- .. py:function:: prevals() -> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, List[int]] Returns default material, node, element, spring, constraint, and flag values. Returns: Tuple of (props, nodes, elements, springs, constraints, flag). .. py:class:: Preprocess Widget-based preprocessor for cross-section geometry input in Jupyter notebooks. .. py:attribute:: m :value: 0 .. py:attribute:: n :value: 0 .. py:attribute:: e :value: 0 .. py:attribute:: nodes .. py:attribute:: elements .. py:attribute:: props .. py:attribute:: springs .. py:attribute:: constraints .. py:attribute:: flag :value: [] .. py:attribute:: mitems :value: [] .. py:attribute:: nitems :value: [] .. py:attribute:: eitems :value: [] .. py:attribute:: add_mat_btn :value: None .. py:attribute:: del_mat_btn :value: None .. py:attribute:: add_node_btn :value: None .. py:attribute:: del_node_btn :value: None .. py:attribute:: add_elem_btn :value: None .. py:attribute:: del_elem_btn :value: None .. py:attribute:: submit_btn :value: None .. py:attribute:: bc_widget :value: None .. py:attribute:: neigs :value: None .. py:attribute:: rowm :value: None .. py:attribute:: rnode :value: None .. py:attribute:: relem :value: None .. py:attribute:: rflag :value: None .. py:attribute:: r_bc :value: None .. py:attribute:: cs :value: None .. py:attribute:: page :value: None .. py:attribute:: row1 :value: None .. py:attribute:: row :value: None .. py:attribute:: row0 :value: None .. py:attribute:: b_c :value: None .. py:attribute:: flags :value: None .. py:method:: wprops(m: int) -> Tuple[ipywidgets.VBox, ipywidgets.Button, ipywidgets.Button, list] Builds the material properties widget panel. Args: m: Number of materials. Returns: Tuple of (panel widget, add button, delete button, material item list). .. py:method:: wnodes(nodes, n) Builds the nodes widget panel. Args: nodes: Array of node data. n: Number of nodes. Returns: Tuple of (panel widget, add button, delete button, node item list). .. py:method:: welems(elements, e) Builds the elements widget panel. Args: elements: Array of element data. e: Number of elements. Returns: Tuple of (panel widget, add button, delete button, element item list). .. py:method:: wflag(flag) Builds the plot options widget panel. Args: flag: List of flag values (0 or 1) for each plot option. Returns: Tuple of (panel widget, submit button, flag checkbox list). .. py:method:: w_bound_cond() Builds the boundary conditions widget panel. Returns: Tuple of (panel widget, dropdown widget, eigenvalue count widget). .. py:method:: assemble() Assembles all sub-panels into the main page widget and wires button callbacks. .. py:method:: add_material() Adds a new material row to the materials panel. .. py:method:: del_material() Removes the last material row from the materials panel. .. py:method:: add_node() Adds a new node row to the nodes panel. .. py:method:: del_node() Removes the last node row from the nodes panel. .. py:method:: add_elem() Adds a new element row to the elements panel. .. py:method:: del_elem() Removes the last element row from the elements panel. .. py:method:: submit() Reads all widget values, updates stored arrays, and redraws the cross-section. .. py:method:: run(m, n, e, props, nodes, elements, springs, constraints, flag) Initializes and displays the full preprocessor UI. Args: m: Number of materials. n: Number of nodes. e: Number of elements. props: Array of material properties. nodes: Array of node data. elements: Array of element data. springs: Array of spring data. constraints: Array of constraint data. flag: List of plot option flags. Returns: Tuple of updated (props, nodes, elements).