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 | Functions
add_model_part_to_python.cpp File Reference
#include <pybind11/stl.h>
#include "includes/define_python.h"
#include "containers/model.h"
#include "includes/model_part.h"
#include "includes/kratos_components.h"
#include "includes/process_info.h"
#include "utilities/quaternion.h"
#include "python/add_model_part_to_python.h"
#include "python/containers_interface.h"
Include dependency graph for add_model_part_to_python.cpp:

Namespaces

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

Functions

template<class TDataType >
void Kratos::Python::AddNodalSolutionStepVariable (ModelPart &rModelPart, Variable< TDataType > const &rThisVariable)
 
template<class TDataType >
bool Kratos::Python::HasNodalSolutionStepVariable (ModelPart &rModelPart, Variable< TDataType > const &rThisVariable)
 
void Kratos::Python::SetModelPartName (ModelPart &rModelPart, std::string const &NewName)
 
const std::string Kratos::Python::GetModelPartName (ModelPart const &rModelPart)
 
ProcessInfo & Kratos::Python::GetProcessInfo (ModelPart &rModelPart)
 
void Kratos::Python::SetProcessInfo (ModelPart &rModelPart, ProcessInfo &NewProcessInfo)
 
ModelPart::MeshType::Pointer Kratos::Python::ModelPartGetMesh (ModelPart &rModelPart)
 
ModelPart::MeshType::Pointer Kratos::Python::ModelPartGetMesh2 (ModelPart &rModelPart, ModelPart::IndexType MeshIndex)
 
Node ::Pointer Kratos::Python::ModelPartCreateNewNode (ModelPart &rModelPart, int Id, double x, double y, double z)
 
Geometry< Node >::Pointer Kratos::Python::ModelPartCreateNewGeometry1 (ModelPart &rModelPart, const std::string &GeometryTypeName, std::vector< ModelPart::IndexType > &NodeIdList)
 
Geometry< Node >::Pointer Kratos::Python::ModelPartCreateNewGeometry2 (ModelPart &rModelPart, const std::string &GeometryTypeName, ModelPart::IndexType GeometryId, std::vector< ModelPart::IndexType > &NodeIdList)
 
Geometry< Node >::Pointer Kratos::Python::ModelPartCreateNewGeometry3 (ModelPart &rModelPart, const std::string &GeometryTypeName, const std::string &GeometryIdentifierName, std::vector< ModelPart::IndexType > &NodeIdList)
 
Geometry< Node >::Pointer Kratos::Python::ModelPartCreateNewGeometry4 (ModelPart &rModelPart, const std::string &GeometryTypeName, ModelPart::GeometryType::Pointer pGeometry)
 
Geometry< Node >::Pointer Kratos::Python::ModelPartCreateNewGeometry5 (ModelPart &rModelPart, const std::string &GeometryTypeName, ModelPart::IndexType GeometryId, ModelPart::GeometryType::Pointer pGeometry)
 
Geometry< Node >::Pointer Kratos::Python::ModelPartCreateNewGeometry6 (ModelPart &rModelPart, const std::string &GeometryTypeName, const std::string &GeometryIdentifierName, ModelPart::GeometryType::Pointer pGeometry)
 
Element::Pointer Kratos::Python::ModelPartCreateNewElement (ModelPart &rModelPart, const std::string ElementName, ModelPart::IndexType Id, std::vector< ModelPart::IndexType > &NodeIdList, ModelPart::PropertiesType::Pointer pProperties)
 
Condition::Pointer Kratos::Python::ModelPartCreateNewCondition (ModelPart &rModelPart, const std::string ConditionName, ModelPart::IndexType Id, std::vector< ModelPart::IndexType > &NodeIdList, ModelPart::PropertiesType::Pointer pProperties)
 
ModelPart::SizeType Kratos::Python::ModelPartNumberOfNodes1 (ModelPart &rModelPart)
 
ModelPart::NodesContainerType::Pointer Kratos::Python::ModelPartGetNodes1 (ModelPart &rModelPart)
 
ModelPart::NodesContainerType::Pointer Kratos::Python::ModelPartGetNodes2 (ModelPart &rModelPart, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartSetNodes1 (ModelPart &rModelPart, ModelPart::NodesContainerType::Pointer pOtherNodes)
 
void Kratos::Python::ModelPartSetNodes2 (ModelPart &rModelPart, ModelPart::NodesContainerType::Pointer pOtherNodes, ModelPart::IndexType ThisIndex)
 
bool Kratos::Python::ModelPartHasNode1 (ModelPart &rModelPart, ModelPart::IndexType NodeId)
 
bool Kratos::Python::ModelPartHasNode2 (ModelPart &rModelPart, ModelPart::IndexType NodeId, ModelPart::IndexType ThisIndex)
 
ModelPart::NodeType::Pointer Kratos::Python::ModelPartGetNode1 (ModelPart &rModelPart, ModelPart::IndexType NodeId)
 
ModelPart::NodeType::Pointer Kratos::Python::ModelPartGetNode2 (ModelPart &rModelPart, ModelPart::IndexType NodeId, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveNode1 (ModelPart &rModelPart, ModelPart::IndexType NodeId)
 
void Kratos::Python::ModelPartRemoveNode2 (ModelPart &rModelPart, ModelPart::IndexType NodeId, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveNode3 (ModelPart &rModelPart, ModelPart::NodeType::Pointer pThisNode)
 
void Kratos::Python::ModelPartRemoveNode4 (ModelPart &rModelPart, ModelPart::NodeType::Pointer pThisNode, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveNodeFromAllLevels1 (ModelPart &rModelPart, ModelPart::IndexType NodeId)
 
void Kratos::Python::ModelPartRemoveNodeFromAllLevels2 (ModelPart &rModelPart, ModelPart::IndexType NodeId, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveNodeFromAllLevels3 (ModelPart &rModelPart, ModelPart::NodeType::Pointer pThisNode)
 
void Kratos::Python::ModelPartRemoveNodeFromAllLevels4 (ModelPart &rModelPart, ModelPart::NodeType::Pointer pThisNode, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveNodesFromAllLevels (ModelPart &rModelPart, Flags identifier_flag)
 
ModelPart::PropertiesContainerType::Pointer Kratos::Python::ModelPartGetPropertiesContainer (ModelPart &rModelPart)
 
void Kratos::Python::ModelPartSetPropertiesContainer (ModelPart &rModelPart, ModelPart::PropertiesContainerType::Pointer pOtherProperties)
 
ModelPart::SizeType Kratos::Python::ModelPartNumberOfElements1 (ModelPart &rModelPart)
 
ModelPart::ElementsContainerType::Pointer Kratos::Python::ModelPartGetElements1 (ModelPart &rModelPart)
 
ModelPart::ElementsContainerType::Pointer Kratos::Python::ModelPartGetElements2 (ModelPart &rModelPart, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartSetElements1 (ModelPart &rModelPart, ModelPart::ElementsContainerType::Pointer pOtherElements)
 
void Kratos::Python::ModelPartSetElements2 (ModelPart &rModelPart, ModelPart::ElementsContainerType::Pointer pOtherElements, ModelPart::IndexType ThisIndex)
 
bool Kratos::Python::ModelPartHasElement1 (ModelPart &rModelPart, ModelPart::IndexType ElementId)
 
bool Kratos::Python::ModelPartHasElement2 (ModelPart &rModelPart, ModelPart::IndexType ElementId, ModelPart::IndexType ThisIndex)
 
ModelPart::ElementType::Pointer Kratos::Python::ModelPartGetElement1 (ModelPart &rModelPart, ModelPart::IndexType ElementId)
 
ModelPart::ElementType::Pointer Kratos::Python::ModelPartGetElement2 (ModelPart &rModelPart, ModelPart::IndexType ElementId, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveElement1 (ModelPart &rModelPart, ModelPart::IndexType ElementId)
 
void Kratos::Python::ModelPartRemoveElement2 (ModelPart &rModelPart, ModelPart::IndexType ElementId, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveElement3 (ModelPart &rModelPart, ModelPart::ElementType::Pointer pThisElement)
 
void Kratos::Python::ModelPartRemoveElement4 (ModelPart &rModelPart, ModelPart::ElementType::Pointer pThisElement, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveElementFromAllLevels1 (ModelPart &rModelPart, ModelPart::IndexType ElementId)
 
void Kratos::Python::ModelPartRemoveElementFromAllLevels2 (ModelPart &rModelPart, ModelPart::IndexType ElementId, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveElementFromAllLevels3 (ModelPart &rModelPart, ModelPart::ElementType::Pointer pThisElement)
 
void Kratos::Python::ModelPartRemoveElementFromAllLevels4 (ModelPart &rModelPart, ModelPart::ElementType::Pointer pThisElement, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveElementsFromAllLevels (ModelPart &rModelPart, Flags identifier_flag)
 
ModelPart::SizeType Kratos::Python::ModelPartNumberOfConditions1 (ModelPart &rModelPart)
 
ModelPart::ConditionsContainerType::Pointer Kratos::Python::ModelPartGetConditions1 (ModelPart &rModelPart)
 
ModelPart::ConditionsContainerType::Pointer Kratos::Python::ModelPartGetConditions2 (ModelPart &rModelPart, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartSetConditions1 (ModelPart &rModelPart, ModelPart::ConditionsContainerType::Pointer pOtherConditions)
 
void Kratos::Python::ModelPartSetConditions2 (ModelPart &rModelPart, ModelPart::ConditionsContainerType::Pointer pOtherConditions, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartAddCondition1 (ModelPart &rModelPart, Condition::Pointer newCondition)
 
void Kratos::Python::ModelPartAddCondition2 (ModelPart &rModelPart, Condition::Pointer newCondition, unsigned int ThisIndex)
 
bool Kratos::Python::ModelPartHasCondition1 (ModelPart &rModelPart, ModelPart::IndexType ConditionId)
 
bool Kratos::Python::ModelPartHasCondition2 (ModelPart &rModelPart, ModelPart::IndexType ConditionId, ModelPart::IndexType ThisIndex)
 
ModelPart::ConditionType::Pointer Kratos::Python::ModelPartGetCondition1 (ModelPart &rModelPart, ModelPart::IndexType ConditionId)
 
ModelPart::ConditionType::Pointer Kratos::Python::ModelPartGetCondition2 (ModelPart &rModelPart, ModelPart::IndexType ConditionId, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveCondition1 (ModelPart &rModelPart, ModelPart::IndexType ConditionId)
 
void Kratos::Python::ModelPartRemoveCondition2 (ModelPart &rModelPart, ModelPart::IndexType ConditionId, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveCondition3 (ModelPart &rModelPart, ModelPart::ConditionType::Pointer pThisCondition)
 
void Kratos::Python::ModelPartRemoveCondition4 (ModelPart &rModelPart, ModelPart::ConditionType::Pointer pThisCondition, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveConditionFromAllLevels1 (ModelPart &rModelPart, ModelPart::IndexType ConditionId)
 
void Kratos::Python::ModelPartRemoveConditionFromAllLevels2 (ModelPart &rModelPart, ModelPart::IndexType ConditionId, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveConditionFromAllLevels3 (ModelPart &rModelPart, ModelPart::ConditionType::Pointer pThisCondition)
 
void Kratos::Python::ModelPartRemoveConditionFromAllLevels4 (ModelPart &rModelPart, ModelPart::ConditionType::Pointer pThisCondition, ModelPart::IndexType ThisIndex)
 
void Kratos::Python::ModelPartRemoveConditionsFromAllLevels (ModelPart &rModelPart, Flags identifier_flag)
 
void Kratos::Python::ModelPartAddGeometry1 (ModelPart &rModelPart, ModelPart::GeometryType::Pointer pNewGeometry)
 
ModelPart::GeometryType::Pointer Kratos::Python::ModelPartGetGeometry1 (ModelPart &rModelPart, ModelPart::IndexType GeometryId)
 
ModelPart::GeometryType::Pointer Kratos::Python::ModelPartGetGeometry2 (ModelPart &rModelPart, const std::string &GeometryName)
 
bool Kratos::Python::ModelPartHasGeometry1 (ModelPart &rModelPart, ModelPart::IndexType GeometryId)
 
bool Kratos::Python::ModelPartHasGeometry2 (ModelPart &rModelPart, const std::string &GeometryName)
 
void Kratos::Python::ModelPartRemoveGeometry1 (ModelPart &rModelPart, ModelPart::IndexType GeometryId)
 
void Kratos::Python::ModelPartRemoveGeometry2 (ModelPart &rModelPart, const std::string &GeometryName)
 
void Kratos::Python::ModelPartRemoveGeometryFromAllLevels1 (ModelPart &rModelPart, ModelPart::IndexType GeometryId)
 
void Kratos::Python::ModelPartRemoveGeometryFromAllLevels2 (ModelPart &rModelPart, const std::string &GeometryName)
 
ModelPart::MasterSlaveConstraintType::Pointer Kratos::Python::CreateNewMasterSlaveConstraint1 (ModelPart &rModelPart, std::string ConstraintName, ModelPart::IndexType Id, ModelPart::DofsVectorType &rMasterDofsVector, ModelPart::DofsVectorType &rSlaveDofsVector, ModelPart::MatrixType RelationMatrix, ModelPart::VectorType ConstantVector)
 
ModelPart::MasterSlaveConstraintType::Pointer Kratos::Python::CreateNewMasterSlaveConstraint2 (ModelPart &rModelPart, std::string ConstraintName, ModelPart::IndexType Id, ModelPart::NodeType &rMasterNode, ModelPart::DoubleVariableType &rMasterVariable, ModelPart::NodeType &rSlaveNode, ModelPart::DoubleVariableType &rSlaveVariable, double Weight, double Constant)
 
void Kratos::Python::ModelPartAddMasterSlaveConstraint (ModelPart &rModelPart, ModelPart::MasterSlaveConstraintType::Pointer pMasterSlaveConstraint)
 
void Kratos::Python::AddMasterSlaveConstraintsByIds (ModelPart &rModelPart, std::vector< ModelPart::IndexType > &ConstraintIds)
 
const ModelPart::MasterSlaveConstraintContainerType & Kratos::Python::ModelPartGetMasterSlaveConstraints1 (ModelPart &rModelPart)
 
ModelPart::SizeType Kratos::Python::ModelPartNumberOfMasterSlaveConstraints1 (ModelPart &rModelPart)
 
ModelPart::MasterSlaveConstraintType::Pointer Kratos::Python::ModelPartGetMasterSlaveConstraint1 (ModelPart &rModelPart, ModelPart::IndexType MasterSlaveConstraintId)
 
void Kratos::Python::ModelPartRemoveMasterSlaveConstraint1 (ModelPart &rModelPart, ModelPart::IndexType MasterSlaveConstraintId)
 
void Kratos::Python::ModelPartRemoveMasterSlaveConstraint2 (ModelPart &rModelPart, ModelPart::MasterSlaveConstraintType &rOtherMasterSlaveConstraint)
 
void Kratos::Python::ModelPartRemoveMasterSlaveConstraintFromAllLevels1 (ModelPart &rModelPart, ModelPart::IndexType MasterSlaveConstraintId)
 
void Kratos::Python::ModelPartRemoveMasterSlaveConstraintFromAllLevels2 (ModelPart &rModelPart, ModelPart::MasterSlaveConstraintType &rMasterSlaveConstraint)
 
Communicator & Kratos::Python::ModelPartGetCommunicator (ModelPart &rModelPart)
 
void Kratos::Python::RemoveSubModelPart1 (ModelPart &rModelPart, std::string const &ThisSubModelPartName)
 
void Kratos::Python::RemoveSubModelPart2 (ModelPart &rModelPart, ModelPart &ThisSubModelPart)
 
void Kratos::Python::AddNode1 (ModelPart &rModelPart, ModelPart::NodeType::Pointer pNode)
 
void Kratos::Python::AddNode2 (ModelPart &rModelPart, ModelPart::NodeType::Pointer pNode, const ModelPart::IndexType MeshId)
 
void Kratos::Python::AddNodesByIds (ModelPart &rModelPart, std::vector< ModelPart::IndexType > &NodesIds)
 
void Kratos::Python::AddElement1 (ModelPart &rModelPart, Element::Pointer pElement)
 
void Kratos::Python::AddElement2 (ModelPart &rModelPart, Element::Pointer pElement, const ModelPart::IndexType MeshId)
 
void Kratos::Python::AddElementsByIds (ModelPart &rModelPart, std::vector< ModelPart::IndexType > &ElementsIds)
 
void Kratos::Python::AddConditionsByIds (ModelPart &rModelPart, std::vector< ModelPart::IndexType > &ConditionsIds)
 
const ModelPart::SubModelPartIterator Kratos::Python::GetSubModelPartBegin (ModelPart &rModelPart)
 
const ModelPart::SubModelPartIterator Kratos::Python::GetSubModelPartEnd (ModelPart &rModelPart)
 
template<class TContainerType >
const std::unordered_set< std::string > Kratos::Python::GetNonHistoricalVariablesNames (ModelPart &rModelPart, TContainerType &rContainer, bool doFullSearch=false)
 
void Kratos::Python::AddModelPartToPython (pybind11::module &m)