v0.15.0
Loading...
Searching...
No Matches
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);
101 rval = mField.get_moab().tag_get_by_ptr(thScale, &root_meshset, 1,
102 (const void **)&sCale);
104 }
105}
#define MOAB_THROW(err)
Check error code of MoAB function and throw MoFEM exception.
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
virtual moab::Interface & get_moab()=0

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}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...

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: