ISAAR.MSolve.SamplesConsole/Preprocessing/PreprocessorModel.cs
/// <summary>
/// Adds a new finite element to the model.
/// </summary>
/// <param name="element">The element type (e.g. continuum element, beam, etc.)</param>
/// <param name="elementNodes">The element's nodes. Beware of their order.</param>
Adds a new finite element to the model.
Adds a new finite element to the model .
public void AddElement(IFiniteElement element, IReadOnlyList<Node> elementNodes)
        {
            int numElementsTotal = model.Elements.Count;
            int numElementsSubdomain = model.Subdomains[0].Elements.Count;
            var elementWrapper = new Element() { ID = numElementsTotal, ElementType = element };
            foreach (Node node in elementNodes) elementWrapper.AddNode(node);
            model.ElementsDictionary.Add(numElementsTotal, elementWrapper);
            model.SubdomainsDictionary[0].Elements.Add(elementWrapper); 
        }
public void AddElement ( IFiniteElement element , IReadOnlyList < Node > elementNodes ) { int numElementsTotal = model . Elements . Count ; int numElementsSubdomain = model . Subdomains [ 0 ] . Elements . Count ; var elementWrapper = new Element ( ) { ID = numElementsTotal , ElementType = element } ; foreach ( Node node in elementNodes ) elementWrapper . AddNode ( node ) ; model . ElementsDictionary . Add ( numElementsTotal , elementWrapper ) ; model . SubdomainsDictionary [ 0 ] . Elements . Add ( elementWrapper ) ; }
Adds a new finite element to the model.
Adds a new finite element to the model .
//TODO: let the user decide which subdomain it will be added to.
element
IFiniteElement
The element type
The element type
elementNodes
IReadOnlyList<Node>
The element's nodes. Beware of their order.
The element ' s nodes . Beware of their order .