v0.14.0
MethodForForceScaling.hpp
Go to the documentation of this file.
1 /* \fiele MethodForForceScaling.hpp
2 
3 */
4 
5 
6 
7 #ifndef __METHOD_FOR_FORCE_SCALING_HPP__
8 #define __METHOD_FOR_FORCE_SCALING_HPP__
9 
10 /// Class used to scale loads, f.e. in arc-length control
12 
13  virtual MoFEMErrorCode scaleNf(const FEMethod *fe, VectorDouble &Nf) = 0;
14  virtual MoFEMErrorCode getForceScale(const double ts_t, double &scale) {
16  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented");
18  }
19 
20  static MoFEMErrorCode
21  applyScale(const FEMethod *fe,
22  boost::ptr_vector<MethodForForceScaling> &methods_op,
23  VectorDouble &nf) {
25  for (auto vit = methods_op.begin(); vit != methods_op.end(); vit++)
26  CHKERR vit->scaleNf(fe, nf);
28  }
29 
30  static MoFEMErrorCode
31  applyScale(const FEMethod *fe,
32  boost::shared_ptr<MethodForForceScaling> method_op,
33  VectorDouble &nf) {
35  CHKERR method_op->scaleNf(fe, nf);
37  }
38 
40 };
41 
42 #endif //__METHOD_FOR_FORCE_SCALING_HPP__
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
MethodForForceScaling::~MethodForForceScaling
virtual ~MethodForForceScaling()
Definition: MethodForForceScaling.hpp:39
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MethodForForceScaling::scaleNf
virtual MoFEMErrorCode scaleNf(const FEMethod *fe, VectorDouble &Nf)=0
FEMethod
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
ContactOps::scale
double scale
Definition: EshelbianContact.hpp:22
MethodForForceScaling::applyScale
static MoFEMErrorCode applyScale(const FEMethod *fe, boost::shared_ptr< MethodForForceScaling > method_op, VectorDouble &nf)
Definition: MethodForForceScaling.hpp:31
MethodForForceScaling
Class used to scale loads, f.e. in arc-length control.
Definition: MethodForForceScaling.hpp:11
MethodForForceScaling::getForceScale
virtual MoFEMErrorCode getForceScale(const double ts_t, double &scale)
Definition: MethodForForceScaling.hpp:14
MoFEM::Types::VectorDouble
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
MethodForForceScaling::applyScale
static MoFEMErrorCode applyScale(const FEMethod *fe, boost::ptr_vector< MethodForForceScaling > &methods_op, VectorDouble &nf)
Definition: MethodForForceScaling.hpp:21
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MOFEM_NOT_IMPLEMENTED
@ MOFEM_NOT_IMPLEMENTED
Definition: definitions.h:32
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346