v0.14.0
Public Member Functions | Public Attributes | List of all members
MetaNodalForces::TagForceScale Struct Reference

Scale force based on tag value "_LoadFactor_Scale_". More...

#include <users_modules/basic_finite_elements/src/NodalForce.hpp>

Inheritance diagram for MetaNodalForces::TagForceScale:
[legend]
Collaboration diagram for MetaNodalForces::TagForceScale:
[legend]

Public Member Functions

 TagForceScale (MoFEM::Interface &m_field)
 
MoFEMErrorCode scaleNf (const FEMethod *fe, VectorDouble &Nf)
 
- Public Member Functions inherited from MethodForForceScaling
virtual MoFEMErrorCode getForceScale (const double ts_t, double &scale)
 
virtual ~MethodForForceScaling ()
 
virtual MoFEMErrorCode getForceScale (const double ts_t, double &scale)
 
virtual ~MethodForForceScaling ()
 

Public Attributes

MoFEM::InterfacemField
 
doublesCale
 
Tag thScale
 

Additional Inherited Members

- Static Public Member Functions inherited from MethodForForceScaling
static MoFEMErrorCode applyScale (const FEMethod *fe, boost::ptr_vector< MethodForForceScaling > &methods_op, VectorDouble &nf)
 
static MoFEMErrorCode applyScale (const FEMethod *fe, boost::shared_ptr< MethodForForceScaling > method_op, VectorDouble &nf)
 
static MoFEMErrorCode applyScale (const FEMethod *fe, boost::ptr_vector< MethodForForceScaling > &methods_op, VectorDouble &nf)
 
static MoFEMErrorCode applyScale (const FEMethod *fe, boost::shared_ptr< MethodForForceScaling > method_op, VectorDouble &nf)
 

Detailed Description

Scale force based on tag value "_LoadFactor_Scale_".

This is obsolete, is kept to have back compatibility with fracture code.

Definition at line 66 of file NodalForce.hpp.

Constructor & Destructor Documentation

◆ TagForceScale()

MetaNodalForces::TagForceScale::TagForceScale ( MoFEM::Interface m_field)

Definition at line 84 of file NodeForce.cpp.

85  : mField(m_field) {
86 
87  double def_scale = 1.;
88  const EntityHandle root_meshset = mField.get_moab().get_root_set();
89  rval = mField.get_moab().tag_get_handle(
90  "_LoadFactor_Scale_", 1, MB_TYPE_DOUBLE, thScale,
91  MB_TAG_CREAT | MB_TAG_EXCL | MB_TAG_MESH, &def_scale);
92  if (rval == MB_ALREADY_ALLOCATED) {
93  rval = mField.get_moab().tag_get_by_ptr(thScale, &root_meshset, 1,
94  (const void **)&sCale);
96  } else {
98  rval =
99  mField.get_moab().tag_set_data(thScale, &root_meshset, 1, &def_scale);
100  MOAB_THROW(rval);
101  rval = mField.get_moab().tag_get_by_ptr(thScale, &root_meshset, 1,
102  (const void **)&sCale);
103  MOAB_THROW(rval);
104  }
105 }

Member Function Documentation

◆ scaleNf()

MoFEMErrorCode MetaNodalForces::TagForceScale::scaleNf ( const FEMethod fe,
VectorDouble &  Nf 
)
virtual

Implements MethodForForceScaling.

Definition at line 107 of file NodeForce.cpp.

108  {
110  Nf *= *sCale;
112 }

Member Data Documentation

◆ mField

MoFEM::Interface& MetaNodalForces::TagForceScale::mField

Definition at line 67 of file NodalForce.hpp.

◆ sCale

double* MetaNodalForces::TagForceScale::sCale

Definition at line 68 of file NodalForce.hpp.

◆ thScale

Tag MetaNodalForces::TagForceScale::thScale

Definition at line 69 of file NodalForce.hpp.


The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
MetaNodalForces::TagForceScale::sCale
double * sCale
Definition: NodalForce.hpp:68
EntityHandle
MetaNodalForces::TagForceScale::thScale
Tag thScale
Definition: NodalForce.hpp:69
MOAB_THROW
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:554
MoFEM::Exceptions::rval
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:74
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MetaNodalForces::TagForceScale::mField
MoFEM::Interface & mField
Definition: NodalForce.hpp:67
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453