93 virtual void LocalRefineMesh(
94 bool refine_on_reference,
95 bool interpolate_internal_variables
104 virtual void CSRRowMatrix(
106 compressed_matrix<int>& Coord
115 virtual void SearchEdgeToBeRefined(
117 compressed_matrix<int>& Coord
128 virtual void CreateListOfNewNodes(
130 compressed_matrix<int>& Coord,
131 std::vector<int> &List_New_Nodes,
143 virtual void CalculateCoordinateAndInsertNewNodes(
146 const std::vector<int> &List_New_Nodes
157 virtual void EraseOldElementAndCreateNewElement(
159 const compressed_matrix<int>& Coord,
161 bool interpolate_internal_variables
170 virtual void EraseOldConditionsAndCreateNew(
172 const compressed_matrix<int>& Coord
184 virtual void CalculateEdges(
186 const compressed_matrix<int>& Coord,
188 std::vector<int> & aux
198 inline void CreatePartition(
199 unsigned int number_of_threads,
200 const int number_of_rows,
201 vector<unsigned int>& partitions
212 template<
typename TGeometricalObjectPo
interType>
214 const int& number_elem,
215 const TGeometricalObjectPointerType father_elem,
216 TGeometricalObjectPointerType child_elem,
221 std::vector<Vector>
values;
222 father_elem->CalculateOnIntegrationPoints(INTERNAL_VARIABLES,
values, rCurrentProcessInfo);
223 child_elem->SetValuesOnIntegrationPoints(INTERNAL_VARIABLES,
values, rCurrentProcessInfo);
226 virtual void UpdateSubModelPartNodes(
ModelPart &rModelPart);
228 virtual void ResetFatherNodes(
ModelPart &rModelPart);
246 template<
typename TIteratorType>
248 TIteratorType GeometricalObjectsBegin,
249 TIteratorType GeometricalObjectsEnd,
250 compressed_matrix<int>& rCoord
255 for (TIteratorType it = GeometricalObjectsBegin; it != GeometricalObjectsEnd; ++it) {
256 if (it->GetValue(SPLIT_ELEMENT)) {
257 auto& r_geom = it->GetGeometry();
258 for (
unsigned int i = 0;
i < r_geom.size();
i++) {
259 int index_i = mMapNodeIdToPos[r_geom[
i].Id()];
260 for (
unsigned int j = 0;
j < r_geom.size();
j++) {
261 int index_j = mMapNodeIdToPos[r_geom[
j].Id()];
262 if (index_j > index_i)
264 rCoord(index_i, index_j) = -2;
Geometry base class.
Definition: geometry.h:71
Definition: local_refine_geometry_mesh.hpp:49
LocalRefineGeometryMesh(ModelPart &model_part)
Default constructors.
Definition: local_refine_geometry_mesh.hpp:70
std::vector< std::size_t > mMapPosToNodeId
Definition: local_refine_geometry_mesh.hpp:241
ModelPart::NodesContainerType NodesArrayType
Definition: local_refine_geometry_mesh.hpp:54
ModelPart & mModelPart
Definition: local_refine_geometry_mesh.hpp:238
std::unordered_map< std::size_t, unsigned int > mMapNodeIdToPos
The current refinement level.
Definition: local_refine_geometry_mesh.hpp:240
void InterpolateInteralVariables(const int &number_elem, const TGeometricalObjectPointerType father_elem, TGeometricalObjectPointerType child_elem, const ProcessInfo &rCurrentProcessInfo)
Definition: local_refine_geometry_mesh.hpp:213
ModelPart::ElementsContainerType ElementsArrayType
Definition: local_refine_geometry_mesh.hpp:55
std::vector< Matrix > Matrix_Order_Tensor
Definition: local_refine_geometry_mesh.hpp:57
virtual ~LocalRefineGeometryMesh()=default
Destructor.
Node ::Pointer PointPointerType
Definition: local_refine_geometry_mesh.hpp:61
std::vector< PointType::Pointer > PointVector
Definition: local_refine_geometry_mesh.hpp:62
std::vector< Vector_Order_Tensor > Node_Vector_Order_Tensor
Definition: local_refine_geometry_mesh.hpp:59
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: local_refine_geometry_mesh.hpp:56
Node PointType
Definition: local_refine_geometry_mesh.hpp:60
std::vector< Vector > Vector_Order_Tensor
Definition: local_refine_geometry_mesh.hpp:58
PointVector::iterator PointIterator
Definition: local_refine_geometry_mesh.hpp:63
void SearchEdgeToBeRefinedGeneric(TIteratorType GeometricalObjectsBegin, TIteratorType GeometricalObjectsEnd, compressed_matrix< int > &rCoord)
Definition: local_refine_geometry_mesh.hpp:247
int mCurrentRefinementLevel
The model part to be refined.
Definition: local_refine_geometry_mesh.hpp:239
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
#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
list values
Definition: bombardelli_test.py:42
model_part
Definition: face_heat.py:14
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17