ISAAR.MSolve.Logging/Utilities/ConstrainedDofForcesCalculator.cs
/// <summary>
/// Returns -1 if the element does not engage the requested <see cref="IDofType"/>
/// </summary>
1 if the element does not engage the requested
1 if the element does not engage the requested
private int FindLocalDofIndex(IElement element, INode node, IDofType dofType)
        {
            int localNodeIdx = element.Nodes.ToList().IndexOf(node);
            Debug.Assert(localNodeIdx != -1, "The element does not contain this node.");
            IReadOnlyList<IReadOnlyList<IDofType>> elementDofs = element.ElementType.DofEnumerator.GetDofTypesForMatrixAssembly(element);
            int localDofIdx = elementDofs[localNodeIdx].FindFirstIndex(dofType);
            int multNum = elementDofs[localNodeIdx].Count;
            int dofIdx = multNum * (localNodeIdx + 1) - (localDofIdx + 1);
            return dofIdx;
        }
private int FindLocalDofIndex ( IElement element , INode node , IDofType dofType ) { int localNodeIdx = element . Nodes . ToList ( ) . IndexOf ( node ) ; Debug . Assert ( localNodeIdx != - 1 , " " ) ; IReadOnlyList < IReadOnlyList < IDofType > > elementDofs = element . ElementType . DofEnumerator . GetDofTypesForMatrixAssembly ( element ) ; int localDofIdx = elementDofs [ localNodeIdx ] . FindFirstIndex ( dofType ) ; int multNum = elementDofs [ localNodeIdx ] . Count ; int dofIdx = multNum * ( localNodeIdx + 1 ) - ( localDofIdx + 1 ) ; return dofIdx ; }
Returns -1 if the element does not engage the requested
Returns - 1 if the element does not engage the requested
element
IElement
node
INode
dofType
IDofType