Datastructures¤
The force density datastructures: COMPAS-based networks and meshes that carry force densities, supports, and loads, ready for an equilibrium calculation.
datastructures
¤
FDDatastructure
¤
A force density datastructure.
This is a mixin of force-density-specific methods layered onto a concrete
COMPAS datastructure. FDNetwork and FDMesh reach Datastructure
through Network and Mesh respectively, so this class does not
inherit from it to avoid a redundant inheritance diamond. The typing-only
base declares the COMPAS accessors this mixin calls.
edge_load
¤
edge_forcedensity
¤
edge_force
¤
edge_loadpath
¤
edges_forcedensities
¤
edges_forcedensities(q: float | None = None, keys: Iterable[tuple[int, int]] | None = None) -> list[float] | None
edges_forces
¤
edges_lengths
¤
edges_loads
¤
edges_loads(load: Sequence[float] | None = None, keys: Iterable[tuple[int, int]] | None = None) -> list[list[float]] | None
edges_loadpaths
¤
loadpath
¤
loadpath() -> float
Get the total load path summed over all edges.
Returns:
-
loadpath(float) –The sum of the per-edge load paths.
print_stats
¤
FDNetwork
¤
A force density network.
Notes
The typing-only first base re-narrows the COMPAS constructors and accessors for static checkers; it is empty at runtime.
from_mesh
classmethod
¤
nodes_coordinates
¤
nodes_fixedcoordinates
¤
node_anchor
¤
node_anchor(key: int) -> None
Mark a node as a support.
Parameters:
-
key(int) –The node to fix.
Notes
An alias of node_support; anchor and support are synonyms here.
is_node_support
¤
nodes_supports
¤
nodes_fixed
¤
nodes_anchors
¤
nodes_free
¤
node_load
¤
nodes_loads
¤
nodes_loads(load: Sequence[float] | None = None, keys: Iterable[int] | None = None) -> list[list[float]] | None
nodes_residual
¤
node_residual
¤
nodes_reactions
¤
node_reaction
¤
is_edge_supported
¤
is_edge_fully_supported
¤
parameters
¤
FDMesh
¤
A force density mesh.
Notes
The typing-only first base re-narrows the COMPAS constructors and accessors for static checkers; it is empty at runtime.
is_vertex_support
¤
vertex_load
¤
vertex_residual
¤
vertex_reaction
¤
vertices_coordinates
¤
vertices_fixedcoordinates
¤
vertices_fixedcoordinates(keys: Iterable[int] | None = None, axes: str = 'xyz') -> list[list[float]]
vertices_supports
¤
vertices_fixed
¤
vertices_free
¤
vertices_loads
¤
vertices_loads(load: Sequence[float] | None = None, keys: Iterable[int] | None = None) -> list[list[float]] | None
vertices_residual
¤
vertices_reactions
¤
is_edge_supported
¤
is_edge_fully_supported
¤
face_lcs
¤
face_load
¤
is_face_supported
¤
is_face_fully_supported
¤
faces_loads
¤
faces_loads(load: list[float] | None = None, keys: Iterable[int] | None = None) -> list[list[float]] | None
parameters
¤
index_edge
¤
Map each edge's enumeration index to its vertex key pair.
Returns:
-
index_edge(dict[int, tuple[int, int]]) –A mapping from edge index to its
(u, v)vertex key pair.
Notes
Mirrors compas.datastructures.Graph.index_edge, which COMPAS 2.x does
not provide on Mesh, so FDMesh and FDNetwork share the API.