femo_alpha.rm_shell.linear_shell_fenicsx.utils
Contains problem-specific functionalities such as project higher-order dofs to a lower order function space (for plotting), and calculate the wing volume of an airplane model.
Module Contents
Classes
Delta function on closest points |
|
Multi-point delta function applied on the closest points |
Functions
|
Applies input vertex forces to relevant DOF locations in force vector |
|
|
|
Convert the PETSc matrix to a dense numpy array |
|
|
|
Returns the 'vertex to DOF map' with shape [nVtx,dim] containing |
|
L2 projection of an UFL object (expression) to targeted function. |
|
L2 projection of an UFL object (expression) to targeted function. |
|
- class femo_alpha.rm_shell.linear_shell_fenicsx.utils.Delta(x0, f_p, dist=0.0001, **kwargs)
- eval(x)
- class femo_alpha.rm_shell.linear_shell_fenicsx.utils.Delta_cpt(x0, f_p, **kwargs)
Delta function on closest points
- eval(x)
- class femo_alpha.rm_shell.linear_shell_fenicsx.utils.Delta_mpt(x0, f_p, **kwargs)
Multi-point delta function applied on the closest points
- eval(x)
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.applyNodalForces(f_array, mesh, W)
Applies input vertex forces to relevant DOF locations in force vector
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.calculateSurfaceArea(mesh, boundary)
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.computeNodalDisp(u)
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.computeNodalDispMagnitude(u)
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.convertToDense(A_petsc)
Convert the PETSc matrix to a dense numpy array (super unefficient, only used for debugging purposes)
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.getCellID(coord, mesh)
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.getVertexToDofMap(W, mesh)
Returns the ‘vertex to DOF map’ with shape [nVtx,dim] containing the index of the DOF corresponding to each vertex/direction–used to directly map applied forces to force vector. This is not particularly straightforward but is more efficient than previous impelementations; see https://fenicsproject.discourse.group/t/application-of-point-forces-mapping-vertex-indices-to-corresponding-dofs/9646 for more information
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.project(v, target_func, bcs=[], lump_mass=False)
L2 projection of an UFL object (expression) to targeted function. Typically used for visualization in post-processing. lump_mass is an optional boolean argument set to be False by default; it’s set to be True when lumping is needed for preventing oscillation when projecting discontinous data.
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.projectPointForce(f_array, target_func, dx_=dx, bcs=[])
L2 projection of an UFL object (expression) to targeted function. Typically used for visualization in post-processing. lump_mass is an optional boolean argument set to be False by default; it’s set to be True when lumping is needed for preventing oscillation when projecting discontinous data.
- femo_alpha.rm_shell.linear_shell_fenicsx.utils.sortIndex(old_ind, new_ind)