v0.13.1
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
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
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__
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
@ MOFEM_NOT_IMPLEMENTED
Definition: definitions.h:32
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
UBlasVector< double > VectorDouble
Definition: Types.hpp:68
double scale
Definition: plastic.cpp:94
Class used to scale loads, f.e. in arc-length control.
virtual MoFEMErrorCode getForceScale(const double ts_t, double &scale)
virtual MoFEMErrorCode scaleNf(const FEMethod *fe, VectorDouble &Nf)=0
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)