Simplified mofem interface

37 views
Skip to first unread message

Lukasz Kaczmraczyk

unread,
Jun 4, 2017, 1:05:29 PM6/4/17
to mofem...@googlegroups.com
Hello,

In MoFEM you can ask for various type of interfaces, for meshset manager
MeshsetsManager *meshsets_manager_ptr;
ierr
= m_field.query_interface(meshsets_manager_ptr); CHKERRQ(ierr);
or problem manager
ProblemsManager *prb_mng_ptr;
ierr
= m_field.query_interface(prb_mng_ptr); CHKERRQ(ierr);
ierr
= prb_mng_ptr->partitionMesh(tets,3,2,m_field.get_comm_size()); CHKERRQ(ierr);
and many others.

Interfaces are designed to do some strictly dedicated tasks.  The core interface MoFEM::Interface aims to manage core database storing data about degrees of freedom, finite elements and problems. At first sight, it looks complex since is designed to handle complicated coupled problems. I like to create simplified interface, 
SimpleInterface *simple_ptr;
ierr
= m_field.query_interface(simple_ptr); CHKERRQ(ierr);
It should manage only problems where files are on all entities in meshset (by default root meshset). Only two types elements are added, the 3d element on all entities, and 2d element on body skin only. In fact, I like to make it work for 2d and 3d problems transparently. The developer does not construct finite elements, problem bytes, interface doing that for him. Is that make sense for you?

User job will be to add fields and implement uses data operators. He will have three options, to run linear problem, nonlinear (SNES) or time dependent (TS). The solver will be constructed for him, he will just call the appropriate function. That will help new people for a smooth & easy start, can be used for quick implementation and testing. What do you think?

What functions/methods you will have there in such interface? For example problem setup will look at this,

simple_ptr->addField(field_name,space,base,nb_coefficients);
simple_ptr->setUp();
// Add users modules here ??
simple_ptr->domainAssemble(fe_domain);
simple_ptr->boundaryAssemble(fe_domain);
simple_ptr->kspSolve();
// simple_ptr
->snesSolve();
// simple_ptr
->tsSolve();
simple_ptr
->postProces(file_name);
Any advise is very welcome. 

We have to implement set of differential opperatorsr  fo typical tasks like \int gard V : A grad U dV. In futer such interface could be further simplified, that user will only give fields & operators, as results ending up with fenics like functionality (in c++), but where differential operators are stack & set up dynamically similarly to what is PETSc with preconditioners.

Regards,
Lukasz

Lukasz Kaczmraczyk

unread,
Jun 26, 2017, 3:52:42 AM6/26/17
to mofem Group
First examples with "SImple" interface,

Poisson problem with analytical solution,

Calculation of volume form divergence theorem,
Reply all
Reply to author
Forward
0 new messages