KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
residual_based_newmark_displacement_scheme.hpp
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ \.
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Main authors: Josep Maria Carbonell
9 // Vicente Mataix Ferrandiz
10 //
11 
12 #if !defined(KRATOS_RESIDUAL_BASED_NEWMARK_DISPLACEMENT_SCHEME )
13 #define KRATOS_RESIDUAL_BASED_NEWMARK_DISPLACEMENT_SCHEME
14 
15 /* System includes */
16 
17 /* External includes */
18 
19 /* Project includes */
21 
22 namespace Kratos
23 {
38 
47 template<class TSparseSpace, class TDenseSpace >
49  : public ResidualBasedBossakDisplacementScheme<TSparseSpace,TDenseSpace>
50 {
51 public:
55 
57 
59 
60  typedef typename BaseType::TDataType TDataType;
61 
63 
65 
67 
69 
71 
73 
75 
77 
78  typedef typename BaseType::Pointer BaseTypePointer;
79 
81 
85 
92  {
93  // Validate and assign defaults
94  ThisParameters = this->ValidateAndAssignParameters(ThisParameters, this->GetDefaultParameters());
95  this->AssignSettings(ThisParameters);
96  }
97 
102  :DerivedBaseType(0.0)
103  {
104  }
105 
109  :DerivedBaseType(rOther)
110  {
111  }
112 
117  {
119  }
120 
124  () override {}
125 
131  {
132  Parameters default_parameters = Parameters(R"(
133  {
134  "name" : "newmark_scheme"
135  })");
136 
137  // Getting base class default parameters
138  const Parameters base_default_parameters = DerivedBaseType::GetDefaultParameters();
139  default_parameters.RecursivelyAddMissingParameters(base_default_parameters);
140  return default_parameters;
141  }
142 
147  static std::string Name()
148  {
149  return "newmark_scheme";
150  }
151 
155 
159 
164  typename BaseType::Pointer Create(Parameters ThisParameters) const override
165  {
166  return Kratos::make_shared<ClassType>(ThisParameters);
167  }
168 
172 
176 
180 
182  std::string Info() const override
183  {
184  return "ResidualBasedNewmarkDisplacementScheme";
185  }
186 
188  void PrintInfo(std::ostream& rOStream) const override
189  {
190  rOStream << Info();
191  }
192 
194  void PrintData(std::ostream& rOStream) const override
195  {
196  rOStream << Info();
197  }
198 
202 
203 protected:
207 
211 
215 
220 
224 
228 
233 private:
239 
243 
247 
252 
256 
263 }; /* Class ResidualBasedNewmarkDisplacementScheme */
264 } /* namespace Kratos.*/
265 
266 #endif /* KRATOS_RESIDUAL_BASED_NEWMARK_DISPLACEMENT_SCHEME E defined */
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
void RecursivelyAddMissingParameters(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing contain at least all parameters...
Definition: kratos_parameters.cpp:1457
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
Bossak integration scheme (for linear and nonlinear dynamic problems) for displacements.
Definition: residual_based_bossak_displacement_scheme.hpp:43
Parameters GetDefaultParameters() const override
This function returns the default Parameters to help avoiding conflicts between different constructor...
Definition: residual_based_bossak_displacement_scheme.hpp:443
void AssignSettings(const Parameters ThisParameters) override
Assign member variables from Parameters.
Definition: residual_based_bossak_displacement_scheme.hpp:676
typename BaseType::Pointer BaseTypePointer
Pointer type for the BaseType.
Definition: residual_based_bossak_displacement_scheme.hpp:93
Bossak integration scheme (for dynamic problems) for displacements.
Definition: residual_based_newmark_displacement_scheme.hpp:50
BaseType::TSystemVectorType TSystemVectorType
Definition: residual_based_newmark_displacement_scheme.hpp:68
~ResidualBasedNewmarkDisplacementScheme() override
Definition: residual_based_newmark_displacement_scheme.hpp:124
ResidualBasedNewmarkDisplacementScheme()
Default constructor. The Newmark method.
Definition: residual_based_newmark_displacement_scheme.hpp:101
Element::DofsVectorType DofsVectorType
Definition: residual_based_newmark_displacement_scheme.hpp:64
BaseType::TDataType TDataType
Definition: residual_based_newmark_displacement_scheme.hpp:60
BaseType::Pointer BaseTypePointer
Definition: residual_based_newmark_displacement_scheme.hpp:78
static std::string Name()
Returns the name of the class as used in the settings (snake_case format)
Definition: residual_based_newmark_displacement_scheme.hpp:147
KRATOS_CLASS_POINTER_DEFINITION(ResidualBasedNewmarkDisplacementScheme)
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: residual_based_newmark_displacement_scheme.hpp:188
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: residual_based_newmark_displacement_scheme.hpp:130
ResidualBasedBossakDisplacementScheme< TSparseSpace, TDenseSpace > DerivedBaseType
Definition: residual_based_newmark_displacement_scheme.hpp:80
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: residual_based_newmark_displacement_scheme.hpp:70
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: residual_based_newmark_displacement_scheme.hpp:194
ResidualBasedNewmarkDisplacementScheme(Parameters ThisParameters)
Constructor. The Newmark method (parameters)
Definition: residual_based_newmark_displacement_scheme.hpp:90
ModelPart::ElementsContainerType ElementsArrayType
Definition: residual_based_newmark_displacement_scheme.hpp:74
BaseType::TSystemMatrixType TSystemMatrixType
Definition: residual_based_newmark_displacement_scheme.hpp:66
BaseTypePointer Clone() override
Definition: residual_based_newmark_displacement_scheme.hpp:116
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: residual_based_newmark_displacement_scheme.hpp:72
BaseType::DofsArrayType DofsArrayType
Definition: residual_based_newmark_displacement_scheme.hpp:62
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: residual_based_newmark_displacement_scheme.hpp:76
Scheme< TSparseSpace, TDenseSpace > BaseType
Definition: residual_based_newmark_displacement_scheme.hpp:56
ResidualBasedNewmarkDisplacementScheme< TSparseSpace, TDenseSpace > ClassType
Definition: residual_based_newmark_displacement_scheme.hpp:58
BaseType::Pointer Create(Parameters ThisParameters) const override
Create method.
Definition: residual_based_newmark_displacement_scheme.hpp:164
ResidualBasedNewmarkDisplacementScheme(ResidualBasedNewmarkDisplacementScheme &rOther)
Definition: residual_based_newmark_displacement_scheme.hpp:108
std::string Info() const override
Turn back information as a string.
Definition: residual_based_newmark_displacement_scheme.hpp:182
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
typename TSparseSpace::MatrixType TSystemMatrixType
Matrix type definition.
Definition: scheme.h:71
typename TSparseSpace::VectorType TSystemVectorType
Vector type definition.
Definition: scheme.h:74
typename TDenseSpace::VectorType LocalSystemVectorType
Local system vector type definition.
Definition: scheme.h:80
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: scheme.h:773
typename TSparseSpace::DataType TDataType
Data type definition.
Definition: scheme.h:68
typename TDenseSpace::MatrixType LocalSystemMatrixType
Local system matrix type definition.
Definition: scheme.h:77
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21