69 bool RefineOnReference,
70 bool InterpolateInternalVariables
78 rNode.Set(BOUNDARY,false);
82 Geometry< Node >& geom = rCondition.GetGeometry();
83 for(unsigned int i=0; i<geom.size(); i++){
85 geom[i].Set(BOUNDARY,true);
105 if(rNode.GetValue(REFINEMENT_LEVEL)==0){
106 GlobalPointersVector<Node> empty_father_vector;
107 rNode.SetValue(FATHER_NODES, empty_father_vector);
114 compressed_matrix<int>& rCoord
118 for (
auto& r_elem: rThisModelPart.
Elements()) {
119 if (r_elem.GetValue(SPLIT_ELEMENT)) {
121 for (
unsigned int i = 0;
i < r_geom.
size();
i++) {
122 int index_i = mMapNodeIdToPos[r_geom[
i].
Id()];
123 bool is_boundary_i = r_geom[
i].Is(BOUNDARY);
124 for (
unsigned int j = 0;
j < r_geom.size();
j++) {
125 int index_j = mMapNodeIdToPos[r_geom[
j].Id()];
126 bool is_boundary_j = r_geom[
j].Is(BOUNDARY);
127 if (index_j > index_i && (is_boundary_j||is_boundary_i)) {
128 rCoord(index_i, index_j) = -2;
136 for (
auto& r_cond : rThisModelPart.
Conditions()) {
137 auto& r_geom = r_cond.GetGeometry();
138 for (
unsigned int i = 0;
i < r_geom.size();
i++) {
139 int index_i = mMapNodeIdToPos[r_geom[
i].Id()];
140 for (
unsigned int j = 0;
j < r_geom.size();
j++) {
141 int index_j = mMapNodeIdToPos[r_geom[
j].Id()];
142 if (index_j > index_i) {
143 rCoord(index_i, index_j) = -1;
155 bool added_nodes=
false;
160 for (
auto it_node = rModelPart.
Nodes().ptr_begin();
161 it_node != rModelPart.
Nodes().ptr_end(); it_node++) {
162 auto &r_father_nodes = (*it_node)->GetValue(FATHER_NODES);
163 unsigned int parent_count = r_father_nodes.size();
164 if (parent_count > 0 && (*it_node)->GetValue(REFINEMENT_LEVEL)==mCurrentRefinementLevel) {
165 unsigned int parents_in_submodel_part = 0;
167 for (
auto it_parent = r_father_nodes.begin(); it_parent != r_father_nodes.end(); it_parent++) {
168 unsigned int parent_id = it_parent->Id();
170 if ( iFound != it_submodel_part->NodesEnd() ) {
171 parents_in_submodel_part++;
175 if ( parent_count == parents_in_submodel_part ) {
176 it_submodel_part->AddNode( *it_node );
182 ModelPart &rSubModelPart = *it_submodel_part;
183 UpdateSubModelPartNodes(rSubModelPart);
Base class for all Conditions.
Definition: condition.h:59
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
ModelPart & mModelPart
Definition: local_refine_geometry_mesh.hpp:238
virtual void LocalRefineMesh(bool refine_on_reference, bool interpolate_internal_variables)
Definition: local_refine_geometry_mesh.cpp:28
Definition: local_refine_tetrahedra_mesh.hpp:49
Definition: local_refine_tetrahedra_mesh_parallel_to_boundaries.hpp:46
void ResetFatherNodes(ModelPart &rModelPart) override
Definition: local_refine_tetrahedra_mesh_parallel_to_boundaries.hpp:102
~LocalRefineTetrahedraMeshParallelToBoundaries()=default
Destructor.
LocalRefineTetrahedraMeshParallelToBoundaries(ModelPart &rModelPart)
Default constructors.
Definition: local_refine_tetrahedra_mesh_parallel_to_boundaries.hpp:56
void UpdateSubModelPartNodes(ModelPart &rModelPart) override
Definition: local_refine_tetrahedra_mesh_parallel_to_boundaries.hpp:153
void SearchEdgeToBeRefined(ModelPart &rThisModelPart, compressed_matrix< int > &rCoord) override
Definition: local_refine_tetrahedra_mesh_parallel_to_boundaries.hpp:112
void LocalRefineMesh(bool RefineOnReference, bool InterpolateInternalVariables) override
Definition: local_refine_tetrahedra_mesh_parallel_to_boundaries.hpp:68
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
SubModelPartIterator SubModelPartsEnd()
Definition: model_part.h:1708
SubModelPartIterator SubModelPartsBegin()
Definition: model_part.h:1698
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
#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
void block_for_each(TIterator itBegin, TIterator itEnd, TFunction &&rFunction)
Execute a functor on all items of a range in parallel.
Definition: parallel_utilities.h:299
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17