v0.8.23
Public Types | Public Member Functions | Public Attributes | List of all members
MoFEM::FieldBlas Struct Reference

Basic algebra on fields. More...

#include <src/interfaces/FieldBlas.hpp>

Inheritance diagram for MoFEM::FieldBlas:
[legend]
Collaboration diagram for MoFEM::FieldBlas:
[legend]

Public Types

typedef boost::function< MoFEMErrorCode(double &, const double)> TwoFieldFunction
 
typedef boost::function< MoFEMErrorCode(VectorAdaptor &field_data, double *xcoord, double *ycoord, double *zcoord)> VertexCoordsFunction
 

Public Member Functions

MoFEMErrorCode query_interface (const MOFEMuuid &uuid, UnknownInterface **iface) const
 
 FieldBlas (const MoFEM::Core &core)
 
 ~FieldBlas ()
 Destructor. More...
 
MoFEMErrorCode fieldLambda (TwoFieldFunction lambda, const std::string field_name_x, const std::string field_name_y, bool error_if_missing=false, bool creat_if_missing=false)
 filed lambdaDo calculation on two fields and save result to field fy More...
 
MoFEMErrorCode fieldAxpy (const double alpha, const std::string field_name_x, const std::string field_name_y, bool error_if_missing=false, bool creat_if_missing=false)
 axpy fieldsfield_y = field_y + alpha*field_x More...
 
MoFEMErrorCode fieldCopy (const double alpha, const std::string field_name_x, const std::string field_name_y, bool error_if_missing=false, bool creat_if_missing=false)
 copy and scale fieldsfield_y = alpha*field_x More...
 
MoFEMErrorCode setVertexDofs (VertexCoordsFunction lambda, const std::string field_name, Range *verts=nullptr)
 Set DOFs on vertices using user functionExample: More...
 
MoFEMErrorCode setField (const double val, const EntityType type, const std::string field_name)
 scale field More...
 
MoFEMErrorCode setField (const double val, const EntityType type, const Range &ents, const std::string field_name)
 set fieldfield_y = val More...
 
MoFEMErrorCode setField (const double val, const std::string field_name)
 set fieldfield_y = val More...
 
MoFEMErrorCode fieldScale (const double alpha, const std::string field_name)
 set fieldfield_y = val More...
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (const MOFEMuuid &uuid, bool error_if_registration_failed=true)
 Register interface. More...
 
template<class IFACE , bool VERIFY = false>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, IFACE *&iface) const
 Get interface by uuid and return reference to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface refernce to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE **const iface) const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get reference to interface. More...
 
template<class IFACE >
IFACE * getInterface () const
 Function returning pointer to interface. More...
 
virtual ~UnknownInterface ()
 
virtual MoFEMErrorCode getLibVersion (Version &version) const
 Get library version. More...
 
virtual const MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version) const
 Get database major version. More...
 
virtual MoFEMErrorCode getInterfaceVersion (Version &version) const
 Get database major version. More...
 
template<>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, UnknownInterface *&iface) const
 

Public Attributes

const MoFEM::InterfacecOre
 
bool dEbug
 

Additional Inherited Members

- Protected Member Functions inherited from MoFEM::UnknownInterface
boost::typeindex::type_index getClassIdx (const MOFEMuuid &uid) const
 Get type name for interface Id. More...
 
MOFEMuuid getUId (const boost::typeindex::type_index &class_idx) const
 Get interface Id for class name. More...
 

Detailed Description

Basic algebra on fields.

Examples
elasticity.cpp, field_axpy_atom_test.cpp, field_blas_set_vertex_dofs.cpp, mesh_smoothing.cpp, reaction_diffusion_equation.cpp, and Remodeling.cpp.

Definition at line 34 of file FieldBlas.hpp.

Member Typedef Documentation

◆ TwoFieldFunction

typedef boost::function<MoFEMErrorCode(double &, const double)> MoFEM::FieldBlas::TwoFieldFunction

Definition at line 50 of file FieldBlas.hpp.

◆ VertexCoordsFunction

typedef boost::function<MoFEMErrorCode(VectorAdaptor &field_data, double *xcoord, double *ycoord, double *zcoord)> MoFEM::FieldBlas::VertexCoordsFunction

Definition at line 124 of file FieldBlas.hpp.

Constructor & Destructor Documentation

◆ FieldBlas()

MoFEM::FieldBlas::FieldBlas ( const MoFEM::Core core)

Definition at line 34 of file FieldBlas.cpp.

35  : cOre(const_cast<MoFEM::Core &>(core)), dEbug(false) {}
const MoFEM::Interface & cOre
Definition: FieldBlas.hpp:39

◆ ~FieldBlas()

MoFEM::FieldBlas::~FieldBlas ( )

Destructor.

Definition at line 36 of file FieldBlas.cpp.

36 {}

Member Function Documentation

◆ query_interface()

MoFEMErrorCode MoFEM::FieldBlas::query_interface ( const MOFEMuuid uuid,
UnknownInterface **  iface 
) const
virtual

Implements MoFEM::UnknownInterface.

Definition at line 22 of file FieldBlas.cpp.

23  {
25  *iface = NULL;
26  if (uuid == IDD_MOFEMFieldBlas) {
27  *iface = const_cast<FieldBlas *>(this);
29  }
30  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "unknown interface");
32 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
static const MOFEMuuid IDD_MOFEMFieldBlas
Definition: FieldBlas.hpp:26

Member Data Documentation

◆ cOre

const MoFEM::Interface& MoFEM::FieldBlas::cOre

Definition at line 39 of file FieldBlas.hpp.

◆ dEbug

bool MoFEM::FieldBlas::dEbug

Definition at line 40 of file FieldBlas.hpp.


The documentation for this struct was generated from the following files: