Seismo-VLAB  1.3
An Open-Source Finite Element Software for Meso-Scale Simulations
Load.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 // Information:
27 // The load formulation are given as,
28 // [1] Static point-load.
29 // [2] Dynamic point-load.
30 // [3] Static body point-load.
31 // [4] Dynamic body point-load.
32 // [5] Static surface-load.
33 // [6] Dynamic surface-load.
34 // [7] Static body-load.
35 // [8] Dynamic body-load.
36 // [9] Dynamic user's define wave load.
37 // [10] Static/Dynamic displacement support motion.
38 //
39 // Description:
42 //------------------------------------------------------------------------------
43 
44 #ifndef _LOAD_HPP_
45 #define _LOAD_HPP_
46 
47 #include <map>
48 #include <vector>
49 #include <Eigen/Dense>
50 
58 class Load{
59 
60  public:
65  Load(unsigned int type);
66 
73  Load(Eigen::VectorXd dir, std::vector<double> val, unsigned int type);
74 
76  ~Load();
77 
81  void AddNodes(std::vector<unsigned int> tags);
82 
86  void AddFaces(std::vector<unsigned int> tags);
87 
91  void AddElements(std::vector<unsigned int> tags);
92 
97  void AddDRMCondition(unsigned int tag, bool cond);
98 
103  unsigned int GetClassification() const;
104 
108  std::vector<unsigned int> GetNodes() const;
109 
113  std::vector<unsigned int> GetFaces() const;
114 
118  std::vector<unsigned int> GetElements() const;
119 
124  Eigen::VectorXd GetLoadVector(unsigned int step=0) const;
125 
131  bool GetDRMCondition(unsigned int tag);
132 
133  private:
135  unsigned int Classification;
136 
138  Eigen::VectorXd ForceDirection;
139 
141  std::vector<unsigned int> Tags;
142 
144  std::vector<unsigned int> Faces;
145 
147  std::vector<double> ForceAmplitude;
148 
150  std::map<unsigned int, bool> DRMConditions;
151 };
152 
153 #endif
void AddFaces(std::vector< unsigned int > tags)
Adds face that share this loaded.
Eigen::VectorXd ForceDirection
Direction of applied force.
Definition: Load.hpp:138
Eigen::VectorXd GetLoadVector(unsigned int step=0) const
Returns the force vector to be applied.
unsigned int Classification
Load classification.
Definition: Load.hpp:135
bool GetDRMCondition(unsigned int tag)
Returns the exterior/interior condition for the domain reduction node.
std::vector< unsigned int > Tags
Index of nodes/element which share this load.
Definition: Load.hpp:141
void AddNodes(std::vector< unsigned int > tags)
Adds node that share this loaded.
std::vector< double > ForceAmplitude
Time varing coefficients:
Definition: Load.hpp:147
std::vector< unsigned int > Faces
Index of element faces which share this load.
Definition: Load.hpp:144
Load(unsigned int type)
Creates a Load in a finite element Mesh.
void AddDRMCondition(unsigned int tag, bool cond)
Adds the exterior/interior condition for the domain reduction node.
std::vector< unsigned int > GetNodes() const
Returns the nodes index that share this load.
Class for creating a load that can be applied to a node or to a element.
Definition: Load.hpp:58
unsigned int GetClassification() const
Returns the load classification.
void AddElements(std::vector< unsigned int > tags)
Adds element that share this loaded.
std::map< unsigned int, bool > DRMConditions
Exterior/Interior condition for the domain reduction node.
Definition: Load.hpp:150
~Load()
Destroys this Load object.
std::vector< unsigned int > GetElements() const
Returns the nodes index that share this load.
std::vector< unsigned int > GetFaces() const
Returns the faces index that share this load.