v0.13.1
Loading...
Searching...
No Matches
CoreTemplates.hpp
Go to the documentation of this file.
1/** \file CoreTemplates.hpp
2 * \brief Core interface class for user interface
3 *
4 * Low level data structures not used directly by user
5 *
6 * FIXME It is a mess with names of core cpp files need better organization
7 *
8 */
9
10#include <LogManager.hpp>
11#include <BitRefManager.hpp>
12#include <MeshsetsManager.hpp>
13#include <SeriesRecorder.hpp>
14
15namespace MoFEM {
16
18
19template <int N>
21 int verb) {
22 return this->setMoabInterface(new_moab, verb);
23};
24
25template <int N>
26boost::shared_ptr<RefEntityTmp<0>>
28 return Core::makeSharedRefEntity(*this, ent);
29}
30
31template <int V>
32CoreTmp<0>::CoreTmp(moab::Interface &moab, MPI_Comm comm, const int verbose,
34 : moab(moab), mofemComm(comm), verbose(verbose),
35 initaliseAndBuildField(PETSC_FALSE),
36 initaliseAndBuildFiniteElements(PETSC_FALSE) {
37
38 ierr = coreGenericConstructor(moab, comm, verbose);
39 CHKERRABORT(comm, ierr);
40
41 MOFEM_LOG_CHANNEL("WORLD");
42 if (verbose > QUIET) {
43 MOFEM_LOG_C("WORLD", Sev::verbose, "Core number < %d >", V);
44 }
45}
46
47template <int N>
48CoreTmp<N>::CoreTmp(moab::Interface &moab, ///< MoAB interface
49 MPI_Comm comm, ///< MPI communicator
50 const int verbose ///< Verbosity level
51 )
52 : CoreTmp<N - 1>(moab, comm, verbose, CoreValue<N>()) {
53
54 // Register sub-interfaces
55 ierr = this->registerSubInterfaces();
56 CHKERRABORT(comm, ierr);
57 ierr = this->clearMap();
58 CHKERRABORT(comm, ierr);
59 ierr = this->getTags();
60 CHKERRABORT(comm, ierr);
61 ierr = this->getOptions(verbose);
62 CHKERRABORT(comm, ierr);
63
64 this->basicEntityDataPtr = boost::make_shared<BasicEntityData>(moab);
65 this->setRefEntBasicDataPtr(*this, this->basicEntityDataPtr);
66
67 ierr = this->initialiseDatabaseFromMesh(verbose);
68 CHKERRABORT(comm, ierr);
69
70 MOFEM_LOG_CHANNEL("WORLD");
71}
72
73} // namespace MoFEM
Interface managing BitRefLevels.
Log and register warnings.
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:304
MeshsetsManager interface.
MoFEM interface.
@ QUIET
Definition: definitions.h:208
SeverityLevel
Severity levels.
Definition: LogManager.hpp:33
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:277
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
const int N
Definition: speed_test.cpp:3
static boost::shared_ptr< RefEntityTmp< 0 > > makeSharedRefEntity(MoFEM::Interface &m_field, const EntityHandle ent)
Definition: Core.cpp:894
MoFEMErrorCode set_moab_interface(moab::Interface &new_moab, int verb)
CoreTmp(moab::Interface &moab, MPI_Comm comm=PETSC_COMM_WORLD, const int verbose=VERBOSE)
virtual boost::shared_ptr< RefEntityTmp< 0 > > make_shared_ref_entity(const EntityHandle ent)