Skip to content

Adding setTemperatureBC method to HeatTransfer that uses Domain#1551

Open
kswartz92 wants to merge 2 commits intodevelopfrom
swartz10/addTemperatureBCByDomain
Open

Adding setTemperatureBC method to HeatTransfer that uses Domain#1551
kswartz92 wants to merge 2 commits intodevelopfrom
swartz10/addTemperatureBCByDomain

Conversation

@kswartz92
Copy link
Contributor

I was recently using smith::HeatTransfer and was frustrated by the lack of method to set essential bc's (temperature in this case) on a smith::Domain. I added a method to do so, but since the plan is to move away from the monolithic HeatTransfer class in heat_transfer.hpp in the near future, I did not want to break the interface by removing the old method in case others are still using it. I did switch the thermal statics patch test to the new essential bc method to make sure it works as expected.

});
temp_bdr_coef_ = std::make_shared<mfem::FunctionCoefficient>(mfem_coefficient_function);
auto dof_list = domain.dof_list(&temperature_.space());
bcs_.addEssential(dof_list, temp_bdr_coef_, temperature_.space(), 0);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I originally tried to write this line without providing the std::optional<int> component, but that caused the test to seg fault. If I provide the 0 the test passes, but I don't understand why I need to provide a component for a scalar field. Any ideas @btalamini @tupek2 ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I remember seeing this before. I think the path where you dont specify the int is just implemented wrong somewhere down in the depths. We should probably get rid of that option and force the component to always be passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants