51 #if !defined(KRATOS_NIST_UTILITIES_INCLUDED )
52 #define KRATOS_NIST_UTILITIES_INCLUDED
65 #include <pybind11/pybind11.h>
71 #include "utilities/geometry_utilities.h"
87 Element const& rReferenceElement,
88 Condition const& rReferenceBoundaryCondition
94 DestinationModelPart.
Nodes().clear();
95 DestinationModelPart.
Nodes() = OriginModelPart.
Nodes();
100 for(ModelPart::ElementsContainerType::iterator iii = OriginModelPart.
ElementsBegin(); iii != OriginModelPart.
ElementsEnd(); iii++)
103 Element::Pointer p_element = rReferenceElement.
Create(
id, geom ,properties);
104 DestinationModelPart.
Elements().push_back(p_element);
107 std::cout <<
"Elements are generated" << std::endl;
111 for(ModelPart::ConditionsContainerType::iterator iii = OriginModelPart.
ConditionsBegin(); iii != OriginModelPart.
ConditionsEnd(); iii++)
114 double nfree_surf = 0;
115 for(
unsigned int k = 0;
k<geom.
size();
k++)
116 nfree_surf += geom[
k].FastGetSolutionStepValue(IS_FREE_SURFACE);
120 Condition::Pointer p_condition = rReferenceBoundaryCondition.
Create(
id, geom,properties);
121 DestinationModelPart.
Conditions().push_back(p_condition);
125 std::cout <<
"Conditions are generated" << std::endl;
135 double wall_temperature
139 for(ModelPart::NodesContainerType::iterator in = ThisModelPart.
NodesBegin();
142 if(in->FastGetSolutionStepValue(IS_STRUCTURE) == 1 &&
143 (in->GetValue(NEIGHBOUR_ELEMENTS)).size() == 0 )
145 in->FastGetSolutionStepValue(TEMPERATURE) = wall_temperature;
161 for(ModelPart::NodesContainerType::iterator in = nodes.begin();
162 in!=nodes.end(); in++)
164 if( (in->GetValue(NEIGHBOUR_ELEMENTS)).size() != 0 )
166 if( in->Y() > level) level = in->Y();
Base class for all Conditions.
Definition: condition.h:59
virtual Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new condition pointer.
Definition: condition.h:205
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
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
PropertiesType::Pointer pGetProperties(IndexType PropertiesId)
Definition: mesh.h:394
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
MeshType & GetMesh(IndexType ThisIndex=0)
Definition: model_part.h:1791
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
ConditionIterator ConditionsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1371
Definition: nist_utilities.h:78
double FindFluidLevel(ModelPart::NodesContainerType nodes)
Definition: nist_utilities.h:154
void ApplyInitialTemperature(ModelPart &ThisModelPart, double wall_temperature)
Definition: nist_utilities.h:133
void GenerateModelPart(ModelPart &OriginModelPart, ModelPart &DestinationModelPart, Element const &rReferenceElement, Condition const &rReferenceBoundaryCondition)
Definition: nist_utilities.h:84
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
int k
Definition: quadrature.py:595