v0.14.0
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 
15 namespace MoFEM {
16 
18 
19 template <int N>
21  int verb) {
22  return this->setMoabInterface(new_moab, verb);
23 };
24 
25 template <int N>
26 boost::shared_ptr<RefEntityTmp<0>>
28  return Core::makeSharedRefEntity(*this, ent);
29 }
30 
31 template <int V>
32 CoreTmp<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 
47 template <int N>
48 CoreTmp<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
MOFEM_LOG_CHANNEL
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:284
EntityHandle
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::CoreTmp::make_shared_ref_entity
virtual boost::shared_ptr< RefEntityTmp< 0 > > make_shared_ref_entity(const EntityHandle ent)
Definition: CoreTemplates.hpp:27
LogManager.hpp
Log and register warnings.
MoFEM::CoreTmp< 0 >::makeSharedRefEntity
static boost::shared_ptr< RefEntityTmp< 0 > > makeSharedRefEntity(MoFEM::Interface &m_field, const EntityHandle ent)
Definition: Core.cpp:928
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
BitRefManager.hpp
Interface managing BitRefLevels.
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
SeriesRecorder.hpp
MoFEM interface.
MoFEM::CoreTmp::CoreTmp
CoreTmp(moab::Interface &moab, MPI_Comm comm=PETSC_COMM_WORLD, const int verbose=VERBOSE)
Definition: CoreTemplates.hpp:48
MOFEM_LOG_C
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:311
MoFEM::CoreTmp
Definition: Core.hpp:36
MoFEM::LogManager::SeverityLevel
SeverityLevel
Severity levels.
Definition: LogManager.hpp:33
N
const int N
Definition: speed_test.cpp:3
MoFEM::CoreValue
Definition: Core.hpp:34
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
MoFEM::CoreTmp::set_moab_interface
MoFEMErrorCode set_moab_interface(moab::Interface &new_moab, int verb)
Definition: CoreTemplates.hpp:20
QUIET
@ QUIET
Definition: definitions.h:221
MeshsetsManager.hpp
MeshsetsManager interface.