v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63 Struct Reference
Inheritance diagram for EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63:
[legend]
Collaboration diagram for EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63:
[legend]

Public Member Functions

 HMHPMooneyRivlinWriggersEq63 (const double alpha, const double beta, const double lambda)
 
virtual OpJacobianreturnOpJacobian (const int tag, const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, boost::shared_ptr< PhysicalEquations > &physics_ptr)
 
MoFEMErrorCode getOptions ()
 
MoFEMErrorCode recordTape (const int tape, DTensor2Ptr *t_h_ptr)
 
- Public Member Functions inherited from EshelbianPlasticity::PhysicalEquations
 PhysicalEquations ()=delete
 
 PhysicalEquations (const int size_active, const int size_dependent)
 
virtual ~PhysicalEquations ()=default
 
virtual MoFEMErrorCode recordTape (const int tag, DTensor2Ptr *t_h)=0
 
virtual OpJacobianreturnOpJacobian (const int tag, const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, boost::shared_ptr< PhysicalEquations > &physics_ptr)=0
 
DTensor2Ptr get_P ()
 
DTensor3Ptr get_P_dh0 ()
 
DTensor3Ptr get_P_dh1 ()
 
DTensor3Ptr get_P_dh2 ()
 
DTensor2Ptr get_h ()
 

Public Attributes

double alpha
 
double beta
 
double lambda
 
double epsilon
 
ATensor2 th
 
ATensor2 tH
 
ATensor2 tF
 
adouble detH
 
adouble detF
 
ATensor2 tInvH
 
ATensor2 tInvF
 
ATensor2 tP
 
ATensor2 tSigma
 
ATensor2 tCof
 
ATensor2 tBF
 
ATensor2 tBCof
 
adouble tBj
 
adouble energy
 
adouble phi
 
adouble A
 
adouble B
 
ATensor2 tPulledP
 
- Public Attributes inherited from EshelbianPlasticity::PhysicalEquations
std::vector< doubleactiveVariables
 
std::vector< doubledependentVariablesPiola
 
std::vector< doubledependentVariablesPiolaDirevatives
 

Static Public Attributes

static constexpr int numberOfActiveVariables = 9
 
static constexpr int numberOfDependentVariables = 9
 

Additional Inherited Members

- Public Types inherited from EshelbianPlasticity::PhysicalEquations
typedef FTensor::Tensor1< adouble, 3 > ATensor1
 
typedef FTensor::Tensor2< adouble, 3, 3 > ATensor2
 
typedef FTensor::Tensor3< adouble, 3, 3, 3 > ATensor3
 
typedef FTensor::Tensor1< double, 3 > DTensor1
 
typedef FTensor::Tensor2< double, 3, 3 > DTensor2
 
typedef FTensor::Tensor3< double, 3, 3, 3 > DTensor3
 
typedef FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > DTensor0Ptr
 
typedef FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, 3, 3 > DTensor2Ptr
 
typedef FTensor::Tensor3< FTensor::PackPtr< double *, 1 >, 3, 3, 3 > DTensor3Ptr
 
- Static Public Member Functions inherited from EshelbianPlasticity::PhysicalEquations
template<int S>
static DTensor2Ptr get_VecTensor2 (std::vector< double > &v)
 
template<int S>
static DTensor0Ptr get_VecTensor0 (std::vector< double > &v)
 
template<int S0>
static DTensor3Ptr get_vecTensor3 (std::vector< double > &v, const int nba)
 

Detailed Description

Definition at line 314 of file EshelbianADOL-C.cpp.

Constructor & Destructor Documentation

◆ HMHPMooneyRivlinWriggersEq63()

EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::HMHPMooneyRivlinWriggersEq63 ( const double  alpha,
const double  beta,
const double  lambda 
)
inline

Member Function Documentation

◆ getOptions()

MoFEMErrorCode EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::getOptions ( )
inline

Definition at line 331 of file EshelbianADOL-C.cpp.

331 {
333 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "mooneyrivlin_", "", "none");
334
335 alpha = 1;
336 CHKERR PetscOptionsScalar("-alpha", "Alpha", "", alpha, &alpha, PETSC_NULL);
337 beta = 1;
338 CHKERR PetscOptionsScalar("-beta", "Beta", "", beta, &beta, PETSC_NULL);
339
340 lambda = 1;
341 CHKERR PetscOptionsScalar("-lambda", "Lambda", "", lambda, &lambda,
342 PETSC_NULL);
343
344 epsilon = 0;
345 CHKERR PetscOptionsScalar("-epsilon", "Epsilon", "", epsilon, &epsilon,
346 PETSC_NULL);
347
348 ierr = PetscOptionsEnd();
349 CHKERRG(ierr);
351 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:483
#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
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76

◆ recordTape()

MoFEMErrorCode EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::recordTape ( const int  tape,
DTensor2Ptr t_h_ptr 
)
inlinevirtual

Implements EshelbianPlasticity::PhysicalEquations.

Definition at line 384 of file EshelbianADOL-C.cpp.

384 {
386
396
398
400
401 auto ih = get_h();
402 // auto iH = get_H();
403 if (t_h_ptr)
404 ih(i, j) = (*t_h_ptr)(i, j);
405 else {
406 ih(i, j) = t_kd(i, j);
407 }
408
409 auto r_P = get_P();
410
411 enableMinMaxUsingAbs();
412 trace_on(tape);
413
414 // Set active variables to ADOL-C
415 th(i, j) <<= get_h()(i, j);
416
417 tF(i, I) = th(i, I);
420
421 tCof(i, I) = detF * tInvF(I, i);
422
423 A = tF(k, K) * tF(k, K);
424 B = tCof(k, K) * tCof(k, K);
425
426 tBF(i, I) = 4 * alpha * (A * tF(i, I));
427 tBCof(i, I) = 4 * beta * (B * tCof(i, I));
428 tBj = (-12 * alpha - 24 * beta) / detF +
429 0.5 * (lambda / epsilon) *
430 (pow(detF, epsilon - 1) - pow(detF, -epsilon - 1));
431
432 tP(i, I) = tBF(i, I);
433 tP(i, I) += (levi_civita(i, j, k) * tBCof(j, J)) *
434 (levi_civita(I, J, K) * tF(k, K));
435 tP(i, I) += tCof(i, I) * tBj;
436
437 // Set dependent variables to ADOL-C
438 tP(i, j) >>= r_P(i, j);
439
440 trace_off();
441
443 }
static Index< 'J', 3 > J
static Number< 2 > N2
static Number< 1 > N1
static Number< 0 > N0
Kronecker Delta class symmetric.
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
MoFEMErrorCode invertTensor3by3(ublas::matrix< T, L, A > &jac_data, ublas::vector< T, A > &det_data, ublas::matrix< T, L, A > &inv_jac_data)
Calculate inverse of tensor rank 2 at integration points.
Definition: Templates.hpp:1559
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:1511
constexpr IntegrationType I

◆ returnOpJacobian()

virtual OpJacobian * EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::returnOpJacobian ( const int  tag,
const bool  eval_rhs,
const bool  eval_lhs,
boost::shared_ptr< DataAtIntegrationPts > &  data_ptr,
boost::shared_ptr< PhysicalEquations > &  physics_ptr 
)
inlinevirtual

Implements EshelbianPlasticity::PhysicalEquations.

Definition at line 325 of file EshelbianADOL-C.cpp.

327 {
328 return (new OpHMHH(tag, eval_rhs, eval_lhs, data_ptr, physics_ptr));
329 }

Member Data Documentation

◆ A

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::A

Definition at line 379 of file EshelbianADOL-C.cpp.

◆ alpha

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::alpha

Definition at line 353 of file EshelbianADOL-C.cpp.

◆ B

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::B

Definition at line 380 of file EshelbianADOL-C.cpp.

◆ beta

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::beta

Definition at line 354 of file EshelbianADOL-C.cpp.

◆ detF

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::detF

Definition at line 363 of file EshelbianADOL-C.cpp.

◆ detH

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::detH

Definition at line 362 of file EshelbianADOL-C.cpp.

◆ energy

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::energy

Definition at line 377 of file EshelbianADOL-C.cpp.

◆ epsilon

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::epsilon

Definition at line 356 of file EshelbianADOL-C.cpp.

◆ lambda

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::lambda

Definition at line 355 of file EshelbianADOL-C.cpp.

◆ numberOfActiveVariables

constexpr int EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::numberOfActiveVariables = 9
staticconstexpr

Definition at line 316 of file EshelbianADOL-C.cpp.

◆ numberOfDependentVariables

constexpr int EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::numberOfDependentVariables = 9
staticconstexpr

Definition at line 317 of file EshelbianADOL-C.cpp.

◆ phi

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::phi

Definition at line 378 of file EshelbianADOL-C.cpp.

◆ tBCof

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tBCof

Definition at line 374 of file EshelbianADOL-C.cpp.

◆ tBF

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tBF

Definition at line 373 of file EshelbianADOL-C.cpp.

◆ tBj

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tBj

Definition at line 375 of file EshelbianADOL-C.cpp.

◆ tCof

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tCof

Definition at line 370 of file EshelbianADOL-C.cpp.

◆ tF

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tF

Definition at line 360 of file EshelbianADOL-C.cpp.

◆ th

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::th

Definition at line 358 of file EshelbianADOL-C.cpp.

◆ tH

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tH

Definition at line 359 of file EshelbianADOL-C.cpp.

◆ tInvF

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tInvF

Definition at line 365 of file EshelbianADOL-C.cpp.

◆ tInvH

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tInvH

Definition at line 364 of file EshelbianADOL-C.cpp.

◆ tP

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tP

Definition at line 367 of file EshelbianADOL-C.cpp.

◆ tPulledP

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPulledP

Definition at line 382 of file EshelbianADOL-C.cpp.

◆ tSigma

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tSigma

Definition at line 368 of file EshelbianADOL-C.cpp.


The documentation for this struct was generated from the following file: