New version v0.5.94

13 views
Skip to first unread message

Lukasz Kaczmraczyk

unread,
Oct 25, 2017, 3:37:56 PM10/25/17
to mofem...@googlegroups.com
Hello,

The new version changes a way how interfaces could be accessed. Old way still working but is deprecated. 

MoFEM is database tailored for finite element analysis. Access to that database is by interfaces, which allow to add data and do operations on them. Interfaces provide versatile functionality and abstraction and are designed to enable access and use of MoFEM without minimal modification of existing programs yet allow flexible development and adding new functionalities. Moreover, with interfaces, we can break down complex code on smaller problems tested independently, yet hide complexities when not needed. The motivation of interface is to have code small yet extendable.

MoFEM provides MoFEM:: CoreInterface and MoFEM:: DeprecatedInterface, both enables essential access to the database, like definition and declaration of fields, finite elements and problems. MoFEM:: DeprecatedCoreInterface is set of obsolete functions, which are for back compatibility.

// Create moab databse
moab
::Core mb_instance;
// Access moab database by interface
moab
::Interface &moab = mb_instance;

// Create MoFEM database
MoFEM::Core core(moab);
// Acces MoFEM databse by Interface
MoFEM::Interface &m_field = core;


The default interface is MoFEM::Interface which is an alias of MoFEM:: DeprecatedCoreInterface. In future versions of MoFEM, that will be changed to MoFEM:: CoreInterface. Currently, you can access both interfaces, for example in explicitly

MoFEM::CoreInterface &m_field_core = core;
MoFEM::DeprecatedCoreInterface &m_field_deprecated = core;
or implicitly
MoFEM::CoreInterface *m_core_field_ptr =
        core
.getInterface<MoFEM::CoreInterface>();
MoFEM::DeprecatedCoreInterface *m_deprecated_core_field_ptr =
        core
.getInterface<MoFEM::DeprecatedCoreInterface>();

MoFEM provides as well or range of interfaces for performing range of options, like mesh partitioning, problem partitioning and enumeration of DOFS in problems, see 
MoFEM::ProblemManager *problem_manager_ptr = core.getInterface<MoFEM::ProblemManager>();
or interface with simplified abstraction for beginning users,
MoFEM::Simple *simple_ptr = core.getInterface<MoFEM::Simple>();
or more specific interfaces like BitRefManager, NodeMerger, CutMeshInterface. MeshRefiner, and more.

Note that you can access other interfaces from core interface, for example 
MoFEM::CoreInterface &m_field = core;
MoFEM::ProblemManager *problem_manager_ptr = m_field.getInterface<MoFEM::ProblemManager>();

The new version of MoFEM has improved efficiency for the build of finite elements; it was tested with clang-9.0.0 and many changes related to code formatting and overall code robustness.

Note that we use clang-format with LLVM style to format code.

Regards,
Lukasz
Reply all
Reply to author
Forward
0 new messages