Ejemplo n.º 1
0
 public void AddConstraint(XNode node, StructuralDof dof, double displacement)
 {
     // TODO: This should be done more efficiently than O(N)
     if (!nodes.Contains(node))
     {
         throw new ArgumentException("There is no such node");
     }
     constraints[node, dof] = displacement;
 }
Ejemplo n.º 2
0
 //TODO: Should I use the node's id instead? In a UI class, I probably should.
 public void AddNodalLoad(XNode node, StructuralDof dof, double magnitude)
 {
     // TODO: This should be done more efficiently than O(N)
     if (!nodes.Contains(node))
     {
         throw new ArgumentException("There is no such node");
     }
     loads[node, dof] = magnitude;
 }
Ejemplo n.º 3
0
 // Would it be faster to return the Dictionary<StandardDofType, int> for consecutive accesses of the dofs of this node?
 // Dictionary's Read operation is supposed to be O(1), but still...
 public int GetStandardDofOf(XNode node, StructuralDof dofType)
 {
     return(standardDofs[node, dofType]);
 }
Ejemplo n.º 4
0
 public int GetConstrainedDofOf(XNode node, StructuralDof dofType)
 {
     return(constrainedDofs[node, dofType]);
 }
Ejemplo n.º 5
0
 public NodalLoad(Node node, StructuralDof dofType, double value)
 {
     this.Node    = node;
     this.DofType = dofType;
     this.Value   = value;
 }