This section briefly describes how to get up and running using ALFE. See Installation for more detailed information such as system requirements and different ways of installing and using ALFE.
staticvoidMain(string[] args){ // Create a cantilever model with 200 * 200 pixel elementsModel model2d =newCantilever2D(ElementType.PixelElement,200,200).Model; // Create a finite element systemFESystem sys0 =newFESystem(model2d,Solver.SimplicialLLT); // Initialize the systemsys0.Initialize(); // Solvesys0.Solve(); // Print model informationConsole.Write(sys0.Model.ModelInfo()); // Print matrix inforamtinConsole.Write(sys0.MatrixInfo()); // Print solving informationConsole.Write(sys0.SolvingInfo()); // Print displacementConsole.Write(sys0.DisplacementInfo());Console.ReadKey();}
Output:
------------------- Model Info -------------------
Nodes: 40000
Degree-of-freedom: 80000
Elements: 39601
Type: PixelElement
------------------- Matrix Info -------------------
Rows: 79600
Cols: 79600
NNZ: 1423240
------------------- Time Cost -------------------
Solver: SimplicialLLT
Computing Ke: 22.875 ms
Initializing KG: 220.9646 ms
Assembling KG: 45.5011 ms
Solving: 2311.3483 ms