pyxfem.solidmechanics.boundary_conditions module

Created on April 10th 07:43:08 2024

@author: nchevaug

pyxfem.solidmechanics.boundary_conditions.compute_dirichlet(space, physname2dirichlet, groupename2dofid: Mapping[str, NDArray[int64]], groupename2dofxy: Mapping[str, NDArray[float64]]) → tuple[NDArray[int64], NDArray[int64], NDArray[float64]][source]

return the list of free dofs ids, fixed dofs ids and fixed dofs values

pyxfem.solidmechanics.boundary_conditions.compute_dirichlet_fem_p1_vect2d(nvertex, nodex, valuex, nodey, valuey)[source]

more direct way to compute dirichlet bc if node list is already known

pyxfem.solidmechanics.boundary_conditions.compute_neumann(space: FEMSpaceP1 | FEMSpaceP1NC, phys_name2neumann)[source]

return the vector F such as F.T.dot(U) = int_neumann ( t.u_h) dGamma_h

pyxfem.solidmechanics.boundary_conditions.get_dofs_and_interpolation_points(mesh: SMesh, edge_groupe_names: Iterable[str], space) → tuple[Dict[str, NDArray[int64]], Dict[str, NDArray[float64]]][source]

get the space’s degree of freedom id and the corresponding interpolation point corresponding to the edge_groupe_names (alist of names). Usefull for Dirichlet BC for example

pyxfem.solidmechanics.boundary_conditions.get_space_entity(edge_groupe_names: Iterable[str], mesh: SMesh) → Dict[str, NDArray[int64]][source]

get the space’s edge id corresponding to the edge groupe name

pyxfem.solidmechanics.boundary_conditions.set_values(vxy: NDArray[float64], evaluator: float | Callable[[NDArray[float64]], NDArray[float64]]) → NDArray[float64][source]

A simple function that return values associated to the points in array vxy

according to the evaluator. The evaluator can be a scalar or a function