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.
Namespaces | Macros | Functions
add_custom_temporal_methods_to_python.cpp File Reference
#include <pybind11/pybind11.h>
#include "custom_methods/temporal_methods.h"
#include "custom_python/add_custom_temporal_methods_to_python.h"
Include dependency graph for add_custom_temporal_methods_to_python.cpp:

Namespaces

 Kratos
 REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
 
 Kratos::Python
 

Macros

#define KRATOS_STATISTICS_ONE_OUTPUT_VALUE_TYPE(type)   const Variable<type>&
 
#define KRATOS_STATISTICS_TWO_OUTPUT_VALUE_TYPE(type)    const Variable<type>&, const Variable<type>&
 
#define KRATOS_STATISTICS_ONE_OUTPUT_NORM_TYPE(type)   const Variable<double>&
 
#define KRATOS_STATISTICS_TWO_OUTPUT_NORM_TYPE(type)    const Variable<double>&, const Variable<double>&
 
#define KRATOS_STATISTICS_DEFAULT_INPUTS(type)    ModelPart&, const std::string&, const Variable<type>&, const int
 
#define ADD_KRATOS_STATISTICS_TEMPORAL_CONTAINER_VALUE_METHOD_PYTHON_INTERFACE( method, method_name, value_method_module, container, output_type)
 
#define ADD_KRATOS_STATISTICS_TEMPORAL_CONTAINER_NORM_METHOD_PYTHON_INTERFACE( method, method_name, norm_method_module, container, output_type)
 
#define ADD_KRATOS_STATISTICS_TEMPORAL_CREATE_METHOD_PYTHON_INTERFACE( method, method_name, python_application_module)
 
#define ADD_KRATOS_STATISTICS_TEMPORAL_VALUE_METHOD_PYTHON_INTERFACE( method, method_name, python_application_module, output_type)
 
#define ADD_KRATOS_STATISTICS_TEMPORAL_NORM_METHOD_PYTHON_INTERFACE( method, method_name, python_application_module, output_type)
 

Functions

void Kratos::Python::AddCustomTemporalMethodsToPython (pybind11::module &m)
 

Macro Definition Documentation

◆ ADD_KRATOS_STATISTICS_TEMPORAL_CONTAINER_NORM_METHOD_PYTHON_INTERFACE

#define ADD_KRATOS_STATISTICS_TEMPORAL_CONTAINER_NORM_METHOD_PYTHON_INTERFACE (   method,
  method_name,
  norm_method_module,
  container,
  output_type 
)
Value:
{ \
using type_double = double; \
using type_array = array_1d<double, 3>; \
using type_vector = Vector; \
using type_matrix = Matrix; \
auto method_module = norm_method_module.def_submodule(method_name); \
using current_method = TemporalMethods::container::method; \
py::class_<current_method::NormMethod<type_double>, \
current_method::NormMethod<type_double>::Pointer, TemporalMethods::TemporalMethod>( \
method_module, "Double") \
.def(py::init<KRATOS_STATISTICS_DEFAULT_INPUTS(type_double), output_type(type_double)>()); \
py::class_<current_method::NormMethod<type_array>, current_method::NormMethod<type_array>::Pointer, \
TemporalMethods::TemporalMethod>(method_module, "Array") \
.def(py::init<KRATOS_STATISTICS_DEFAULT_INPUTS(type_array), output_type(type_array)>()); \
py::class_<current_method::NormMethod<type_vector>, \
current_method::NormMethod<type_vector>::Pointer, TemporalMethods::TemporalMethod>( \
method_module, "Vector") \
.def(py::init<KRATOS_STATISTICS_DEFAULT_INPUTS(type_vector), output_type(type_vector)>()); \
py::class_<current_method::NormMethod<type_matrix>, \
current_method::NormMethod<type_matrix>::Pointer, TemporalMethods::TemporalMethod>( \
method_module, "Matrix") \
.def(py::init<KRATOS_STATISTICS_DEFAULT_INPUTS(type_matrix), output_type(type_matrix)>()); \
}
#define KRATOS_STATISTICS_DEFAULT_INPUTS(type)
Definition: add_custom_temporal_methods_to_python.cpp:46
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182

◆ ADD_KRATOS_STATISTICS_TEMPORAL_CONTAINER_VALUE_METHOD_PYTHON_INTERFACE

#define ADD_KRATOS_STATISTICS_TEMPORAL_CONTAINER_VALUE_METHOD_PYTHON_INTERFACE (   method,
  method_name,
  value_method_module,
  container,
  output_type 
)
Value:
{ \
using type_double = double; \
using type_array = array_1d<double, 3>; \
using type_vector = Vector; \
using type_matrix = Matrix; \
auto method_module = value_method_module.def_submodule(method_name); \
using current_method = TemporalMethods::container::method; \
py::class_<current_method::ValueMethod<type_double>, \
current_method::ValueMethod<type_double>::Pointer, TemporalMethods::TemporalMethod>( \
method_module, "Double") \
.def(py::init<KRATOS_STATISTICS_DEFAULT_INPUTS(type_double), output_type(type_double)>()); \
py::class_<current_method::ValueMethod<type_array>, \
current_method::ValueMethod<type_array>::Pointer, TemporalMethods::TemporalMethod>( \
method_module, "Array") \
.def(py::init<KRATOS_STATISTICS_DEFAULT_INPUTS(type_array), output_type(type_array)>()); \
py::class_<current_method::ValueMethod<type_vector>, \
current_method::ValueMethod<type_vector>::Pointer, TemporalMethods::TemporalMethod>( \
method_module, "Vector") \
.def(py::init<KRATOS_STATISTICS_DEFAULT_INPUTS(type_vector), output_type(type_vector)>()); \
py::class_<current_method::ValueMethod<type_matrix>, \
current_method::ValueMethod<type_matrix>::Pointer, TemporalMethods::TemporalMethod>( \
method_module, "Matrix") \
.def(py::init<KRATOS_STATISTICS_DEFAULT_INPUTS(type_matrix), output_type(type_matrix)>()); \
}

◆ ADD_KRATOS_STATISTICS_TEMPORAL_CREATE_METHOD_PYTHON_INTERFACE

#define ADD_KRATOS_STATISTICS_TEMPORAL_CREATE_METHOD_PYTHON_INTERFACE (   method,
  method_name,
  python_application_module 
)

◆ ADD_KRATOS_STATISTICS_TEMPORAL_NORM_METHOD_PYTHON_INTERFACE

#define ADD_KRATOS_STATISTICS_TEMPORAL_NORM_METHOD_PYTHON_INTERFACE (   method,
  method_name,
  python_application_module,
  output_type 
)

◆ ADD_KRATOS_STATISTICS_TEMPORAL_VALUE_METHOD_PYTHON_INTERFACE

#define ADD_KRATOS_STATISTICS_TEMPORAL_VALUE_METHOD_PYTHON_INTERFACE (   method,
  method_name,
  python_application_module,
  output_type 
)

◆ KRATOS_STATISTICS_DEFAULT_INPUTS

#define KRATOS_STATISTICS_DEFAULT_INPUTS (   type)     ModelPart&, const std::string&, const Variable<type>&, const int

◆ KRATOS_STATISTICS_ONE_OUTPUT_NORM_TYPE

#define KRATOS_STATISTICS_ONE_OUTPUT_NORM_TYPE (   type)    const Variable<double>&

◆ KRATOS_STATISTICS_ONE_OUTPUT_VALUE_TYPE

#define KRATOS_STATISTICS_ONE_OUTPUT_VALUE_TYPE (   type)    const Variable<type>&

◆ KRATOS_STATISTICS_TWO_OUTPUT_NORM_TYPE

#define KRATOS_STATISTICS_TWO_OUTPUT_NORM_TYPE (   type)     const Variable<double>&, const Variable<double>&

◆ KRATOS_STATISTICS_TWO_OUTPUT_VALUE_TYPE

#define KRATOS_STATISTICS_TWO_OUTPUT_VALUE_TYPE (   type)     const Variable<type>&, const Variable<type>&