v0.10.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 /*
11  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
18  */
19 
20 #include <CoordSysMultiIndices.hpp>
21 #include <CoordSystemsManager.hpp>
22 #include <LogManager.hpp>
23 #include <BitRefManager.hpp>
24 #include <MeshsetsManager.hpp>
25 #include <SeriesRecorder.hpp>
26 
27 namespace MoFEM {
28 
30 
31 template <int N>
33  int verb) {
34  return this->setMoabInterface(new_moab, verb);
35 };
36 
37 template <int N>
38 boost::shared_ptr<RefEntityTmp<0>>
40  return Core::makeSharedRefEntity(*this, ent);
41 }
42 
43 template <int V>
44 CoreTmp<0>::CoreTmp(moab::Interface &moab, MPI_Comm comm, const int verbose,
46  : moab(moab), cOmm(0), verbose(verbose),
47  initaliseAndBuildField(PETSC_FALSE),
48  initaliseAndBuildFiniteElements(PETSC_FALSE) {
49 
50  ierr = coreGenericConstructor(moab, comm, verbose);
51  CHKERRABORT(comm, ierr);
52 
53  if (verbose > QUIET) {
54  MOFEM_LOG_CHANNEL("WORLD");
55  MOFEM_LOG_C("WORLD", Sev::verbose, "Core number < %d >", V);
56  }
57 }
58 
59 template <int N>
60 CoreTmp<N>::CoreTmp(moab::Interface &moab, ///< MoAB interface
61  MPI_Comm comm, ///< MPI communicator
62  const int verbose ///< Verbosity level
63  )
64  : CoreTmp<N - 1>(moab, comm, verbose, CoreValue<N>()) {
65 
66  // Register sub-interfaces
67  ierr = this->registerSubInterfaces();
68  CHKERRABORT(comm, ierr);
69  ierr = this->clearMap();
70  CHKERRABORT(comm, ierr);
71  ierr = this->getTags();
72  CHKERRABORT(comm, ierr);
73  ierr = this->getOptions(verbose);
74  CHKERRABORT(comm, ierr);
75 
76  this->basicEntityDataPtr = boost::make_shared<BasicEntityData>(moab);
77  this->setRefEntBasicDataPtr(*this, this->basicEntityDataPtr);
78 
79  ierr = this->initialiseDatabaseFromMesh(verbose);
80  CHKERRABORT(comm, ierr);
81 }
82 
83 } // namespace MoFEM
MeshsetsManager interface.
CoreTmp(moab::Interface &moab, MPI_Comm comm=PETSC_COMM_WORLD, const int verbose=VERBOSE)
SeverityLevel
Severity levels.
Definition: LogManager.hpp:46
MoFEMErrorCode set_moab_interface(moab::Interface &new_moab, int verb)
Interface managing coordinate systems set to fields.
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:306
static boost::shared_ptr< RefEntityTmp< 0 > > makeSharedRefEntity(MoFEM::Interface &m_field, const EntityHandle ent)
Definition: Core.cpp:938
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
MoFEM interface.
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:87
Coordinate systems attached to DOFs.
Interface managing BitRefLevelsManaging BitRef levels.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:67
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:279
virtual boost::shared_ptr< RefEntityTmp< 0 > > make_shared_ref_entity(const EntityHandle ent)
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1943
const int N
Definition: speed_test.cpp:3
Log and register warnings.