14 #if !defined(KRATOS_ISO_PRINTING_APP)
15 #define KRATOS_ISO_PRINTING_APP
55 #include "utilities/geometry_utilities.h"
151 int number_of_local_conditions=0;
157 ++number_of_local_conditions;
158 for (
unsigned int i = 0;
i < geom.
size();
i++)
160 int node_position = this_model_part.
Nodes().find(geom[
i].Id()) - it_begin_node_old;
198 double diff_node_value;
199 double diff_neigh_value;
202 unsigned int exact_nodes = 0;
203 unsigned int outside_nodes = 0;
204 int current_element=0;
205 int number_of_cuts=0;
209 bool print_element=
false;
215 for (
unsigned int i = 0;
i < it->GetGeometry().size();
i++)
218 node_value= geom[
i].FastGetSolutionStepValue(variable);
219 diff_node_value = isovalue - node_value;
220 for (
unsigned int j = 0;
j < it->GetGeometry().size();
j++)
225 neigh_value= geom[
j].FastGetSolutionStepValue(variable);
226 diff_neigh_value = isovalue - neigh_value;
230 if ((diff_node_value * diff_neigh_value) < 0.0 )
240 if (exact_nodes < 4 || outside_nodes<2 )
242 if (number_of_cuts == 6 || number_of_cuts == 6)
246 if (print_element==
true)
248 for (
unsigned int i = 0;
i < it->GetGeometry().size();
i++)
251 int node_position = this_model_part.Nodes().find(geom[
i].Id()) - it_begin_node_old;
291 double diff_node_value;
292 double diff_neigh_value;
295 unsigned int exact_nodes = 0;
296 unsigned int outside_nodes = 0;
297 int current_element=0;
298 int number_of_cuts=0;
302 bool print_element=
false;
308 for (
unsigned int i = 0;
i < it->GetGeometry().size();
i++)
311 node_value= geom[
i].FastGetSolutionStepValue(variable);
312 diff_node_value = isovalue - node_value;
313 for (
unsigned int j = 0;
j < it->GetGeometry().size();
j++)
318 neigh_value= geom[
j].FastGetSolutionStepValue(variable);
319 diff_neigh_value = isovalue - neigh_value;
323 if ((diff_node_value * diff_neigh_value) < 0.0 )
333 if (exact_nodes < 4 || outside_nodes<2 )
335 if (number_of_cuts == 6 || number_of_cuts == 6)
339 if (print_element==
true)
341 for (
unsigned int i = 0;
i < it->GetGeometry().size();
i++)
344 int node_position = this_model_part.Nodes().find(geom[
i].Id()) - it_begin_node_old;
354 node_value= it->FastGetSolutionStepValue(variable);
355 if (node_value<isovalue)
396 double diff_node_value;
397 double diff_neigh_value;;
400 unsigned int exact_nodes = 0;
401 unsigned int outside_nodes = 0;
402 int current_element=0;
403 int number_of_cuts=0;
407 bool print_element=
false;
413 for (
unsigned int i = 0;
i < it->GetGeometry().size();
i++)
416 node_value= geom[
i].FastGetSolutionStepValue(variable);
417 diff_node_value = isovalue - node_value;
418 for (
unsigned int j = 0;
j < it->GetGeometry().size();
j++)
423 neigh_value= geom[
j].FastGetSolutionStepValue(variable);
424 diff_neigh_value = isovalue - neigh_value;
428 if ((diff_node_value * diff_neigh_value) < 0.0 )
438 if (exact_nodes < 4 || outside_nodes<2 )
440 if (number_of_cuts == 6 || number_of_cuts == 6)
444 if (print_element==
true)
446 for (
unsigned int i = 0;
i < it->GetGeometry().size();
i++)
449 int node_position = this_model_part.Nodes().find(geom[
i].Id()) - it_begin_node_old;
459 node_value= it->FastGetSolutionStepValue(variable);
460 if (node_value>isovalue)
481 IsosurfaceNodes.
clear();
495 return IsosurfaceNodes;
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
Definition: amatrix_interface.h:41
Definition: iso_printer.h:94
Node ::Pointer PointPointerType
Definition: iso_printer.h:104
void AddScalarVarIsosurfaceAndLower(Variable< double > &variable, double isovalue)
Definition: iso_printer.h:267
void AddSkinConditions()
ADDSKINCONDITIONS: THIS FUNCTION ADDS TO THE NEW MODEL PART THE DATA OF THE CONDITIONS BELONGING TO T...
Definition: iso_printer.h:134
DenseVector< Vector_Order_Tensor > Node_Vector_Order_Tensor
Definition: iso_printer.h:102
void AddScalarVarIsosurfaceAndHigher(Variable< double > &variable, double isovalue)
Definition: iso_printer.h:372
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: iso_printer.h:99
PointVector::iterator PointIterator
Definition: iso_printer.h:106
~IsosurfacePrinterApplication()
Definition: iso_printer.h:120
void ClearData()
Definition: iso_printer.h:501
void AddScalarVarIsosurface(Variable< double > &variable, double isovalue)
Definition: iso_printer.h:174
ModelPart & mr_model_part
Definition: iso_printer.h:514
ModelPart::NodesContainerType NodesArrayType
Definition: iso_printer.h:97
std::vector< PointType::Pointer > PointVector
Definition: iso_printer.h:105
DenseVector< Matrix > Matrix_Order_Tensor
Definition: iso_printer.h:100
ModelPart::ElementsContainerType ElementsArrayType
Definition: iso_printer.h:98
IsosurfacePrinterApplication(ModelPart &model_part)
Definition: iso_printer.h:112
DenseVector< bool > m_used_nodes
Definition: iso_printer.h:513
DenseVector< Vector > Vector_Order_Tensor
Definition: iso_printer.h:101
NodesArrayType CreateNodesArray()
Definition: iso_printer.h:478
Node PointType
Definition: iso_printer.h:103
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
ConditionIterator ConditionsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1371
This class defines the node.
Definition: node.h:65
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ptr_iterator ptr_end()
Returns an iterator pointing to the end of the underlying data container.
Definition: pointer_vector_set.h:404
void clear()
Clear the set, removing all elements.
Definition: pointer_vector_set.h:663
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector_set.h:95
ptr_iterator ptr_begin()
Returns an iterator pointing to the beginning of the underlying data container.
Definition: pointer_vector_set.h:386
void push_back(TPointerType x)
Adds a pointer to the end of the set.
Definition: pointer_vector_set.h:544
Short class definition.
Definition: array_1d.h:61
#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
model_part
Definition: face_heat.py:14
int j
Definition: quadrature.py:648
int nnodes
Definition: sensitivityMatrix.py:24
integer i
Definition: TensorModule.f:17