Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class ApplyWeakSlidingProcess

const Element& rElem = KratosComponents<Element>::Get("WeakSlidingElement3D3N");
Properties::Pointer p_elem_prop = slave_model_part.pGetProperties(mParameters["property_id"].GetInt());
Element::Pointer pElem = rElem.Create(mCurrentElementId++, triangle_t, p_elem_prop);
Element::Pointer pElem = rElem.Create(mCurrentElementId++, triangle_t.Points(), p_elem_prop);
mrModelPart.AddElement(pElem);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ class EdgeCableElementProcess
if (mParameters["element_type"].GetString() == "cable")
{
const Element& rElem = KratosComponents<Element>::Get("SlidingCableElement3D3N");
Element::Pointer pElem = rElem.Create(new_element_id, line_t, p_elem_prop);
Element::Pointer pElem = rElem.Create(new_element_id, line_t.Points(), p_elem_prop);
mrModelPart.AddElement(pElem);
}
else if (mParameters["element_type"].GetString() == "ring")
{
const Element& rElem = KratosComponents<Element>::Get("RingElement3D4N");
Element::Pointer pElem = rElem.Create(new_element_id, line_t, p_elem_prop);
Element::Pointer pElem = rElem.Create(new_element_id, line_t.Points(), p_elem_prop);
mrModelPart.AddElement(pElem);
}
else KRATOS_ERROR << "element type :" << mParameters["element_type"].GetString() << " not available for sliding process" << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class EmpiricalSpringElementProcess


const Element& rElem = KratosComponents<Element>::Get("EmpiricalSpringElement3D2N");
Element::Pointer pElem = rElem.Create(new_element_id, line_t, p_elem_prop);
Element::Pointer pElem = rElem.Create(new_element_id, line_t.Points(), p_elem_prop);
mrModelPart.AddElement(pElem);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ void ChimeraHoleCuttingUtility::ExtractBoundaryMesh(ModelPart& rVolumeModelPart,
// Skin edges are added as conditions
Line2D2<Node> line1(pnode1, pnode2);
Condition::Pointer p_condition1 =
r_ref_line_condition.Create(id_condition++, line1, properties);
r_ref_line_condition.Create(id_condition++, line1.Points(), properties);
rExtractedBoundaryModelPart.Conditions().push_back(p_condition1);
}
// If skin face is a triangle store triangle in with its original
Expand All @@ -296,7 +296,7 @@ void ChimeraHoleCuttingUtility::ExtractBoundaryMesh(ModelPart& rVolumeModelPart,
// Skin faces are added as conditions
Triangle3D3<Node> triangle1(pnode1, pnode2, pnode3);
Condition::Pointer p_condition1 = r_ref_triangle_condition.Create(
id_condition++, triangle1, properties);
id_condition++, triangle1.Points(), properties);
rExtractedBoundaryModelPart.Conditions().push_back(p_condition1);
}
// If skin face is a quadrilateral then divide in two triangles and
Expand Down Expand Up @@ -326,13 +326,13 @@ void ChimeraHoleCuttingUtility::ExtractBoundaryMesh(ModelPart& rVolumeModelPart,
// Add triangle one as condition
Triangle3D3<Node> triangle1(pnode1, pnode2, pnode3);
Condition::Pointer p_condition1 = r_ref_triangle_condition.Create(
id_condition++, triangle1, properties);
id_condition++, triangle1.Points(), properties);
rExtractedBoundaryModelPart.Conditions().push_back(p_condition1);

// Add triangle two as condition
Triangle3D3<Node> triangle2(pnode1, pnode3, pnode4);
Condition::Pointer p_condition2 = r_ref_triangle_condition.Create(
id_condition++, triangle2, properties);
id_condition++, triangle2.Points(), properties);
rExtractedBoundaryModelPart.Conditions().push_back(p_condition2);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ namespace Kratos

id += 1;

Condition::Pointer pContactCondition = rReferenceCondition.Create(id, Vertices, pProperties);
Condition::Pointer pContactCondition = rReferenceCondition.Create(id, Vertices.Points(), pProperties);


//search the model part condition associated to this contact element MASTER CONDITION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ void BaseContactSearchProcess<TDim, TNumNodes, TNumNodesMaster>::CheckContactMod
r_cond.Set(TO_ERASE, true);

// Creating new condition
Condition::Pointer p_new_cond = r_cond.Clone(total_number_conditions + r_cond.Id(), r_cond.GetGeometry());
Condition::Pointer p_new_cond = r_cond.Clone(total_number_conditions + r_cond.Id(), r_cond.GetGeometry().Points());
auxiliary_conditions_vector.push_back(p_new_cond);

p_new_cond->SetData(r_cond.GetData()); // TODO: Remove when fixed on the core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class FaceHeatUtilities
{
Geometry< Node >& geom = iii->GetGeometry();
Properties::Pointer properties = iii->pGetProperties();
Element::Pointer p_element = rReferenceElement.Create(id, geom ,properties);
Element::Pointer p_element = rReferenceElement.Create(id, geom.Points() ,properties);
DestinationModelPart.Elements().push_back(p_element);
id = id + 1;
}
Expand All @@ -92,7 +92,7 @@ class FaceHeatUtilities
if(nfree_surf > 1)
{
Properties::Pointer properties = iii->pGetProperties();
Condition::Pointer p_condition = rReferenceBoundaryCondition.Create(id, geom,properties);
Condition::Pointer p_condition = rReferenceBoundaryCondition.Create(id, geom.Points(), properties);
DestinationModelPart.Conditions().push_back(p_condition);
id = id + 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class SpalartAllmarasTurbulenceModel : public Process
for (ModelPart::ElementsContainerType::iterator iii = mr_model_part.ElementsBegin(); iii != mr_model_part.ElementsEnd(); iii++)
{
Properties::Pointer properties = iii->pGetProperties();
Element::Pointer p_element = rReferenceElement.Create(iii->Id(), iii->GetGeometry(), properties);
Element::Pointer p_element = rReferenceElement.Create(iii->Id(), iii->GetGeometry().Points(), properties);
mrSpalartModelPart.Elements().push_back(p_element);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class StokesInitializationProcess : public Process
// Generate Stokes elements
for (ModelPart::ElementsContainerType::const_iterator itElem = mrReferenceModelPart.ElementsBegin(); itElem != mrReferenceModelPart.ElementsEnd(); itElem++)
{
Element::Pointer pElem = rReferenceElement.Create(itElem->Id(), itElem->GetGeometry(), itElem->pGetProperties() );
Element::Pointer pElem = rReferenceElement.Create(itElem->Id(), itElem->GetGeometry().Points(), itElem->pGetProperties() );
r_stokes_part.Elements().push_back(pElem);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class TrilinosSpalartAllmarasTurbulenceModel : public SpalartAllmarasTurbulenceM
for (ModelPart::ElementsContainerType::iterator iii = BaseSpAlType::mr_model_part.ElementsBegin(); iii != BaseSpAlType::mr_model_part.ElementsEnd(); iii++)
{
Properties::Pointer properties = iii->pGetProperties();
Element::Pointer p_element = rReferenceElement.Create(iii->Id(), iii->GetGeometry(), properties);
Element::Pointer p_element = rReferenceElement.Create(iii->Id(), iii->GetGeometry().Points(), properties);
BaseSpAlType::mrSpalartModelPart.Elements().push_back(p_element);
}

Expand All @@ -167,7 +167,7 @@ class TrilinosSpalartAllmarasTurbulenceModel : public SpalartAllmarasTurbulenceM
for (ModelPart::ConditionsContainerType::iterator iii = BaseSpAlType::mr_model_part.ConditionsBegin(); iii != BaseSpAlType::mr_model_part.ConditionsEnd(); iii++)
{
Properties::Pointer properties = iii->pGetProperties();
Condition::Pointer p_condition = rReferenceCondition.Create(iii->Id(), iii->GetGeometry(), properties);
Condition::Pointer p_condition = rReferenceCondition.Create(iii->Id(), iii->GetGeometry().Points(), properties);
BaseSpAlType::mrSpalartModelPart.Conditions().push_back(p_condition);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class TrilinosStokesInitializationProcess : public StokesInitializationProcess<
// Generate Stokes elements
for (ModelPart::ElementsContainerType::iterator itElem = rReferenceModelPart.ElementsBegin(); itElem != rReferenceModelPart.ElementsEnd(); itElem++)
{
Element::Pointer pElem = rReferenceElement.Create(itElem->Id(), itElem->GetGeometry(), itElem->pGetProperties() );
Element::Pointer pElem = rReferenceElement.Create(itElem->Id(), itElem->GetGeometry().Points(), itElem->pGetProperties() );
rStokesModelPart.Elements().push_back(pElem);
rStokesModelPart.GetCommunicator().LocalMesh().Elements().push_back(pElem);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ModelPart& SetMultipleMovingLoadsProcess::CloneMovingConditionInComputeModelPart
for (auto& moving_load_condition : mrModelPart.Conditions()) {
index++;
const Condition::Pointer CloneCondition =
moving_load_condition.Clone(index, moving_load_condition.GetGeometry());
moving_load_condition.Clone(index, moving_load_condition.GetGeometry().Points());
new_model_part.AddCondition(CloneCondition);
}
return new_model_part;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ void MmgProcess<TMMGLibrary>::ExtrudeTrianglestoPrisms(ModelPart& rOldModelPart)
const GeometryType& r_geometry = r_elem.GetGeometry();

if (r_geometry.GetGeometryType() == GeometryData::KratosGeometryType::Kratos_Prism3D6) {
p_reference_element = r_elem.Create(0, r_elem.GetGeometry(), r_elem.pGetProperties());
p_reference_element = r_elem.Create(0, r_elem.GetGeometry().Points(), r_elem.pGetProperties());
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void NodalValuesInterpolationProcess<TDim>::GenerateBoundaryFromElements(
auto& r_elements_array = rModelPart.Elements();
for(IndexType i=0; i< r_elements_array.size(); ++i) {
auto it_elem = r_elements_array.begin() + i;
r_new_model_part.CreateNewCondition("SurfaceCondition3D3N", new_id + 1, it_elem->GetGeometry(), it_elem->pGetProperties());
r_new_model_part.CreateNewCondition("SurfaceCondition3D3N", new_id + 1, it_elem->GetGeometry().Points(), it_elem->pGetProperties());
++new_id;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class Cutting_Isosurface_Application
new_model_part.Nodes()(tetrahedra_nodes[3])
);

Element::Pointer p_element = rReferenceElement.Create(number_of_tetrahedras+1, geometry, properties);
Element::Pointer p_element = rReferenceElement.Create(number_of_tetrahedras+1, geometry.Points(), properties);
new_model_part.Elements().push_back(p_element);
++number_of_tetrahedras;
}
Expand Down Expand Up @@ -315,7 +315,7 @@ class Cutting_Isosurface_Application
new_model_part.Nodes()(triangle_nodes[1]),
new_model_part.Nodes()(triangle_nodes[2])
);
Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1, geometry, properties); //está bien? acá la verdad ni idea. sobre todo number_of_triangles (la posición). o debe ser un puntero de elemento en vez de un entero?
Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1, geometry.Points(), properties); //está bien? acá la verdad ni idea. sobre todo number_of_triangles (la posición). o debe ser un puntero de elemento en vez de un entero?
new_model_part.Conditions().push_back(p_condition);
++number_of_triangles;
}
Expand Down Expand Up @@ -1017,7 +1017,7 @@ class Cutting_Isosurface_Application
new_model_part.Nodes()(TriangleNodesArray[2])
);

Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1+first_element, geom, properties); //creating the element using the reference element. notice we are using the first element to avoid overriting nodes created by other cutting planes
Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1+first_element, geom.Points(), properties); //creating the element using the reference element. notice we are using the first element to avoid overriting nodes created by other cutting planes
new_model_part.Conditions().push_back(p_condition);
++number_of_triangles;

Expand Down Expand Up @@ -1182,7 +1182,7 @@ class Cutting_Isosurface_Application
new_model_part.Nodes()(nodes_for_2triang[index*3+2])
);

Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1+first_element, geom, properties);
Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1+first_element, geom.Points(), properties);

new_model_part.Conditions().push_back(p_condition);
++number_of_triangles;
Expand Down Expand Up @@ -1360,7 +1360,7 @@ class Cutting_Isosurface_Application
new_model_part.Nodes()(TriangleNodesArray[2])
);

Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1+first_element, geom, properties); //creating the element using the reference element. notice we are using the first element to avoid overriting nodes created by other cutting planes
Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1+first_element, geom.Points(), properties); //creating the element using the reference element. notice we are using the first element to avoid overriting nodes created by other cutting planes
new_model_part.Conditions().push_back(p_condition);
++number_of_triangles;

Expand Down Expand Up @@ -1495,7 +1495,7 @@ class Cutting_Isosurface_Application
new_model_part.Nodes()(nodes_for_2triang[index*3+2])
);

Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1+first_element, geom, properties);
Condition::Pointer p_condition = rReferenceCondition.Create(number_of_triangles+1+first_element, geom.Points(), properties);

new_model_part.Conditions().push_back(p_condition);
++number_of_triangles;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace Kratos {
// Generate the new Tetrahedra3D10 element
Tetrahedra3D10<Node> geom = GenerateTetrahedra(rThisModelPart, node_ids);
Element::Pointer p_element;
p_element = r_elem.Create(it->Id(), geom, it->pGetProperties());
p_element = r_elem.Create(it->Id(), geom.Points(), it->pGetProperties());
p_element->Initialize(r_current_process_info);
p_element->InitializeSolutionStep(r_current_process_info);
p_element->FinalizeSolutionStep(r_current_process_info);
Expand Down Expand Up @@ -215,7 +215,7 @@ namespace Kratos {
//Generate the new condition
Triangle3D6<Node > geom = GenerateTriangle3D6 (rThisModelPart, node_ids);
Condition::Pointer p_cond;
p_cond = r_cond.Create(it->Id(), geom, it->pGetProperties());
p_cond = r_cond.Create(it->Id(), geom.Points(), it->pGetProperties());
p_cond ->Initialize(r_current_process_info);
p_cond ->InitializeSolutionStep(r_current_process_info);
p_cond ->FinalizeSolutionStep(r_current_process_info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class LocalRefinePrismMesh : public LocalRefineGeometryMesh
);

Element::Pointer p_element;
p_element = it->Create(current_id, geom, it->pGetProperties());
p_element = it->Create(current_id, geom.Points(), it->pGetProperties());
p_element->Initialize(rCurrentProcessInfo);
p_element->InitializeSolutionStep(rCurrentProcessInfo);
p_element->FinalizeSolutionStep(rCurrentProcessInfo);
Expand Down Expand Up @@ -340,8 +340,8 @@ class LocalRefinePrismMesh : public LocalRefineGeometryMesh
this_model_part.Nodes()(geom[1].Id())
);

Condition::Pointer pcond1 = it->Create(current_id++, newgeom1, it->pGetProperties());
Condition::Pointer pcond2 = it->Create(current_id++, newgeom2, it->pGetProperties());
Condition::Pointer pcond1 = it->Create(current_id++, newgeom1.Points(), it->pGetProperties());
Condition::Pointer pcond2 = it->Create(current_id++, newgeom2.Points(), it->pGetProperties());

pcond1->GetData() = it->GetData();
pcond2->GetData() = it->GetData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class LocalRefineTetrahedraMesh : public LocalRefineGeometryMesh

// Generate new element by cloning the base one
Element::Pointer p_element;
p_element = it->Create(current_id, geom, it->pGetProperties());
p_element = it->Create(current_id, geom.Points(), it->pGetProperties());
p_element->Initialize(rCurrentProcessInfo);
p_element->InitializeSolutionStep(rCurrentProcessInfo);
p_element->FinalizeSolutionStep(rCurrentProcessInfo);
Expand Down Expand Up @@ -437,7 +437,7 @@ class LocalRefineTetrahedraMesh : public LocalRefineGeometryMesh

// Generate new condition by cloning the base one
Condition::Pointer pcond;
pcond = it->Create(current_id, newgeom, it->pGetProperties());
pcond = it->Create(current_id, newgeom.Points(), it->pGetProperties());
pcond ->Initialize(rCurrentProcessInfo);
pcond ->InitializeSolutionStep(rCurrentProcessInfo);
pcond ->FinalizeSolutionStep(rCurrentProcessInfo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ class LocalRefineTriangleMesh : public LocalRefineTriangleMeshGeneric<Element, M
this_model_part.Nodes()(geom[1].Id())
);

Condition::Pointer pcond1 = it->Create(current_id++, newgeom1, it->pGetProperties());
Condition::Pointer pcond2 = it->Create(current_id++, newgeom2, it->pGetProperties());
Condition::Pointer pcond1 = it->Create(current_id++, newgeom1.Points(), it->pGetProperties());
Condition::Pointer pcond2 = it->Create(current_id++, newgeom2.Points(), it->pGetProperties());

pcond1->GetData() = it->GetData();
pcond2->GetData() = it->GetData();
Expand All @@ -194,8 +194,8 @@ class LocalRefineTriangleMesh : public LocalRefineTriangleMeshGeneric<Element, M
this_model_part.Nodes()(geom[1].Id())
);

Condition::Pointer pcond1 = it->Create(current_id++, newgeom1, it->pGetProperties());
Condition::Pointer pcond2 = it->Create(current_id++, newgeom2, it->pGetProperties());
Condition::Pointer pcond1 = it->Create(current_id++, newgeom1.Points(), it->pGetProperties());
Condition::Pointer pcond2 = it->Create(current_id++, newgeom2.Points(), it->pGetProperties());

pcond1->GetData() = it->GetData();
pcond2->GetData() = it->GetData();
Expand Down
Loading
Loading