Commit 886d2b27 authored by GILLES Sebastien's avatar GILLES Sebastien

#1249 Model: add morefem_data_ reference as data attribute.

parent 68c3f1d9
......@@ -299,8 +299,18 @@ namespace MoReFEM
*/
bool DoPrintBanner() const noexcept;
/*!
* \brief Accessor to the underlying \a MoReFEMData object.
*
* \return Constant reference to the \a MoReFEMData object.
*/
const morefem_data_type& GetMoReFEMData() const noexcept;
private:
//! Reference to the \a MoReFEMData object.
const morefem_data_type& morefem_data_;
//! Transient parameters.
TimeManager::unique_ptr time_manager_ = nullptr;
......
......@@ -28,6 +28,7 @@ namespace MoReFEM
create_domain_list_for_coords a_create_domain_list_for_coords,
print_banner do_print_banner)
: Crtp::CrtpMpi<Model<DerivedT, MoReFEMDataT, DoConsiderProcessorWiseLocal2GlobalT>>(morefem_data.GetMpi()),
morefem_data_(morefem_data),
output_directory_(morefem_data.GetResultDirectory()),
do_print_banner_(do_print_banner)
{
......@@ -657,6 +658,19 @@ namespace MoReFEM
}
template
<
class DerivedT,
class MoReFEMDataT,
DoConsiderProcessorWiseLocal2Global DoConsiderProcessorWiseLocal2GlobalT
>
inline const typename Model<DerivedT, MoReFEMDataT, DoConsiderProcessorWiseLocal2GlobalT>::morefem_data_type&
Model<DerivedT, MoReFEMDataT, DoConsiderProcessorWiseLocal2GlobalT>::GetMoReFEMData() const noexcept
{
return morefem_data_;
}
} // namespace MoReFEM
......
......@@ -17,7 +17,7 @@ add_executable(MoReFEMTestOperatorTestFunctions
)
target_link_libraries(MoReFEMTestOperatorTestFunctions
${ALL_LOAD_BEGIN_FLAG}
${MOREFEM_MODEL}
${ALL_LOAD_END_FLAG}
${ALL_LOAD_BEGIN_FLAG}
${MOREFEM_MODEL}
${ALL_LOAD_END_FLAG}
MoReFEM_test_tools)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment