Skip to content

[Core] New Create method for processes#13708

Merged
loumalouomega merged 7 commits intoKratosMultiphysics:masterfrom
loumalouomega:core/new-create-methods-processes
Aug 11, 2025
Merged

[Core] New Create method for processes#13708
loumalouomega merged 7 commits intoKratosMultiphysics:masterfrom
loumalouomega:core/new-create-methods-processes

Conversation

@loumalouomega
Copy link
Member

📝 Description

Adding new Create method for some core processes.

🆕 Changelog

* Implementing a `Create` method for several processes.

* Some clean up

* More clean up

* Even more clean up

* Minor refactor
@loumalouomega loumalouomega requested a review from a team as a code owner August 9, 2025 17:53
@loumalouomega loumalouomega added Kratos Core FastPR This Pr is simple and / or has been already tested and the revision should be fast labels Aug 9, 2025
@loumalouomega loumalouomega enabled auto-merge August 9, 2025 17:53
loumalouomega and others added 2 commits August 9, 2025 21:27
Co-authored-by: Máté Kelemen <44344022+matekelemen@users.noreply.github.com>
{
const std::string master_model_part_name = ThisParameters["master_model_part_name"].GetString();
const std::string slave_model_part_name = ThisParameters["slave_model_part_name"].GetString();
return Kratos::make_unique<ApplyPeriodicConditionProcess>(rModel.GetModelPart(master_model_part_name), rModel.GetModelPart(slave_model_part_name), ThisParameters);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't' this be a shared_ptr?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait how does this even compile?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow OK this is by design.

Look at overload 13:
https://en.cppreference.com/w/cpp/memory/shared_ptr/shared_ptr.html

I guess unique => shared is a safe conversion, but not the other way around.

@loumalouomega loumalouomega merged commit 77c0d9c into KratosMultiphysics:master Aug 11, 2025
10 checks passed
@loumalouomega loumalouomega deleted the core/new-create-methods-processes branch August 11, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FastPR This Pr is simple and / or has been already tested and the revision should be fast Kratos Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants