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.
scheme_factory.hpp
Go to the documentation of this file.
1 // KRATOS___
2 // // ) )
3 // // ___ ___
4 // // ____ //___) ) // ) )
5 // // / / // // / /
6 // ((____/ / ((____ ((___/ / MECHANICS
7 //
8 // License: geo_mechanics_application/license.txt
9 //
10 // Main authors: Richard Faasse
11 //
12 
13 #pragma once
14 
17 #include <memory>
18 
19 namespace Kratos
20 {
21 
22 template<class TSparseSpace, class TDenseSpace>
24 {
25 public:
27 
28  static std::shared_ptr<SchemeType> Create(const Parameters& rSolverSettings)
29  {
30  KRATOS_ERROR_IF_NOT(rSolverSettings.Has("scheme_type")) << "scheme_type is not defined, aborting";
31  KRATOS_ERROR_IF_NOT(rSolverSettings.Has("solution_type")) << "solution_type is not defined, aborting";
32 
33  if (rSolverSettings["scheme_type"].GetString() == "Backward_Euler" &&
34  rSolverSettings["solution_type"].GetString() == "Quasi-Static")
35  {
36  return std::make_shared<BackwardEulerQuasistaticUPwScheme<TSparseSpace, TDenseSpace>>();
37  }
38 
39  KRATOS_ERROR << "Specified solution_type/scheme_type is not supported, aborting";
40  }
41 };
42 
43 }
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
bool Has(const std::string &rEntry) const
This method checks if the Parameter contains a certain entry.
Definition: kratos_parameters.cpp:520
Definition: scheme_factory.hpp:24
static std::shared_ptr< SchemeType > Create(const Parameters &rSolverSettings)
Definition: scheme_factory.hpp:28
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF_NOT(conditional)
Definition: exception.h:163
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21