Fields
NodeField
- A physical field on nodes
- class edelweissfe.fields.nodefield.NodeField(fieldName, dimension, nodeSet)[source]
This class represents a node field. A node field associates every node with multiple entries (e.g., flux and effort) of a field variable. Furthermore, for convencience, it allows to get fast access to values for individual nodes or node sets.
The purpose is to store field data in an efficient, contiguos manner rather than distributing it across all individual nodes.
Example: NodeField 'Displacement' values: {'U' : [[0,0,0], # Node (1) [1,0,0], # Node (2) [0,1,0]]} # Node (3) Spatial representation: (1) --------- (2) | * * | *+---------+ *+---------+ | | [0,0,0] | | [1,0,0] | (3) +---------+ +---------+ * * +---------+ | [0,1,0] | +---------+
- Parameters
fieldName (str) – The name of the field.
dimension (int) – The dimension of the field.
nodes – The associated nodes. Only nodes with active fields are considered.
nodeSet (NodeSet) –
Methods
addEntriesFromOther
(other[, fieldValueEntries])Add values from another NodeField.
copyEntriesFromOther
(other[, fieldValueEntries])Copy values from another NodeField.
createFieldValueEntry
(name)Add an empty entry with given name for the field, e.g, 'U' or 'P' for flux or effort entries.
subset
(subset)Get a view on a subset of the field.
- addEntriesFromOther(other, fieldValueEntries=None)[source]
Add values from another NodeField. If the fields differ, the intersection is considered.
- Parameters
subset – The sub NodeField.
fieldValueEntries (list[str]) – The list of entries which should be copied. Default: all entries are copied.
- copyEntriesFromOther(other, fieldValueEntries=None)[source]
Copy values from another NodeField. If the fields differ, the intersection is considered.
- Parameters
subset – The sub NodeField.
fieldValueEntries (list[str]) – The list of entries which should be copied. Default: all entries are copied.
- class edelweissfe.fields.nodefield.NodeFieldSubset(parentNodeField, subset)[source]
Methods
addEntriesFromOther
(other[, fieldValueEntries])Add values from another NodeField.
copyEntriesFromOther
(other[, fieldValueEntries])Copy values from another NodeField.
createFieldValueEntry
(name)Add an empty entry with given name for the field, e.g, 'U' or 'P' for flux or effort entries.
subset
(subset)Get a view on a subset of the field.