16 #ifndef EDGE_CABLE_ELEMENT_PROCESS_H
17 #define EDGE_CABLE_ELEMENT_PROCESS_H
59 Parameters InputParameters):mrModelPart(rModelPart),mParameters(InputParameters)
64 "edge_sub_model_part_name" : "Structure.example_part",
65 "element_type" : "cable",
66 "node_id_order" : [1,2,3],
107 const SizeType number_nodes = mParameters[
"node_id_order"].
size();
109 <<
"numbers of nodes in submodel part not consistent with numbers of nodes in process properties"
114 const std::size_t new_element_id = mParameters[
"element_id"].
GetInt();
117 std::vector<NodeType::Pointer> element_nodes (number_nodes);
120 element_nodes[
i] = mrModelPart.
pGetNode(mParameters[
"node_id_order"][
i].GetInt());
125 Properties::Pointer p_elem_prop = mrModelPart.
pGetProperties(mParameters[
"property_id"].GetInt());
128 if (mParameters[
"element_type"].GetString() ==
"cable")
131 Element::Pointer pElem = rElem.
Create(new_element_id, line_t, p_elem_prop);
134 else if (mParameters[
"element_type"].GetString() ==
"ring")
137 Element::Pointer pElem = rElem.
Create(new_element_id, line_t, p_elem_prop);
140 else KRATOS_ERROR <<
"element type :" << mParameters[
"element_type"].
GetString() <<
" not available for sliding process" << std::endl;
Definition: edge_cable_element_process.h:41
void ExecuteInitializeSolutionStep() override
this function will be executed at every time step BEFORE performing the solve phase
Definition: edge_cable_element_process.h:84
void ExecuteInitialize() override
Definition: edge_cable_element_process.h:76
std::vector< NodeTypePointer > NodeVector
Definition: edge_cable_element_process.h:46
KRATOS_CLASS_POINTER_DEFINITION(EdgeCableElementProcess)
Pointer definition of ApplyMultipointConstraintsProcess.
Node ::Pointer NodeTypePointer
Definition: edge_cable_element_process.h:45
std::vector< double > DoubleVector
Definition: edge_cable_element_process.h:49
std::vector< NodeTypePointer >::iterator NodeIterator
Definition: edge_cable_element_process.h:48
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: edge_cable_element_process.h:91
ModelPart::NodesContainerType NodesArrayType
Definition: edge_cable_element_process.h:47
DoubleVector::iterator DoubleVectorIterator
Definition: edge_cable_element_process.h:50
std::size_t SizeType
Definition: edge_cable_element_process.h:51
Node NodeType
Definition: edge_cable_element_process.h:44
void CreateEdgeCableElement() const
Definition: edge_cable_element_process.h:100
EdgeCableElementProcess(ModelPart &rModelPart, Parameters InputParameters)
Constructor.
Definition: edge_cable_element_process.h:58
Base class for all Elements.
Definition: element.h:60
virtual Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new element pointer.
Definition: element.h:202
static const TComponentType & Get(const std::string &rName)
Retrieves a component with the specified name.
Definition: kratos_components.h:114
A arbitrary node 3D line geometry with quadratic shape functions.
Definition: line_3d_n.h:55
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
PropertiesType::Pointer pGetProperties(IndexType PropertiesId, IndexType MeshIndex=0)
Returns the Properties::Pointer corresponding to it's identifier.
Definition: model_part.cpp:664
NodeType::Pointer pGetNode(IndexType NodeId, IndexType ThisIndex=0)
Definition: model_part.h:421
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
void AddElement(ElementType::Pointer pNewElement, IndexType ThisIndex=0)
Definition: model_part.cpp:917
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
SizeType size() const
This method returns the total size of the current array parameter.
Definition: kratos_parameters.cpp:993
std::string GetString() const
This method returns the string contained in the current Parameter.
Definition: kratos_parameters.cpp:684
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
The base class for all processes in Kratos.
Definition: process.h:49
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#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
integer i
Definition: TensorModule.f:17