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.
kratos_internals.h
Go to the documentation of this file.
1 // _____ _____ _ __ __ _ _ _ _
2 // / ____|/ ____| | \ \ / / /\ | (_) | | (_)
3 // | | | (___ | |__ __ _ _ __ _ _\ \ /\ / / __ __ _ _ __ _ __ ___ _ __ / \ _ __ _ __ | |_ ___ __ _| |_ _ ___ _ __
4 // | | \___ \| '_ \ / _` | '__| '_ \ \/ \/ / '__/ _` | '_ \| '_ \ / _ \ '__/ /\ \ | '_ \| '_ \| | |/ __/ _` | __| |/ _ \| '_ |
5 // | |____ ____) | | | | (_| | | | |_) \ /\ /| | | (_| | |_) | |_) | __/ | / ____ \| |_) | |_) | | | (_| (_| | |_| | (_) | | | |
6 // \_____|_____/|_| |_|\__,_|_| | .__/ \/ \/ |_| \__,_| .__/| .__/ \___|_|/_/ \_\ .__/| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|
7 // | | | | | | | | | |
8 // |_| |_| |_| |_| |_|
9 //
10 //
11 // License: BSD License
12 // license: CSharpWrapperApplication/license.txt
13 //
14 // Main authors: Hubert Balcerzak
15 // Riccardo Rossi
16 //
17 
18 #if !defined(CSHARP_WRAPPER_APPLICATION_KRATOS_INTERNALS_H_INCLUDED )
19 #define CSHARP_WRAPPER_APPLICATION_KRATOS_INTERNALS_H_INCLUDED
20 
21 // System includes
22 
23 // External includes
24 
25 // Project includes
26 #include "includes/kernel.h"
27 #include "containers/model.h"
30 #include "includes/model_part_io.h"
31 #include "spaces/ublas_space.h"
39 
40 namespace CSharpKratosWrapper {
41 
42 
43  typedef boost::numeric::ublas::compressed_matrix<double> CompressedMatrix;
44  typedef boost::numeric::ublas::vector<double> Vector;
46  typedef boost::numeric::ublas::matrix<double> Matrix;
48 
52 
54 
56 
58 
61 
63 
64  public:
65  void initInternals();
66  void initModelPart();
67  void loadMDPA(const std::string& rMDPAFilePath);
68  void loadSettingsParameters(const std::string& rJSONFilePath);
69  void initDofs();
70  void initProperties();
71  void initSolver();
72  void solve();
76 
77  private:
78  Kratos::Kernel mKernel;
80  std::string mModelpartName;
81  Kratos::Model mModel;
82  Kratos::Parameters mSettingsParameters;
83  ResidualBasedNewtonRaphsonStrategyType::Pointer pmStrategy;
84 
85  Kratos::Parameters GetDefaultParameters();
86  };
87 }
88 
89 #endif /* CSHARP_WRAPPER_APPLICATION_KRATOS_INTERNALS_H_INCLUDED */
90 
Definition: kratos_internals.h:62
Kratos::Parameters GetSettings()
Definition: kratos_internals.cpp:198
Kratos::ModelPart & GetMainModelPart()
Definition: kratos_internals.cpp:194
void initProperties()
Definition: kratos_internals.cpp:130
void loadSettingsParameters(const std::string &rJSONFilePath)
Definition: kratos_internals.cpp:83
Kratos::ModelPart & GetSkinModelPart()
void initModelPart()
Definition: kratos_internals.cpp:38
void solve()
Definition: kratos_internals.cpp:189
void loadMDPA(const std::string &rMDPAFilePath)
Definition: kratos_internals.cpp:72
void initInternals()
Definition: kratos_internals.cpp:33
void initSolver()
Definition: kratos_internals.cpp:147
void initDofs()
Definition: kratos_internals.cpp:96
Kernel is in charge of synchronization the whole system of Kratos itself and its application.
Definition: kernel.h:53
This application features Elements, Conditions, Constitutive laws and Utilities for structural analys...
Definition: structural_mechanics_application.h:139
Here we add the functions needed for the registration of linear solvers.
Definition: linear_solver_factory.h:62
Base class for all the linear solvers in Kratos.
Definition: linear_solver.h:65
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
Current class provides an implementation for standard elimination builder and solving operations.
Definition: residualbased_elimination_builder_and_solver.h:76
This class provides the implementation of a static scheme.
Definition: residualbased_incrementalupdate_static_scheme.h:57
This is the base Newton Raphson strategy.
Definition: residualbased_newton_raphson_strategy.h:66
This is a convergence criteria that considers the residual as criteria.
Definition: residual_criteria.h:60
A class template for handling data types, matrices, and vectors in a Ublas space.
Definition: ublas_space.h:121
Definition: id_translator.h:28
Kratos::ResidualBasedEliminationBuilderAndSolver< SparseSpaceType, LocalSpaceType, LinearSolverType > ResidualBasedEliminationBuilderAndSolverType
Definition: kratos_internals.h:51
boost::numeric::ublas::compressed_matrix< double > CompressedMatrix
Definition: kratos_internals.h:43
Kratos::ResidualBasedIncrementalUpdateStaticScheme< SparseSpaceType, LocalSpaceType > ResidualBasedIncrementalUpdateStaticSchemeType
Definition: kratos_internals.h:53
Kratos::UblasSpace< double, CompressedMatrix, Vector > SpaceType
Definition: kratos_internals.h:45
Kratos::UblasSpace< double, CompressedMatrix, Vector > SparseSpaceType
Definition: kratos_internals.h:49
boost::numeric::ublas::matrix< double > Matrix
Definition: kratos_internals.h:46
Kratos::ResidualBasedNewtonRaphsonStrategy< SparseSpaceType, LocalSpaceType, LinearSolverType > ResidualBasedNewtonRaphsonStrategyType
Definition: kratos_internals.h:57
Kratos::LinearSolverFactory< SparseSpaceType, LocalSpaceType > LinearSolverFactoryType
The definition of the linear solver factory type.
Definition: kratos_internals.h:60
Kratos::ResidualCriteria< SparseSpaceType, LocalSpaceType > ResidualCriteriaType
Definition: kratos_internals.h:55
boost::numeric::ublas::vector< double > Vector
Definition: kratos_internals.h:44
Kratos::UblasSpace< double, Matrix, Vector > LocalSpaceType
Definition: kratos_internals.h:47
Kratos::LinearSolver< SparseSpaceType, LocalSpaceType > LinearSolverType
Definition: kratos_internals.h:50