|
| v0.14.0
|
Go to the documentation of this file.
12 #ifndef __ARC_LENGTH_TOOLS_HPP__
13 #define __ARC_LENGTH_TOOLS_HPP__
87 SmartPetscObj<Vec>
x0;
88 SmartPetscObj<Vec>
dx;
127 #ifdef __SNESCTX_HPP__
133 struct ArcLengthSnesCtx :
public SnesCtx {
136 ArcLengthSnesCtx(
MoFEM::Interface &m_field,
const std::string &problem_name,
138 :
SnesCtx(m_field, problem_name), arcPtrRaw(arc_ptr_raw) {}
140 ArcLengthSnesCtx(
MoFEM::Interface &m_field,
const std::string &problem_name,
141 boost::shared_ptr<ArcLengthCtx> arc_ptr)
142 :
SnesCtx(m_field, problem_name), arcPtrRaw(arc_ptr.get()),
146 boost::shared_ptr<ArcLengthCtx> arcPtr;
149 #endif //__SNESCTX_HPP__
157 struct ArcLengthTsCtx :
public TsCtx {
162 const std::string &problem_name,
164 : TsCtx(m_field, problem_name), arcPtrRaw(arc_ptr_raw) {}
167 boost::shared_ptr<ArcLengthCtx> arc_ptr)
168 : TsCtx(m_field, problem_name), arcPtrRaw(arc_ptr.get()),
172 boost::shared_ptr<ArcLengthCtx> arcPtr;
175 #endif // __TSCTX_HPP__
212 string problem_name);
217 string problem_name);
238 SmartPetscObj<PC>
pC;
243 boost::shared_ptr<ArcLengthCtx> arc_ptr);
246 boost::shared_ptr<ArcLengthCtx> arc_ptr);
287 ZeroFLmabda(boost::shared_ptr<ArcLengthCtx> arc_ptr);
292 #ifdef __DIRICHLET_HPP__
300 struct AssembleFlambda :
public FEMethod {
302 boost::shared_ptr<ArcLengthCtx> arcPtr;
304 AssembleFlambda(boost::shared_ptr<ArcLengthCtx> arc_ptr,
305 boost::shared_ptr<DirichletDisplacementBc> bc =
306 boost::shared_ptr<DirichletDisplacementBc>());
312 inline void pushDirichletBC(boost::shared_ptr<DirichletDisplacementBc> bc) {
317 std::vector<boost::shared_ptr<DirichletDisplacementBc>> bCs;
340 const bool assemble =
false);
415 #endif // __ARC_LENGTH_TOOLS_HPP__
double res_lambda
f_lambda - s
FieldData & getFieldData()
Get value of load factor.
MoFEM::Interface & mField
MoFEMErrorCode postProcess()
shell matrix for arc-length method
structure for Arc Length pre-conditioner
virtual double calculateLambdaInt()
Calculate f_lambda(dx,lambda)
virtual ~ArcLengthCtx()=default
friend MoFEMErrorCode PCApplyArcLength(PC pc, Vec pc_f, Vec pc_x)
MoFEMErrorCode setS(double s)
set arc radius
SmartPetscObj< Vec > db
db derivative of f(dx*dx), i.e. db = d[ f(dx*dx) ]/dx
MoFEMErrorCode operator()()
Store variables for ArcLength analysis.
double dLambda
increment of load factor
boost::shared_ptr< ArcLengthCtx > arcPtr
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
ArcLengthMatShell(Mat aij, boost::shared_ptr< ArcLengthCtx > arc_ptr, string problem_name)
virtual ~SphericalArcLengthControl()
ZeroFLmabda(boost::shared_ptr< ArcLengthCtx > arc_ptr)
Implementation of spherical arc-length method.
DofIdx getPetscGlobalDofIdx()
Get global index of load factor.
DEPRECATED SphericalArcLengthControl(ArcLengthCtx *arc_ptr_raw)
double beta
force scaling factor
double alpha
displacement scaling factor
MoFEMErrorCode calculateDxAndDlambda(Vec x)
Deprecated interface functions.
double dx2
inner_prod(dX,dX)
SimpleArcLengthControl(boost::shared_ptr< ArcLengthCtx > &arc_ptr, const bool assemble=false)
boost::shared_ptr< ArcLengthCtx > arcPtr
friend MoFEMErrorCode ArcLengthMatMultShellOp(Mat A, Vec x, Vec f)
MoFEMErrorCode setLambda(Vec ksp_x, double *lambda, ScatterMode scattermode)
virtual MoFEMErrorCode calculateDxAndDlambda(Vec x)
boost::shared_ptr< ArcLengthCtx > arcPtr
SmartPetscObj< Vec > xLambda
solution of eq. K*xLambda = F_lambda
~SimpleArcLengthControl()
PCArcLengthCtx(Mat shell_Aij, Mat aij, boost::shared_ptr< ArcLengthCtx > arc_ptr)
NumeredDofEntity * arcDofRawPtr
MoFEMErrorCode operator()()
MoFEMErrorCode postProcess()
virtual MoFEMErrorCode calculateInitDlambda(double *dlambda)
MoFEMErrorCode preProcess()
SmartPetscObj< Vec > x0
displacement vector at beginning of step
double F_lambda2
inner_prod(F_lambda,F_lambda);
virtual ~ArcLengthMatShell()=default
ArcLengthCtx(MoFEM::Interface &m_field, const std::string &problem_name, const std::string &field_name="LAMBDA")
SmartPetscObj< Vec > dx
dx = x-x0
constexpr auto field_name
DofIdx getPetscLocalDofIdx()
Get local index of load factor.
double dIag
diagonal value
SmartPetscObj< Vec > ghostDiag
MoFEMErrorCode preProcess()
virtual MoFEMErrorCode setDlambdaToX(Vec x, double dlambda)
int getPart()
Get proc owning lambda dof.
boost::shared_ptr< ArcLengthCtx > arcPtr
SmartPetscObj< Mat > shellAij
MoFEMErrorCode setAlphaBeta(double alpha, double beta)
set parameters controlling arc-length equations alpha controls off diagonal therms beta controls diag...
double FieldData
Field data type.
const FTensor::Tensor2< T, Dim, Dim > Vec
friend MoFEMErrorCode PCSetupArcLength(PC pc)
MoFEMErrorCode preProcess()
SmartPetscObj< Vec > ghosTdLambda
boost::shared_ptr< ArcLengthCtx > arcPtr
MoFEMErrorCode calculateDb()
Calculate db.
double s
arc length radius
SmartPetscObj< Vec > F_lambda
F_lambda reference load vector.
virtual MoFEMErrorCode calculateDb()
Calculate db.
double calculateLambdaInt()
Calculate internal lambda.