morphogen.contact.kernels¶
Kernels of the contact of surfaces (Numba): the functions of the faces, the point of a face nearest a point, the forces of a slave point on a master face or on a rigid obstacle, with Coulomb’s friction, and their tangents.
A slave point is an integration point of a face of the slave surface, of weight w
(its share of the reference area of the face). Its state (STATE values) is kept
from the end of a step to the next: the multiplier of the augmented Lagrangian, the point
of the master surface that faced it (a face and its coordinates; for an obstacle, its
position relative to the obstacle), the tangential traction, the energy that friction
dissipated per unit area, its gap and its pressure.
- morphogen.contact.kernels.P_STIFF = 0¶
the penalty of the normal gap, the stiffness of the stick, the coefficient of friction, the deepest penetration looked for, the gap below which two surfaces touch, the size of the faces, and the distance within which a face of a surface that lies behind a point of it, at rest, is across a wall from the point; how far beyond the rim of the master a point still faces it (
RIM), and whether the weight of a point is the share of its face that the other surface sees (_share(): the points at the nodes)- Type:
The parameters of a contact
- morphogen.contact.kernels.P_STICK = 1¶
the penalty of the normal gap, the stiffness of the stick, the coefficient of friction, the deepest penetration looked for, the gap below which two surfaces touch, the size of the faces, and the distance within which a face of a surface that lies behind a point of it, at rest, is across a wall from the point; how far beyond the rim of the master a point still faces it (
RIM), and whether the weight of a point is the share of its face that the other surface sees (_share(): the points at the nodes)- Type:
The parameters of a contact
- morphogen.contact.kernels.P_MU = 2¶
the penalty of the normal gap, the stiffness of the stick, the coefficient of friction, the deepest penetration looked for, the gap below which two surfaces touch, the size of the faces, and the distance within which a face of a surface that lies behind a point of it, at rest, is across a wall from the point; how far beyond the rim of the master a point still faces it (
RIM), and whether the weight of a point is the share of its face that the other surface sees (_share(): the points at the nodes)- Type:
The parameters of a contact
- morphogen.contact.kernels.P_DEPTH = 3¶
the penalty of the normal gap, the stiffness of the stick, the coefficient of friction, the deepest penetration looked for, the gap below which two surfaces touch, the size of the faces, and the distance within which a face of a surface that lies behind a point of it, at rest, is across a wall from the point; how far beyond the rim of the master a point still faces it (
RIM), and whether the weight of a point is the share of its face that the other surface sees (_share(): the points at the nodes)- Type:
The parameters of a contact
- morphogen.contact.kernels.P_TOUCH = 4¶
the penalty of the normal gap, the stiffness of the stick, the coefficient of friction, the deepest penetration looked for, the gap below which two surfaces touch, the size of the faces, and the distance within which a face of a surface that lies behind a point of it, at rest, is across a wall from the point; how far beyond the rim of the master a point still faces it (
RIM), and whether the weight of a point is the share of its face that the other surface sees (_share(): the points at the nodes)- Type:
The parameters of a contact
- morphogen.contact.kernels.P_SIZE = 5¶
the penalty of the normal gap, the stiffness of the stick, the coefficient of friction, the deepest penetration looked for, the gap below which two surfaces touch, the size of the faces, and the distance within which a face of a surface that lies behind a point of it, at rest, is across a wall from the point; how far beyond the rim of the master a point still faces it (
RIM), and whether the weight of a point is the share of its face that the other surface sees (_share(): the points at the nodes)- Type:
The parameters of a contact
- morphogen.contact.kernels.P_BEHIND = 6¶
the penalty of the normal gap, the stiffness of the stick, the coefficient of friction, the deepest penetration looked for, the gap below which two surfaces touch, the size of the faces, and the distance within which a face of a surface that lies behind a point of it, at rest, is across a wall from the point; how far beyond the rim of the master a point still faces it (
RIM), and whether the weight of a point is the share of its face that the other surface sees (_share(): the points at the nodes)- Type:
The parameters of a contact
- morphogen.contact.kernels.P_RIM = 7¶
the penalty of the normal gap, the stiffness of the stick, the coefficient of friction, the deepest penetration looked for, the gap below which two surfaces touch, the size of the faces, and the distance within which a face of a surface that lies behind a point of it, at rest, is across a wall from the point; how far beyond the rim of the master a point still faces it (
RIM), and whether the weight of a point is the share of its face that the other surface sees (_share(): the points at the nodes)- Type:
The parameters of a contact
- morphogen.contact.kernels.P_SHARE = 8¶
the penalty of the normal gap, the stiffness of the stick, the coefficient of friction, the deepest penetration looked for, the gap below which two surfaces touch, the size of the faces, and the distance within which a face of a surface that lies behind a point of it, at rest, is across a wall from the point; how far beyond the rim of the master a point still faces it (
RIM), and whether the weight of a point is the share of its face that the other surface sees (_share(): the points at the nodes)- Type:
The parameters of a contact
- morphogen.contact.kernels.RIM = 1e-12¶
How far beyond the rim of the master surface (in the coordinates of its faces) a slave point still faces it, on the face continued: nothing for the points inside the faces of the slave; a twentieth of a face for those at its nodes, which may lie on the rim of the master (two bodies of the same section) and would otherwise face it or not with the rounding of each iteration
- morphogen.contact.kernels.RIM_NODES = 0.05¶
How far beyond the rim of the master surface (in the coordinates of its faces) a slave point still faces it, on the face continued: nothing for the points inside the faces of the slave; a twentieth of a face for those at its nodes, which may lie on the rim of the master (two bodies of the same section) and would otherwise face it or not with the rounding of each iteration
- morphogen.contact.kernels.SLACK = 0.05¶
How far outside a master face (in its coordinates) a slave point stays on it
- morphogen.contact.kernels.FACING = -0.25¶
Two faces face each other when the cosine of the angle of their outward normals is below this (more than 104 degrees apart): faces at right angles along an edge of a body, a little distorted, do not
- morphogen.contact.kernels.FACING_OWN = 0.6¶
the walls of a notch that closes touch at its bottom while their normals are still far from opposite (the two walls of the corner of a hexagonal cell: 60 degrees apart at rest), and what tells them from the two sides of an edge of the body is where they lay at rest (
_across())- Type:
The same for a surface against itself
- morphogen.contact.kernels.S_LAMBDA = 0¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_FACE = 1¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_XI = 2¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_ETA = 3¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_TX = 4¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_TY = 5¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_TZ = 6¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_WORK = 7¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_GAP = 8¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_PRESSURE = 9¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.S_SHARE = 10¶
the share of its weight that presses)
- Type:
The state of a slave point (the last
- morphogen.contact.kernels.PLANE = 0¶
The kinds of rigid obstacles
- morphogen.contact.kernels.SPHERE = 1¶
The kinds of rigid obstacles
- morphogen.contact.kernels.CYLINDER = 2¶
The kinds of rigid obstacles
- morphogen.contact.kernels.CONE = 3¶
The kinds of rigid obstacles
- morphogen.contact.kernels.POINTS3 = array([[0.16666667, 0.16666667, 0.33333333], [0.66666667, 0.16666667, 0.33333333], [0.16666667, 0.66666667, 0.33333333]])¶
The points of the faces of three nodes (exact to degree 2) and of six (to degree 4): ξ, η and weights that add up to 1
- morphogen.contact.kernels.NODES3 = array([[0. , 0. , 0.33333333], [1. , 0. , 0.33333333], [0. , 1. , 0.33333333]])¶
The points at the nodes of the faces, for surfaces whose corners and edges touch first: the vertices of a face of three nodes (exact to degree 1); the vertices, the middles of the edges and the centroid of a face of six (exact to degree 3)
- morphogen.contact.kernels.RULES = ('gauss', 'nodes')¶
The rules of the contact points of a surface
- morphogen.contact.kernels.shapes(n, xi, eta, shape, dxi, deta)[source]¶
The functions of the nodes of a face of
nnodes (3, or 6: the corners, then the middles of the edges 0-1, 1-2 and 2-0) at a point, and their derivatives.
- morphogen.contact.kernels.closest(n, x, p, slack, rim, over=1e-12)[source]¶
The coordinates (ξ, η) of the point of a face of
nnodes (x: their positions) nearestp, the square of their distance, and how it lies: 1, the foot of the perpendicular fromp(the gap is then along the normal of the face); 0, a point of an edge that the face shares with another of its surface (a point over a ridge); -1, a point of the rim of the surface (rim: which of the edges 0-1, 1-2 and 2-0 of the face no other face shares):pis beyond the surface. A face of six nodes may be curved: Newton’s method on its surface from the nearest point of the triangle of its corners, then, where it leaves the face, on its three edges.slack: how far outside the face (in its coordinates), across the edges that it shares, the foot of the perpendicular is still taken, on the face continued: a point that hovers over an edge then stays on one face;over: likewise across the edges of the rim (RIM).
- morphogen.contact.kernels.pair_point(ns, nm, xs, xm, xs_old, xm_old, rim, xi, eta, weight, par, old, anchored, anchor, predict, f, new)[source]¶
The forces (
f: the nodes of the slave face, then those of the master face) of a slave point at (xi,eta) of its face against a master face, and its statenew.anchored: the point of the master that faced it at the end of the last step lies on this face (at the coordinates ofold); otherwiseanchoris its position now; a point that no point of the master faced then rubs by the move of the two points that touch now since then (xs_old,xm_old: the nodes of the two faces at the end of the last step).rim: the edges of the master face on the rim of its surface.predict: a point that touched stays closed and sticks. Returns whether the point presses.
- morphogen.contact.kernels.pair_forces(x, x_old, x_ref, ident, slave, master, rims, face, xi, eta, weight, candidates, last, par, old, new, own, tangent, predict, fe, ke, nodes, active)[source]¶
The forces and tangents of the slave points of a pair of surfaces in the positions
xof the nodes (x_old: at the end of the last step;x_ref: at rest;ident: the node that each is, itself or, for the image of a node of a periodic cell, the one that it is the same as across a face of the cell). For each point, the master face among itscandidateswhose nearest point is the closest, among those that face it (opposite normals) within the deepest penetration looked for, and not beyond the rim of the master surface (rims: the edges of each master face that no other shares);own: the two surfaces are one (the faces that share a node with that of the point are left out, and those that it has gone through but that lay behind it at rest, across a wall of solid:_across()).last: the face of each point at the last evaluation (-1: none), which it keeps while the foot of its perpendicular stays on it or withinSLACKof it: a point that hovers over an edge between two faces, where the tangent of the forces breaks, would otherwise go from one to the other at each iteration.fe(points x dofs),ke(points x dofs x dofs, by central differences of the forces),nodes(the nodes of the dofs) andactive(whether the point presses).
- morphogen.contact.kernels.obstacle_distance(kind, geometry, p, normal)[source]¶
The signed distance of the point
pto a rigid obstacle (positive outside it) and its outward normal there.geometry: a point (0-2), a unit axis (3-5), a size (6: the radius of a sphere or of a cylinder, the half-angle of a cone) and a sign (7: -1 for the inside of a sphere or of a cylinder that holds the body). A plane: its point and its outward normal; a sphere: its centre; a cylinder: a point of its axis; a cone: its apex and its axis, from the apex into the cone.
- morphogen.contact.kernels.obstacle_point(ns, xs, xi, eta, weight, kind, geometry, par, old, predict, f, new)[source]¶
The forces (the nodes of its face) of a slave point against a rigid obstacle and its state
new; its state keeps, in place of a point of a master face, its position relative to the obstacle at the end of the last step. Returns whether it presses.