v0.9.0
BaseFunction.cpp
Go to the documentation of this file.
1 /** \file BaseFunction.cpp
2  * \brief implementation of multi-grid solver for p- adaptivity
3  *
4  * MoFEM is free software: you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License as published by the
6  * Free Software Foundation, either version 3 of the License, or (at your
7  * option) any later version.
8  *
9  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12  * License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
16  */
17 
18 namespace MoFEM {
19 
22  BaseFunctionUnknownInterface **iface) const {
24  *iface = NULL;
25  if (uuid == IDD_UNKNOWN_BASE_FUNCTION) {
26  *iface = const_cast<BaseFunctionCtx *>(this);
28  } else {
29  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "wrong interference");
30  }
32 }
33 
36  BaseFunctionUnknownInterface **iface) const {
38  *iface = NULL;
39  if (uuid == IDD_UNKNOWN_BASE_FUNCTION) {
40  *iface = const_cast<BaseFunction *>(this);
42  } else {
43  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY, "wrong interference");
44  }
46 }
47 
50  boost::shared_ptr<BaseFunctionCtx> ctx_ptr) {
52  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
53  "BaseFunction has not valid implementation of any shape function");
55 }
56 
59  boost::shared_ptr<BaseFunctionCtx> ctx_ptr) {
61  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
62  "BaseFunction has not valid implementation of any shape function");
64 }
65 
66 } // namespace MoFEM
MoFEM interface unique ID.
MoFEMErrorCode query_interface(const MOFEMuuid &uuid, BaseFunctionUnknownInterface **iface) const
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
MoFEMErrorCode query_interface(const MOFEMuuid &uuid, MoFEM::BaseFunctionUnknownInterface **iface) const
ublas::matrix< double, ublas::row_major, DoubleAllocator > MatrixDouble
Definition: Types.hpp:74
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:66
static const MOFEMuuid IDD_UNKNOWN_BASE_FUNCTION
virtual MoFEMErrorCode getValue(MatrixDouble &pts, boost::shared_ptr< BaseFunctionCtx > ctx_ptr)