13 #if !defined(KRATOS_ULF_UTILITIES_INCLUDED )
14 #define KRATOS_ULF_UTILITIES_INCLUDED
33 #include "utilities/geometry_utilities.h"
36 #include "boost/smart_ptr.hpp"
62 if(laplacian_type == 1)
65 for(ModelPart::NodesContainerType::const_iterator in = ThisModelPart.
NodesBegin(); in!=ThisModelPart.
NodesEnd(); in++)
68 if(in->FastGetSolutionStepValue(IS_STRUCTURE) )
69 if( (in->GetValue(NEIGHBOUR_ELEMENTS)).size() != 0)
70 in->FastGetSolutionStepValue(IS_FLUID) = 1.0;
72 in->FastGetSolutionStepValue(IS_FLUID) = 0.0;
74 else if( (in->GetValue(NEIGHBOUR_ELEMENTS)).size() == 0)
75 in->FastGetSolutionStepValue(IS_BOUNDARY) = 1.0;
83 i->FastGetSolutionStepValue(IS_FREE_SURFACE) = 0;
87 if(
i->FastGetSolutionStepValue(IS_BOUNDARY) != 0
89 i->FastGetSolutionStepValue(IS_STRUCTURE) == 0)
91 i->FastGetSolutionStepValue(IS_FREE_SURFACE) = 1;
92 i->FastGetSolutionStepValue(PRESSURE) = 0.00;
102 for(ModelPart::NodesContainerType::const_iterator in = ThisModelPart.
NodesBegin(); in!=ThisModelPart.
NodesEnd(); in++)
105 if(in->FastGetSolutionStepValue(IS_STRUCTURE) )
106 if( (in->GetValue(NEIGHBOUR_ELEMENTS)).size() != 0)
107 in->FastGetSolutionStepValue(IS_FLUID) = 1.0;
109 in->FastGetSolutionStepValue(IS_FLUID) = 0.0;
111 else if( (in->GetValue(NEIGHBOUR_ELEMENTS)).size() == 0)
112 in->FastGetSolutionStepValue(IS_BOUNDARY) = 1.0;
114 if( (in->GetValue(NEIGHBOUR_ELEMENTS)).size() == 0)
115 in->FastGetSolutionStepValue(PRESSURE) = 0.0;
123 i->FastGetSolutionStepValue(IS_FREE_SURFACE) = 0;
126 if(
i->FastGetSolutionStepValue(IS_BOUNDARY) != 0
128 i->FastGetSolutionStepValue(IS_STRUCTURE) == 0)
130 i->FastGetSolutionStepValue(IS_FREE_SURFACE) = 1;
146 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
152 for(
unsigned int i = 0;
i<geom.
size();
i++)
153 geom[
i].FastGetSolutionStepValue(IS_FLUID) = 1;
166 std::vector<bool> to_be_prescribed(connected_components.size());
168 for(
unsigned int i = 0;
i<connected_components.size();
i++)
170 int boundary_nodes = 0;
171 int prescribed_vel_nodes = 0;
180 if(in->FastGetSolutionStepValue(IS_BOUNDARY) == 1)
186 if(in->FastGetSolutionStepValue(IS_STRUCTURE) == 1)
187 prescribed_vel_nodes += 1;
194 if(boundary_nodes == prescribed_vel_nodes)
196 bool one_is_prescribed =
false;
200 if( one_is_prescribed ==
false &&
201 in->FastGetSolutionStepValue(IS_BOUNDARY) == 1 )
203 std::cout <<
"fixed pressure on node " << in->Id() << std::endl;
204 one_is_prescribed =
true;
220 double deltatime = dt_max;
221 double dvside, lside;
223 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
229 for(
unsigned int i1 = 0; i1 < geom.
size()-1; i1++)
231 for(
unsigned int i2 = i1 + 1; i2 < geom.
size(); i2++)
233 dx[0] = geom[i2].X() - geom[i1].X();
234 dx[1] = geom[i2].Y() - geom[i1].Y();
235 dx[2] = geom[i2].Z() - geom[i1].Z();
239 noalias(dv) = geom[i2].FastGetSolutionStepValue(VELOCITY);
240 noalias(dv) -= geom[i1].FastGetSolutionStepValue(VELOCITY);
247 dt = fabs( lside/dvside );
248 if(
dt < deltatime) deltatime =
dt;
255 if(deltatime < dt_min)
257 std::cout <<
"ATTENTION dt_min is being used" << std::endl;
279 if(corner1[0] > corner2[0])
290 if(corner1[1] > corner2[1])
301 if(corner1[2] > corner2[2])
314 for(ModelPart::NodesContainerType::iterator in = rNodes.begin(); in!=rNodes.end(); in++)
321 if(x<xmin || x>
xmax) erase =
true;
322 else if(y<ymin || y>
ymax) erase =
true;
323 else if(z<zmin || z>
zmax) erase =
true;
328 in->Set(TO_ERASE,
true);
341 double fact2 = admissible_distance_factor*admissible_distance_factor;
344 for(ModelPart::NodesContainerType::iterator in = rNodes.begin(); in!=rNodes.end(); in++)
346 if(in->FastGetSolutionStepValue(IS_STRUCTURE) == 0)
348 double hnode2 = in->FastGetSolutionStepValue(NODAL_H);
353 i != in->GetValue(NEIGHBOUR_NODES).end();
i++)
355 if(
bool(
i->Is(TO_ERASE)) ==
false)
357 double dx =
i->X() - in->X();
358 double dy =
i->Y() - in->Y();
359 double dz =
i->Z() - in->Z();
361 double dist2 = dx*dx + dy*dy + dz*dz;
363 if(dist2 < fact2 * hnode2)
364 in->Set(TO_ERASE,
true);
380 return sqrt((Point1[0]-Point2[0])*(Point1[0]-Point2[0]) + (Point1[1]-Point2[1])*(Point1[1]-Point2[1]) +(Point1[2]-Point2[2])*(Point1[2]-Point2[2]));
385 double a=
Length(Point1, Point2);
386 double b=
Length(Point1, Point3);
387 double c=
Length(Point2, Point3);
388 double p=0.5*(
a+
b+
c);
389 return sqrt(
p*(
p-
a)*(
p-
b)*(
p-
c));
401 for(ModelPart::NodesContainerType::iterator in = ThisModelPart.
NodesBegin();
404 in->FastGetSolutionStepValue(NODAL_AREA) = 0.00;
410 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
417 area *= 0.333333333333333333333333333;
420 geom[0].FastGetSolutionStepValue(NODAL_AREA) += area;
421 geom[1].FastGetSolutionStepValue(NODAL_AREA) += area;
422 geom[2].FastGetSolutionStepValue(NODAL_AREA) += area;
428 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
442 geom[0].FastGetSolutionStepValue(NODAL_AREA) += vol;
443 geom[1].FastGetSolutionStepValue(NODAL_AREA) += vol;
444 geom[2].FastGetSolutionStepValue(NODAL_AREA) += vol;
445 geom[3].FastGetSolutionStepValue(NODAL_AREA) += vol;
464 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
471 n_fs =
int(geom[0].FastGetSolutionStepValue(IS_FREE_SURFACE));
472 n_fs+=
int(geom[1].FastGetSolutionStepValue(IS_FREE_SURFACE));
473 n_fs+=
int(geom[2].FastGetSolutionStepValue(IS_FREE_SURFACE));
480 for (
int i=0;
i<3;
i++)
483 if (geom[
i].FastGetSolutionStepValue(IS_FREE_SURFACE)==0.0 && geom[
i].FastGetSolutionStepValue(IS_FLUID)==1.0 && geom[
i].FastGetSolutionStepValue(IS_STRUCTURE)==0.0)
485 geom[
i].Set(TO_ERASE,
true);
486 KRATOS_WATCH(
"NODE CLOSE TO THE FS - WILL BE ERASED!!!!")
504 for(ModelPart::NodesContainerType::iterator in = ThisModelPart.
NodesBegin();
507 if (in->FastGetSolutionStepValue(DISTANCE)>0.00 && in->FastGetSolutionStepValue(DISTANCE)<crit_distance && in->FastGetSolutionStepValue(IS_STRUCTURE)==0)
509 in->Set(TO_ERASE,
true);
510 KRATOS_WATCH(
"NODE EXCESSIVELY CLOSE TO WALL!!!!! BLADDER FUNCTION!!!!!!!!!!!!!!!!!!!!!!!!!!111")
522 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
529 n_str = geom[0].FastGetSolutionStepValue(IS_BOUNDARY);
530 n_str+= geom[1].FastGetSolutionStepValue(IS_BOUNDARY);
531 n_str+= geom[2].FastGetSolutionStepValue(IS_BOUNDARY);
537 for (
int i=0;
i<3; ++
i)
538 if(geom[
i].FastGetSolutionStepValue(IS_BOUNDARY)==0.0)
540 sort_coord(0,0) = geom[
i].X();
541 sort_coord(0,1) = geom[
i].Y();
545 sort_coord(cnt,0) = geom[
i].X();
546 sort_coord(cnt,1) = geom[
i].Y();
553 vec1[0] = sort_coord(0,0) - sort_coord(1,0);
554 vec1[1] = sort_coord(0,1) - sort_coord(1,1);
556 vec2[0] = sort_coord(2,0) - sort_coord(1,0);
557 vec2[1] = sort_coord(2,1) - sort_coord(1,1);
562 double length_measure =0.0;
563 length_measure = vec2[0]*vec2[0] + vec2[1]*vec2[1];
564 length_measure = sqrt(length_measure);
572 for (
int i=0;
i<3;
i++)
575 if (geom[
i].FastGetSolutionStepValue(IS_BOUNDARY)==0.0)
577 geom[
i].Set(TO_ERASE,
true);
588 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
601 n_str += geom[ii].FastGetSolutionStepValue(IS_STRUCTURE);
602 n_int += geom[ii].FastGetSolutionStepValue(IS_INTERFACE);
605 if (n_str==3.0 && n_int==3.0)
609 for (
int i=0;
i<4; ++
i)
611 if(geom[
i].FastGetSolutionStepValue(IS_STRUCTURE)==0.0)
613 sort_coord(0,0) = geom[
i].X();
614 sort_coord(0,1) = geom[
i].Y();
615 sort_coord(0,2) = geom[
i].Z();
619 sort_coord(cnt,0) = geom[
i].X();
620 sort_coord(cnt,1) = geom[
i].Y();
621 sort_coord(cnt,2) = geom[
i].Z();
630 vec1[0] = sort_coord(0,0) - sort_coord(1,0);
631 vec1[1] = sort_coord(0,1) - sort_coord(1,1);
632 vec1[2] = sort_coord(0,2) - sort_coord(1,2);
634 vec2[0] = sort_coord(2,0) - sort_coord(1,0);
635 vec2[1] = sort_coord(2,1) - sort_coord(1,1);
636 vec2[2] = sort_coord(2,2) - sort_coord(1,2);
638 vec3[0] = sort_coord(3,0) - sort_coord(1,0);
639 vec3[1] = sort_coord(3,1) - sort_coord(1,1);
640 vec3[2] = sort_coord(3,2) - sort_coord(1,2);
644 double vol = (vec2[0]*vec3[1]*vec1[2]-vec2[0]*vec3[2]*vec1[1]+
645 vec2[1]*vec3[2]*vec1[0]-vec2[1]*vec3[0]*vec1[2]+
646 vec2[2]*vec3[0]*vec1[1]-vec2[2]*vec3[1]*vec1[0])*0.1666666666667;
649 outer_prod[0] = vec2[1]*vec3[2]-vec2[2]*vec3[1];
650 outer_prod[1] = vec2[2]*vec3[0]-vec2[0]*vec3[2];
651 outer_prod[2] = vec2[0]*vec3[1]-vec2[1]*vec3[0];
656 if(area_base >0.0000000001)
662 double length_measure1 =
norm_2(vec2);
663 double length_measure =
norm_2(vec3);
664 if(length_measure1 < length_measure)
666 length_measure = length_measure1;
669 if (fabs(vol)<
factor*length_measure)
671 for (
int i=0;
i<4;
i++)
675 if (geom[
i].FastGetSolutionStepValue(IS_STRUCTURE)==0.0 && geom[
i].FastGetSolutionStepValue(IS_LAGRANGIAN_INLET)==0.0)
677 geom[
i].Set(TO_ERASE,
true);
678 KRATOS_WATCH(
"NODE TOUCHING THE WALL - WILL BE ERASED!!!!")
694 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
701 n_str =
int(geom[0].FastGetSolutionStepValue(IS_STRUCTURE));
702 n_str+=
int(geom[1].FastGetSolutionStepValue(IS_STRUCTURE));
703 n_str+=
int(geom[2].FastGetSolutionStepValue(IS_STRUCTURE));
710 for (
int i=0;
i<3;
i++)
713 if (geom[
i].FastGetSolutionStepValue(IS_STRUCTURE)==0.0)
715 geom[
i].Set(TO_ERASE,
true);
727 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
736 for (
unsigned int iii=0; iii<geom.
size(); iii++)
738 n_lag +=
int(geom[iii].FastGetSolutionStepValue(IS_LAGRANGIAN_INLET));
739 n_str +=
int(geom[iii].FastGetSolutionStepValue(IS_STRUCTURE));
740 n_fl +=
int(geom[iii].FastGetSolutionStepValue(IS_FLUID));
741 n_interf +=
int(geom[iii].FastGetSolutionStepValue(IS_INTERFACE));
747 if (geom.
size()==4 && n_interf==3 && n_lag==0)
752 for (
unsigned int iii=0; iii<geom.
size(); iii++)
755 if (geom[iii].FastGetSolutionStepValue(IS_STRUCTURE)==0.0)
757 geom[iii].Set(TO_ERASE,
true);
758 KRATOS_WATCH(
"NODE CLOSE TO THE WALL - WILL BE ERASED!!!!")
787 for(ModelPart::NodesContainerType::iterator in = ThisModelPart.
NodesBegin();
790 if((in->GetValue(NEIGHBOUR_ELEMENTS)).size() == 0 && in->FastGetSolutionStepValue(IS_STRUCTURE)==0.0 && in->FastGetSolutionStepValue(IS_LAGRANGIAN_INLET)!=1 && in->FastGetSolutionStepValue(IS_LAGRANGIAN_INLET,1)!=1.0)
792 in->Set(TO_ERASE,
true);
829 double x0 = pgeom[0].X();
830 double x1 = pgeom[1].X();
831 double x2 = pgeom[2].X();
833 double y0 = pgeom[0].Y();
834 double y1 = pgeom[1].Y();
835 double y2 = pgeom[2].Y();
843 double detJ =
J(0,0)*
J(1,1)-
J(0,1)*
J(1,0);
850 bounded_matrix<double,2,2> check;
857 pgeom[0].GetSolutionStepValue(IS_BOUNDARY) = 1;
858 pgeom[1].GetSolutionStepValue(IS_BOUNDARY) = 1;
859 pgeom[2].GetSolutionStepValue(IS_BOUNDARY) = 1;
866 double x0_2 = x0*x0 + y0*y0;
867 double x1_2 =
x1*
x1 + y1*y1;
868 double x2_2 =
x2*
x2 + y2*y2;
874 rhs[0] = (x1_2 - x0_2);
875 rhs[1] = (x2_2 - x0_2);
880 double radius = sqrt(pow(
c[0]-x0,2)+pow(
c[1]-y0,2));
884 h = pgeom[0].FastGetSolutionStepValue(NODAL_H);
885 h += pgeom[1].FastGetSolutionStepValue(NODAL_H);
886 h += pgeom[2].FastGetSolutionStepValue(NODAL_H);
911 const double x0 = geom[0].X();
912 const double y0 = geom[0].Y();
913 const double z0 = geom[0].Z();
914 const double x1 = geom[1].X();
915 const double y1 = geom[1].Y();
916 const double z1 = geom[1].Z();
917 const double x2 = geom[2].X();
918 const double y2 = geom[2].Y();
919 const double z2 = geom[2].Z();
920 const double x3 = geom[3].X();
921 const double y3 = geom[3].Y();
922 const double z3 = geom[3].Z();
938 Jinv(0,0) =
J(1,1)*
J(2,2) -
J(1,2)*
J(2,1);
939 Jinv(1,0) = -
J(1,0)*
J(2,2) +
J(1,2)*
J(2,0);
940 Jinv(2,0) =
J(1,0)*
J(2,1) -
J(1,1)*
J(2,0);
942 Jinv(0,1) = -
J(0,1)*
J(2,2) +
J(0,2)*
J(2,1);
943 Jinv(1,1) =
J(0,0)*
J(2,2) -
J(0,2)*
J(2,0);
944 Jinv(2,1) = -
J(0,0)*
J(2,1) +
J(0,1)*
J(2,0);
946 Jinv(0,2) =
J(0,1)*
J(1,2) -
J(0,2)*
J(1,1);
947 Jinv(1,2) = -
J(0,0)*
J(1,2) +
J(0,2)*
J(1,0);
948 Jinv(2,2) =
J(0,0)*
J(1,1) -
J(0,1)*
J(1,0);
952 double detJ =
J(0,0)*Jinv(0,0)
960 double x0_2 = x0*x0 + y0*y0 + z0*z0;
961 double x1_2 =
x1*
x1 + y1*y1 + z1*z1;
962 double x2_2 =
x2*
x2 + y2*y2 + z2*z2;
963 double x3_2 = x3*x3 + y3*y3 + z3*z3;
970 Rhs[0] = 0.5*(x1_2 - x0_2);
971 Rhs[1] = 0.5*(x2_2 - x0_2);
972 Rhs[2] = 0.5*(x3_2 - x0_2);
983 h = geom[0].FastGetSolutionStepValue(NODAL_H);
984 h += geom[1].FastGetSolutionStepValue(NODAL_H);
985 h += geom[2].FastGetSolutionStepValue(NODAL_H);
986 h += geom[3].FastGetSolutionStepValue(NODAL_H);
1018 (
i)->FastGetSolutionStepValue(IS_STRUCTURE) == 0 &&
1019 (
i)->
GetValue(NEIGHBOUR_ELEMENTS).size() == 0 &&
1020 ((
i)->GetDof(DISPLACEMENT_X).IsFixed() ==
false || (
i)->GetDof(DISPLACEMENT_Y).IsFixed() ==
false || (
i)->GetDof(DISPLACEMENT_Z).IsFixed() ==
false)
1026 (
i)->FastGetSolutionStepValue(PRESSURE) = 0;
1032 noalias(acc) = (
i)->FastGetSolutionStepValue(BODY_FORCE);
1041 noalias(disp) =
i->FastGetSolutionStepValue(DISPLACEMENT,1);
1089 bool inverted_elements =
false;
1094 unsigned int nstruct=0;
1098 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
1103 for (
unsigned int kkk=0; kkk<(
i->GetGeometry()).size(); kkk++)
1106 nstruct+=
int(
i->GetGeometry()[kkk].FastGetSolutionStepValue(IS_STRUCTURE));
1109 if ( nstruct!= (
i->GetGeometry()).size() )
1115 inverted_elements =
true;
1124 for(ModelPart::ElementsContainerType::iterator
i = ThisModelPart.
ElementsBegin();
1129 for (
unsigned int kkk=0; kkk<(
i->GetGeometry()).size(); kkk++)
1132 nstruct+=
int(
i->GetGeometry()[kkk].FastGetSolutionStepValue(IS_STRUCTURE));
1137 if ( nstruct!= (
i->GetGeometry()).size() )
1141 if(Ael <= 0) inverted_elements =
true;
1149 if( inverted_elements ==
true)
1166 double new_dt = reduction_factor * old_dt;
1169 double new_time =
time - old_dt + new_dt;
1177 for(ModelPart::NodesContainerType::iterator
i = ThisModelPart.
NodesBegin();
1184 double* step_data =
i->SolutionStepData().Data(0);
1185 double* prev_step_data =
i->SolutionStepData().Data(1);
1189 for(
unsigned int j= 0;
j<step_data_size;
j++)
1191 step_data[
j] = prev_step_data[
j];
1205 for(ModelPart::NodesContainerType::iterator
i = ThisModelPart.
NodesBegin();
1208 i->FastGetSolutionStepValue(NODAL_AREA,1) =
i->FastGetSolutionStepValue(NODAL_AREA);
1224 reduced_model_part.
Elements().clear();
1225 reduced_model_part.
Nodes().clear();
1229 for(ModelPart::NodesContainerType::iterator in = full_model_part.
NodesBegin() ; in != full_model_part.
NodesEnd() ; ++in)
1231 in->FastGetSolutionStepValue(ACTIVATION_LEVEL)=
false;
1232 in->FastGetSolutionStepValue(MATERIAL_VARIABLE)=
false;
1245 if(
im->GetGeometry()[
i].FastGetSolutionStepValue(IS_INTERFACE)==1) n_int+=1.0;
1252 im->GetGeometry()[0].FastGetSolutionStepValue(MATERIAL_VARIABLE)=
true;
1253 im->GetGeometry()[1].FastGetSolutionStepValue(MATERIAL_VARIABLE)=
true;
1254 im->GetGeometry()[2].FastGetSolutionStepValue(MATERIAL_VARIABLE)=
true;
1255 im->GetGeometry()[3].FastGetSolutionStepValue(MATERIAL_VARIABLE)=
true;
1259 im->GetGeometry()[0].FastGetSolutionStepValue(MATERIAL_VARIABLE)=
true;
1260 im->GetGeometry()[1].FastGetSolutionStepValue(MATERIAL_VARIABLE)=
true;
1261 im->GetGeometry()[2].FastGetSolutionStepValue(MATERIAL_VARIABLE)=
true;
1270 reduced_model_part.
Elements().push_back(*(
im.base()));
1274 im->GetGeometry()[
i].FastGetSolutionStepValue(ACTIVATION_LEVEL)=
true;
1279 KRATOS_ERROR<<
"Number of DISABLE flags cant exceed number of the element nodes.... ";
1285 for(ModelPart::NodesContainerType::iterator in = full_model_part.
NodesBegin() ; in != full_model_part.
NodesEnd() ; ++in)
1287 int n_disabled=in->FastGetSolutionStepValue(ACTIVATION_LEVEL);
1290 reduced_model_part.
Nodes().push_back(*(in.base()));
1296 i_properties != full_model_part.
PropertiesEnd() ; ++i_properties)
This method allows to look for neighbours in a triangular or tetrahedral mesh.
Definition: find_nodal_neighbours_process.h:59
void Execute() override
This method esxecutes the neighbour search.
Definition: find_nodal_neighbours_process.cpp:49
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
static double CalculateVolume2D(const GeometryType &rGeometry)
This function computes the element's volume (with sign)
Definition: geometry_utilities.h:292
static double CalculateVolume3D(const GeometryType &rGeometry)
This function computes the element's volume (with sign)
Definition: geometry_utilities.h:226
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: global_pointers_vector.h:79
Definition: amatrix_interface.h:41
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
SizeType GetNodalSolutionStepDataSize()
Definition: model_part.h:571
PropertiesIterator PropertiesBegin(IndexType ThisIndex=0)
Definition: model_part.h:978
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
void AddProperties(PropertiesType::Pointer pNewProperties, IndexType ThisIndex=0)
Inserts a properties in the current mesh.
Definition: model_part.cpp:582
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
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
PropertiesIterator PropertiesEnd(IndexType ThisIndex=0)
Definition: model_part.h:988
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
Definition: pfem2_utilities.h:50
void MarkNodesTouchingWall(ModelPart &ThisModelPart, int domain_size, double factor)
Definition: pfem2_utilities.h:515
void MarkLonelyNodesForErasing(ModelPart &ThisModelPart)
Definition: pfem2_utilities.h:774
void SaveNodalArea(ModelPart &ThisModelPart)
Definition: pfem2_utilities.h:1201
void IdentifyFluidNodes(ModelPart &ThisModelPart)
Definition: pfem2_utilities.h:142
double CalculateTriangleArea3D(array_1d< double, 3 > &Point1, array_1d< double, 3 > &Point2, array_1d< double, 3 > &Point3)
Definition: pfem2_utilities.h:382
double Length(array_1d< double, 3 > &Point1, array_1d< double, 3 > &Point2)
Definition: pfem2_utilities.h:377
void MarkOuterNodes(const array_1d< double, 3 > &corner1, const array_1d< double, 3 > &corner2, ModelPart::NodesContainerType &rNodes)
Definition: pfem2_utilities.h:268
void MarkNodesCloseToWall(ModelPart &ThisModelPart, int domain_size, double alpha_shape)
Definition: pfem2_utilities.h:689
double EstimateDeltaTime(double dt_min, double dt_max, ModelPart &ThisModelPart)
Definition: pfem2_utilities.h:215
void MarkNodesCloseToWallForBladder(ModelPart &ThisModelPart, const double &crit_distance)
Definition: pfem2_utilities.h:501
void ReduceTimeStep(ModelPart &ThisModelPart, const double reduction_factor)
Definition: pfem2_utilities.h:1161
void SaveReducedPart(ModelPart &full_model_part, ModelPart &reduced_model_part)
Definition: pfem2_utilities.h:1217
void MarkExcessivelyCloseNodes(ModelPart::NodesContainerType &rNodes, const double admissible_distance_factor)
Definition: pfem2_utilities.h:337
bool AlphaShape(double alpha_param, Geometry< Node > &pgeom)
Definition: pfem2_utilities.h:820
void ApplyBoundaryConditions(ModelPart &ThisModelPart, int laplacian_type)
Definition: pfem2_utilities.h:58
void ApplyMinimalPressureConditions(std::vector< GlobalPointersVector< Node > > &connected_components)
Definition: pfem2_utilities.h:161
void MarkNodesCloseToFS(ModelPart &ThisModelPart, int domain_size)
Definition: pfem2_utilities.h:459
void MoveLonelyNodes(ModelPart &ThisModelPart)
Definition: pfem2_utilities.h:1005
bool AlphaShape3D(double alpha_param, Geometry< Node > &geom)
Definition: pfem2_utilities.h:901
void CalculateNodalArea(ModelPart &ThisModelPart, int domain_size)
Definition: pfem2_utilities.h:395
Node NodeType
Definition: pfem2_utilities.h:52
double CalculateVolume(ModelPart &ThisModelPart, int domain_size)
Definition: pfem2_utilities.h:1085
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector_set.h:95
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_WATCH(variable)
Definition: define.h:806
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
dt
Definition: DEM_benchmarks.py:173
im
Definition: GenerateCN.py:100
z
Definition: GenerateWind.py:163
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
AMatrix::VectorOuterProductExpression< TExpression1Type, TExpression2Type > outer_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:582
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
float zmax
Definition: cube_mesher.py:747
float xmax
Definition: cube_mesher.py:743
float ymax
Definition: cube_mesher.py:745
float xmin
Definition: cube_mesher.py:742
float zmin
Definition: cube_mesher.py:746
float ymin
Definition: cube_mesher.py:744
int domain_size
Definition: face_heat.py:4
time
Definition: face_heat.py:85
Dt
Definition: face_heat.py:78
y
Other simbols definition.
Definition: generate_axisymmetric_navier_stokes_element.py:54
h
Definition: generate_droplet_dynamics.py:91
x2
Definition: generate_frictional_mortar_condition.py:122
rhs
Definition: generate_frictional_mortar_condition.py:297
x1
Definition: generate_frictional_mortar_condition.py:121
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
int n_nodes
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:15
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
list node_list
Definition: mesh_to_mdpa_converter.py:39
float radius
Definition: mesh_to_mdpa_converter.py:18
vel
Definition: pure_conduction.py:76
int j
Definition: quadrature.py:648
float xc
Definition: rotating_cone.py:77
alpha_shape
Definition: script.py:120
J
Definition: sensitivityMatrix.py:58
p
Definition: sensitivityMatrix.py:52
x
Definition: sensitivityMatrix.py:49
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31
float factor
for node in (self.combined_model_part).Nodes: pold = node.GetSolutionStepValue(PRESSURE,...
Definition: ulf_PGLASS.py:254