Seismo-VLAB  1.3
An Open-Source Finite Element Software for Meso-Scale Simulations
Linear.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // Seismo Virtual Laboratory
4 // Module for Serial and Parallel Analysis of seismic
5 // wave propagation and soil-structure interaction simulation
6 // Copyright (C) 2018-2021, The California Institute of Technology
7 // All Rights Reserved.
8 //
9 // Commercial use of this program without express permission of the California
10 // Institute of Technology, is strictly prohibited. See file "COPYRIGHT" in
11 // main directory for information on usage and redistribution, and for a
12 // DISCLAIMER OF ALL WARRANTIES.
13 //
14 //==============================================================================
15 //
16 // Written by:
17 // Danilo S. Kusanovic (dkusanov@caltech.edu)
18 // Elnaz E. Seylabi (elnaze@unr.edu)
19 //
20 // Supervised by:
21 // Domniki M. Asimaki (domniki@caltech.edu)
22 //
23 // References :
24 // [1]
25 //
26 // Description:
30 //------------------------------------------------------------------------------
31 
32 #ifndef _LINEAR_HPP_
33 #define _LINEAR_HPP_
34 
35 #include <memory>
36 #include <Eigen/Dense>
37 #include <Eigen/SparseCore>
38 
39 #include "Mesh.hpp"
40 #include "LoadCombo.hpp"
41 #include "Algorithm.hpp"
42 #include "Integrator.hpp"
43 #include "LinearSystem.hpp"
44 
52 class Linear : public Algorithm{
53 
54  public:
63  Linear(std::unique_ptr<LinearSystem> &solver, std::shared_ptr<Mesh> &mesh, double tol=1E-6, double ldFactor=1.00, unsigned int nIters=1);
64 
66  ~Linear();
67 
73  bool ComputeNewIncrement(std::shared_ptr<Mesh> &mesh, unsigned int i=0);
74 
78  const Eigen::VectorXd& GetDisplacementIncrement();
79 
82  void SetLoadFactor(double factor);
83 
86  void SetIntegrator(std::shared_ptr<Integrator> &integrator);
87 
88  protected:
90  double Tolerance;
91 
93  double LoadFactor;
94 
96  unsigned int nMaxIterations;
97 
99  Eigen::VectorXd dU;
100 
102  std::unique_ptr<LinearSystem> theSolver;
103 
105  std::shared_ptr<Integrator> theIntegrator;
106 };
107 
108 #endif
const Eigen::VectorXd & GetDisplacementIncrement()
Gets the displacement increment.
This file contains the abstract "LinearSystem object" declarations, which defines the library to solv...
Virtual class for defining how the solution between two steps is going to be carried out...
Definition: Algorithm.hpp:52
double LoadFactor
Incremental load factor.
Definition: Linear.hpp:93
~Linear()
Destroys this Linear object.
std::shared_ptr< Integrator > theIntegrator
The time-domain integrator.
Definition: Linear.hpp:105
Class for solving a linear system in just one-step; therefore, no-iteration or convergence test is pe...
Definition: Linear.hpp:52
This file contains the "Load Combination" class declarations, which defines how the loads are going t...
void SetLoadFactor(double factor)
Set the load factor.
unsigned int nMaxIterations
Maximum allowed number of iterations.
Definition: Linear.hpp:96
std::unique_ptr< LinearSystem > theSolver
The linear system solver.
Definition: Linear.hpp:102
This file contains the "Integrator object" declarations, and defines how the dynamic solution between...
bool ComputeNewIncrement(std::shared_ptr< Mesh > &mesh, unsigned int i=0)
Computes a new incremental solution.
void SetIntegrator(std::shared_ptr< Integrator > &integrator)
Sets the integrator for this algorithm.
This file contains the "Mesh object" declarations, which stores nodes, materials, elements...
Eigen::VectorXd dU
Incremental displacement.
Definition: Linear.hpp:99
double Tolerance
Convergence tolerance.
Definition: Linear.hpp:90
Linear(std::unique_ptr< LinearSystem > &solver, std::shared_ptr< Mesh > &mesh, double tol=1E-6, double ldFactor=1.00, unsigned int nIters=1)
Creates a Linear object.