Skip to content
Snippets Groups Projects
Commit 54dfd636 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add get_mesh:Vh->mesh function to the language

It allows to get the mesh that carries a discrete function
parent b79fe22f
No related branches found
No related tags found
1 merge request!204Remove m_cell_global_index from Connectivity
...@@ -731,6 +731,20 @@ SchemeModule::SchemeModule() ...@@ -731,6 +731,20 @@ SchemeModule::SchemeModule()
)); ));
this->_addBuiltinFunction("get_mesh",
std::function(
[](const std::shared_ptr<const DiscreteFunctionVariant>& discrete_function_variant)
-> std::shared_ptr<const MeshVariant> {
return std::visit( //
[](auto&& discrete_function) {
return discrete_function.meshVariant(); //
},
discrete_function_variant->discreteFunction());
}
));
MathFunctionRegisterForVh{*this}; MathFunctionRegisterForVh{*this};
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment