v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OpCalculateRotationAndSpatialGradient Struct Reference

#include "users_modules/eshelbian_plasticity/src/EshelbianOperators.hpp"

Inheritance diagram for OpCalculateRotationAndSpatialGradient:
[legend]
Collaboration diagram for OpCalculateRotationAndSpatialGradient:
[legend]

Public Member Functions

 OpCalculateRotationAndSpatialGradient (boost::shared_ptr< DataAtIntegrationPts > data_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 Operator for linear form, usually to calculate values on right hand side.
 
- Public Member Functions inherited from MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
int getNumNodes ()
 get element number of nodes
 
const EntityHandle * getConn ()
 get element connectivity
 
double getVolume () const
 element volume (linear geometry)
 
double & getVolume ()
 element volume (linear geometry)
 
FTensor::Tensor2< double *, 3, 3 > & getJac ()
 get element Jacobian
 
FTensor::Tensor2< double *, 3, 3 > & getInvJac ()
 get element inverse Jacobian
 
VectorDouble & getCoords ()
 nodal coordinates
 
VolumeElementForcesAndSourcesCore * getVolumeFE () const
 return pointer to Generic Volume Finite Element object
 
- Public Member Functions inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
 UserDataOperator (const FieldSpace space, const char type=OPSPACE, const bool symm=true)
 Constructor for operators working on finite element spaces.
 
 UserDataOperator (const std::string field_name, const char type, const bool symm=true)
 Constructor for operators working on a single field.
 
 UserDataOperator (const std::string row_field_name, const std::string col_field_name, const char type, const bool symm=true)
 Constructor for operators working on two fields (bilinear forms)
 
boost::shared_ptr< const NumeredEntFiniteElement > getNumeredEntFiniteElementPtr () const
 Return raw pointer to NumeredEntFiniteElement.
 
EntityHandle getFEEntityHandle () const
 Return finite element entity handle.
 
int getFEDim () const
 Get dimension of finite element.
 
EntityType getFEType () const
 Get dimension of finite element.
 
boost::weak_ptr< SideNumber > getSideNumberPtr (const int side_number, const EntityType type)
 Get the side number pointer.
 
EntityHandle getSideEntity (const int side_number, const EntityType type)
 Get the side entity.
 
int getNumberOfNodesOnElement () const
 Get the number of nodes on finite element.
 
MoFEMErrorCode getProblemRowIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get row indices.
 
MoFEMErrorCode getProblemColIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get col indices.
 
const FEMethod * getFEMethod () const
 Return raw pointer to Finite Element Method object.
 
int getOpType () const
 Get operator types.
 
void setOpType (const OpType type)
 Set operator type.
 
void addOpType (const OpType type)
 Add operator type.
 
int getNinTheLoop () const
 get number of finite element in the loop
 
int getLoopSize () const
 get size of elements in the loop
 
std::string getFEName () const
 Get name of the element.
 
ForcesAndSourcesCore * getPtrFE () const
 
ForcesAndSourcesCore * getSidePtrFE () const
 
ForcesAndSourcesCore * getRefinePtrFE () const
 
const PetscData::Switches & getDataCtx () const
 
const KspMethod::KSPContext getKSPCtx () const
 
const SnesMethod::SNESContext getSNESCtx () const
 
const TSMethod::TSContext getTSCtx () const
 
Vec getKSPf () const
 
Mat getKSPA () const
 
Mat getKSPB () const
 
Vec getSNESf () const
 
Vec getSNESx () const
 
Mat getSNESA () const
 
Mat getSNESB () const
 
Vec getTSu () const
 
Vec getTSu_t () const
 
Vec getTSu_tt () const
 
Vec getTSf () const
 
Mat getTSA () const
 
Mat getTSB () const
 
int getTSstep () const
 
double getTStime () const
 
double getTStimeStep () const
 
double getTSa () const
 
double getTSaa () const
 
MatrixDouble & getGaussPts ()
 matrix of integration (Gauss) points for Volume Element
 
auto getFTensor0IntegrationWeight ()
 Get integration weights.
 
MatrixDouble & getCoordsAtGaussPts ()
 Gauss points and weight, matrix (nb. of points x 3)
 
auto getFTensor1CoordsAtGaussPts ()
 Get coordinates at integration points assuming linear geometry.
 
double getMeasure () const
 get measure of element
 
double & getMeasure ()
 get measure of element
 
MoFEM::Interface & getMField ()
 
moab::Interface & getMoab ()
 
virtual boost::weak_ptr< ForcesAndSourcesCore > getSubPipelinePtr () const
 
MoFEMErrorCode loopSide (const string &fe_name, ForcesAndSourcesCore *side_fe, const size_t dim, const EntityHandle ent_for_side=0, boost::shared_ptr< Range > fe_range=nullptr, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy, AdjCache *adj_cache=nullptr)
 User calls this function to loop over elements on the side of face. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopThis (const string &fe_name, ForcesAndSourcesCore *this_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over the same element using a different set of integration points. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopParent (const string &fe_name, ForcesAndSourcesCore *parent_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopChildren (const string &fe_name, ForcesAndSourcesCore *child_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.
 
MoFEMErrorCode loopRange (const string &fe_name, ForcesAndSourcesCore *range_fe, boost::shared_ptr< Range > fe_range, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 Iterate over range of elements.
 
- Public Member Functions inherited from MoFEM::DataOperator
 DataOperator (const bool symm=true)
 
virtual ~DataOperator ()=default
 
virtual MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 Operator for bi-linear form, usually to calculate values on left hand side.
 
virtual MoFEMErrorCode opLhs (EntitiesFieldData &row_data, EntitiesFieldData &col_data)
 
virtual MoFEMErrorCode opRhs (EntitiesFieldData &data, const bool error_if_no_base=false)
 
bool getSymm () const
 Get if operator uses symmetry of DOFs or not.
 
void setSymm ()
 set if operator is executed taking in account symmetry
 
void unSetSymm ()
 unset if operator is executed for non symmetric problem
 

Private Attributes

boost::shared_ptr< DataAtIntegrationPts > dataAtPts
 data at integration pts
 

Additional Inherited Members

- Public Types inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
enum  OpType {
  OPROW = 1 << 0 , OPCOL = 1 << 1 , OPROWCOL = 1 << 2 , OPSPACE = 1 << 3 ,
  OPLAST = 1 << 3
}
 Controls loop over entities on element. More...
 
using AdjCache = std::map< EntityHandle, std::vector< boost::weak_ptr< NumeredEntFiniteElement > > >
 
- Public Types inherited from MoFEM::DataOperator
using DoWorkLhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)>
 
using DoWorkRhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int side, EntityType type, EntitiesFieldData::EntData &data)>
 
- Public Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
char opType
 
std::string rowFieldName
 
std::string colFieldName
 
FieldSpace sPace
 
- Public Attributes inherited from MoFEM::DataOperator
DoWorkLhsHookFunType doWorkLhsHook
 
DoWorkRhsHookFunType doWorkRhsHook
 
bool sYmm
 If true assume that matrix is symmetric structure.
 
std::array< bool, MBMAXTYPE > doEntities
 If true operator is executed for entity.
 
bool & doVertices
 \deprectaed If false skip vertices
 
bool & doEdges
 \deprectaed If false skip edges
 
bool & doQuads
 \deprectaed
 
bool & doTris
 \deprectaed
 
bool & doTets
 \deprectaed
 
bool & doPrisms
 \deprectaed
 
- Static Public Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
static const char *const OpTypeNames []
 
- Protected Member Functions inherited from MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
MoFEMErrorCode setPtrFE (ForcesAndSourcesCore *ptr)
 
- Protected Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
ForcesAndSourcesCore * ptrFE
 

Detailed Description

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp.

Definition at line 273 of file EshelbianOperators.hpp.

Constructor & Destructor Documentation

◆ OpCalculateRotationAndSpatialGradient()

OpCalculateRotationAndSpatialGradient::OpCalculateRotationAndSpatialGradient ( boost::shared_ptr< DataAtIntegrationPts >  data_ptr)
inline

Definition at line 275 of file EshelbianOperators.hpp.

@ NOSPACE
Definition definitions.h:83
VolumeElementForcesAndSourcesCore::UserDataOperator VolUserDataOperator
@ OPSPACE
operator do Work is execute on space data
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpCalculateRotationAndSpatialGradient::doWork ( int  side,
EntityType  type,
EntData &  data 
)
virtual

Operator for linear form, usually to calculate values on right hand side.

Reimplemented from MoFEM::DataOperator.

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 145 of file EshelbianOperators.cpp.

147 {
149
150 auto ts_ctx = getTSCtx();
151 int nb_integration_pts = getGaussPts().size2();
152
153 // space size indices
163
164 // sym size indices
166
167 auto t_L = FTensor::SymmLTensor<double, 3>();
168
170 *dataAtPts->getStretchTensorAtPts(), nb_integration_pts);
172 *dataAtPts->getDiffStretchTensorAtPts(), nb_integration_pts);
173 MatrixSizeHelper<GetFTensor2FromMatType<3, 3, -1, DL>, DL>::size(
174 *dataAtPts->getStretchH1AtPts(), nb_integration_pts);
175 MatrixSizeHelper<GetFTensor4FromMatType<3, 3, 3, 3, -1, DL>, DL>::size(
176 *dataAtPts->getDiffStretchH1AtPts(), nb_integration_pts);
177 MatrixSizeHelper<GetFTensor2FromMatType<3, 3, -1, DL>, DL>::size(
178 *dataAtPts->getAdjointPdstretchAtPts(), nb_integration_pts);
180 *dataAtPts->getAdjointPdUAtPts(), nb_integration_pts);
182 *dataAtPts->getAdjointPdUdPAtPts(), nb_integration_pts);
184 *dataAtPts->getAdjointPdUdOmegaAtPts(), nb_integration_pts);
185
186 MatrixSizeHelper<GetFTensor2FromMatType<3, 3, -1, DL>, DL>::size(
187 *dataAtPts->getDeformationGradient(), nb_integration_pts);
189 *dataAtPts->getPlasticH(), nb_integration_pts);
191 *dataAtPts->getPlasticF(), nb_integration_pts);
192 MatrixSizeHelper<GetFTensor2FromMatType<3, 3, -1, DL>, DL>::size(
193 *dataAtPts->getInvPlasticF(), nb_integration_pts);
194 MatrixSizeHelper<GetFTensor3FromMatType<3, 3, 3, -1, DL>, DL>::size(
195 dataAtPts->hdOmegaAtPts, nb_integration_pts);
197 dataAtPts->hdLogStretchAtPts, nb_integration_pts);
198
200 dataAtPts->leviKirchhoffAtPts, nb_integration_pts);
202 dataAtPts->leviKirchhoff0AtPts, nb_integration_pts);
203 MatrixSizeHelper<GetFTensor2FromMatType<3, 3, -1, DL>, DL>::size(
204 dataAtPts->leviKirchhoffdOmegaAtPts, nb_integration_pts);
206 dataAtPts->leviKirchhoffdLogStreatchAtPts, nb_integration_pts);
207 MatrixSizeHelper<GetFTensor3FromMatType<3, 3, 3, -1, DL>, DL>::size(
208 dataAtPts->leviKirchhoffPAtPts, nb_integration_pts);
209
210 MatrixSizeHelper<GetFTensor2FromMatType<3, 3, -1, DL>, DL>::size(
211 dataAtPts->rotMatAtPts, nb_integration_pts);
213 *dataAtPts->getEigenVals(), nb_integration_pts);
214 MatrixSizeHelper<GetFTensor2FromMatType<3, 3, -1, DL>, DL>::size(
215 *dataAtPts->getEigenVecs(), nb_integration_pts);
216 dataAtPts->nbUniq.resize(nb_integration_pts, false);
218 dataAtPts->eigenValsC, nb_integration_pts);
219 MatrixSizeHelper<GetFTensor2FromMatType<3, 3, -1, DL>, DL>::size(
220 dataAtPts->eigenVecsC, nb_integration_pts);
221 dataAtPts->nbUniqC.resize(nb_integration_pts, false);
222
224 dataAtPts->logStretch2H1AtPts, nb_integration_pts);
226 dataAtPts->logStretchTotalTensorAtPts, nb_integration_pts);
227
228 MatrixSizeHelper<GetFTensor2FromMatType<3, 3, -1, DL>, DL>::size(
229 dataAtPts->internalStressAtPts, nb_integration_pts);
230 dataAtPts->internalStressAtPts.clear();
231
232 // Reconstruct the fixed plastic deformation before evaluating volume
233 // equations. Their work-conjugate stress is the Piola transform
234 // P_bar = P F_p^T / J_p, whereas reference equilibrium continues to use P.
235 auto t_log_plasticH = dataAtPts->getFTensorPlasticH(nb_integration_pts);
236 auto t_plasticF_reconstruct =
237 dataAtPts->getFTensorPlasticF(nb_integration_pts);
238 auto t_invPlasticF_reconstruct =
239 dataAtPts->getFTensorInvPlasticF(nb_integration_pts);
240 const EigenMatrix::Fun<double> exp_fun = [](const double v) {
241 return std::exp(v);
242 };
243 const EigenMatrix::Fun<double> inv_exp_fun = [](const double v) {
244 return std::exp(-v);
245 };
246 for (int gg = 0; gg != nb_integration_pts; ++gg) {
249 t_eigen_vecs(i, j) = t_log_plasticH(i, j);
250 if (computeEigenValuesSymmetric(t_eigen_vecs, t_eigen_vals) != MB_SUCCESS)
251 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
252 "Failed to diagonalise logarithmic plastic deformation");
253 const auto t_exp_plasticH =
254 EigenMatrix::getMat(t_eigen_vals, t_eigen_vecs, exp_fun);
255 const auto t_inv_exp_plasticH =
256 EigenMatrix::getMat(t_eigen_vals, t_eigen_vecs, inv_exp_fun);
257 t_plasticF_reconstruct(i, j) = t_exp_plasticH(i, j);
258 t_invPlasticF_reconstruct(i, j) = t_inv_exp_plasticH(i, j);
259
260#ifndef NDEBUG
261 const double det_plasticF =
262 determinantTensor3by3(t_plasticF_reconstruct);
263 if (!std::isfinite(det_plasticF) ||
264 det_plasticF <= std::numeric_limits<double>::epsilon())
265 SETERRQ(PETSC_COMM_SELF, MOFEM_INVALID_DATA,
266 "Plastic deformation gradient must have a positive determinant; "
267 "got %g",
268 det_plasticF);
269#endif
270
271 ++t_log_plasticH;
272 ++t_plasticF_reconstruct;
273 ++t_invPlasticF_reconstruct;
274 }
275
276 MatrixDouble intermediate_p_at_pts;
277 MatrixDouble intermediate_p0_at_pts;
278 auto get_intermediate_p =
280 DL>::size(intermediate_p_at_pts, nb_integration_pts);
281 auto get_intermediate_p0 =
283 DL>::size(intermediate_p0_at_pts, nb_integration_pts);
284 auto t_reference_P = dataAtPts->getFTensorApproxP(nb_integration_pts);
285 auto t_reference_P0 = dataAtPts->getFTensorApproxP0(nb_integration_pts);
286 auto t_plasticF = dataAtPts->getFTensorPlasticF(nb_integration_pts);
287 auto t_intermediate_P = get_intermediate_p();
288 auto t_intermediate_P0 = get_intermediate_p0();
289 for (int gg = 0; gg != nb_integration_pts; ++gg) {
290 const double det_plasticF = determinantTensor3by3(t_plasticF);
291 t_intermediate_P(i, j) =
292 t_reference_P(i, k) * t_plasticF(j, k) / det_plasticF;
293 t_intermediate_P0(i, j) =
294 t_reference_P0(i, k) * t_plasticF(j, k) / det_plasticF;
295 ++t_reference_P;
296 ++t_reference_P0;
297 ++t_plasticF;
298 ++t_intermediate_P;
299 ++t_intermediate_P0;
300 }
301
302 // Calculated values
303 auto t_h = dataAtPts->getFTensorSmallH(getGaussPts().size2());
304 auto t_h_domega = dataAtPts->getFTensorSmallHdOmega(getGaussPts().size2());
305 auto t_h_dlog_u =
306 dataAtPts->getFTensorSmallHdLogStretch(getGaussPts().size2());
307 auto t_levi_kirchhoff =
308 dataAtPts->getFTensorLeviKirchhoff(getGaussPts().size2());
309 auto t_levi_kirchhoff0 =
310 dataAtPts->getFTensorLeviKirchhoff0(getGaussPts().size2());
311 auto t_levi_kirchhoff_domega =
312 dataAtPts->getFTensorLeviKirchhoffdOmega(getGaussPts().size2());
313 auto t_levi_kirchhoff_dstreach =
314 dataAtPts->getFTensorLeviKirchhoffdLogStretch(getGaussPts().size2());
315 auto t_levi_kirchhoff_dP =
316 dataAtPts->getFTensorLeviKirchhoffP(getGaussPts().size2());
317 auto t_approx_P_adjoint_dstretch =
318 dataAtPts->getFTensorAdjointPdstretch(getGaussPts().size2());
319 auto t_approx_P_adjoint_log_du =
320 dataAtPts->getFTensorAdjointPdU(getGaussPts().size2());
321 auto t_approx_P_adjoint_log_du_dP =
322 dataAtPts->getFTensorAdjointPdUdP(getGaussPts().size2());
323 auto t_approx_P_adjoint_log_du_domega =
324 dataAtPts->getFTensorAdjointPdUdOmega(getGaussPts().size2());
325 auto t_R = dataAtPts->getFTensorRotMat(getGaussPts().size2());
326 auto t_u = dataAtPts->getFTensorStretch(getGaussPts().size2());
327 auto t_diff_u = dataAtPts->getFTensorDiffStretch(getGaussPts().size2());
328 auto t_eigen_vals = dataAtPts->getFTensorEigenVals(getGaussPts().size2());
329 auto t_eigen_vecs = dataAtPts->getFTensorEigenVecs(getGaussPts().size2());
330 auto &nbUniq = dataAtPts->nbUniq;
331 auto t_nb_uniq =
332 FTensor::Tensor0<FTensor::PackPtr<int *, 1>>(nbUniq.data().data());
333 auto t_eigen_vals_C = dataAtPts->getFTensorEigenValsC(nb_integration_pts);
334 auto t_eigen_vecs_C = dataAtPts->getFTensorEigenVecsC(nb_integration_pts);
335 auto &nbUniqC = dataAtPts->nbUniqC;
336 auto t_nb_uniq_C =
337 FTensor::Tensor0<FTensor::PackPtr<int *, 1>>(nbUniqC.data().data());
338
339 auto t_u_h1 = dataAtPts->getFTensorStretchH1(getGaussPts().size2());
340 auto t_diff_u_h1 = dataAtPts->getFTensorDiffStretchH1(getGaussPts().size2());
341 auto t_log_stretch_total =
342 dataAtPts->getFTensorLogStretchTotal(getGaussPts().size2());
343 auto t_log_u2_h1 = dataAtPts->getFTensorLogStretch2H1(getGaussPts().size2());
344
345 // Field values
346 auto t_grad_h1 = dataAtPts->getFTensorSmallWGradH1(getGaussPts().size2());
347 auto t_omega = dataAtPts->getFTensorRotAxis(getGaussPts().size2());
348 auto t_approx_P = get_intermediate_p();
349 auto t_approx_P0 = get_intermediate_p0();
350 auto t_log_u = dataAtPts->getFTensorLogStretch(getGaussPts().size2());
351
352 // Rot axis 0
353 auto t_omega0 = dataAtPts->getFTensorRotAxis0(getGaussPts().size2());
354 auto t_log_u0 = dataAtPts->getFTensorLogStretch0(getGaussPts().size2());
355
356 auto next = [&]() {
357 // calculated values
358 ++t_h;
359 ++t_h_domega;
360 ++t_h_dlog_u;
361 ++t_levi_kirchhoff;
362 ++t_levi_kirchhoff0;
363 ++t_levi_kirchhoff_domega;
364 ++t_levi_kirchhoff_dstreach;
365 ++t_levi_kirchhoff_dP;
366 ++t_approx_P_adjoint_dstretch;
367 ++t_approx_P_adjoint_log_du;
368 ++t_approx_P_adjoint_log_du_dP;
369 ++t_approx_P_adjoint_log_du_domega;
370 ++t_R;
371 ++t_u;
372 ++t_diff_u;
373 ++t_eigen_vals;
374 ++t_eigen_vecs;
375 ++t_nb_uniq;
376 ++t_eigen_vals_C;
377 ++t_eigen_vecs_C;
378 ++t_nb_uniq_C;
379 ++t_u_h1;
380 ++t_diff_u_h1;
381 ++t_log_u2_h1;
382 ++t_log_stretch_total;
383 // field values
384 ++t_omega;
385 ++t_omega0;
386 ++t_grad_h1;
387 ++t_approx_P;
388 ++t_approx_P0;
389 ++t_log_u;
390 ++t_log_u0;
391 };
392
395 constexpr auto t_diff_sym = FTensor::DiffSymmetrize<double>();
396
397 auto calculate_stretch_from_log = [&](auto &t_log_u_src, auto &t_u_dst,
398 auto &t_eigen_vals_dst,
399 auto &t_eigen_vecs_dst,
400 int &nb_uniq_dst) {
404 eigen_vec(i, j) = t_log_u_src(i, j);
405 if (computeEigenValuesSymmetric(eigen_vec, eig) != MB_SUCCESS) {
406 MOFEM_LOG("SELF", Sev::error) << "Failed to compute eigen values";
407 }
408 // CHKERR bound_eig(eig);
409 // rare case when two eigen values are equal
410 nb_uniq_dst = getUniqNb<3>(eig);
411 if (nb_uniq_dst < 3) {
412 CHKERR sortEigenVals<3>(eig, eigen_vec);
413 }
414 t_eigen_vals_dst(i) = eig(i);
415 t_eigen_vecs_dst(i, j) = eigen_vec(i, j);
416 t_u_dst(i, j) = EigenMatrix::getMat(t_eigen_vals_dst, t_eigen_vecs_dst,
419 };
420
421 auto calculate_log_stretch = [&]() {
423 int nb_uniq_val = 0;
424 CHKERR calculate_stretch_from_log(t_log_u, t_u, t_eigen_vals, t_eigen_vecs,
425 nb_uniq_val);
426 t_nb_uniq = nb_uniq_val;
427 auto get_t_diff_u = [&]() {
428 return EigenMatrix::getDiffMat(t_eigen_vals, t_eigen_vecs,
430 t_nb_uniq);
431 };
432 t_diff_u(i, j, k, l) = get_t_diff_u()(i, j, k, l);
434 t_Ldiff_u(i, j, L) = t_diff_u(i, j, m, n) * t_L(m, n, L);
436 };
437
438 auto calculate_total_stretch = [&](auto &t_h1) {
440 if (EshelbianCore::gradApproximator == NO_H1_CONFIGURATION) {
441
442 t_log_u2_h1(i, j) = 0;
443 t_log_stretch_total(i, j) = t_log_u(i, j);
444
445 } else {
446
448 FTensor::Tensor1<double, 3> t_coordinate_stretch;
450
452 t_C_h1(i, j) = t_h1(k, i) * t_h1(k, j);
453 t_eigen_vec(i, j) = t_C_h1(i, j);
454 if (computeEigenValuesSymmetric(t_eigen_vec, t_eig_C) != MB_SUCCESS) {
455 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
456 "Failed to compute eigenvalues of F_H1^T F_H1");
457 }
458 // rare case when two eigen values are equal
459 t_nb_uniq_C = getUniqNb<3>(t_eig_C);
460 if (t_nb_uniq_C < 3) {
461 CHKERR sortEigenVals<3>(t_eig_C, t_eigen_vec);
462 }
463 for (int aa = 0; aa != 3; ++aa) {
464 if (!std::isfinite(t_eig_C(aa)) || t_eig_C(aa) <= 0.) {
465 SETERRQ(PETSC_COMM_SELF, MOFEM_INVALID_DATA,
466 "F_H1^T F_H1 must be positive definite; eigenvalue %d is "
467 "%g",
468 aa, t_eig_C(aa));
469 }
470 const double principal_stretch = std::sqrt(t_eig_C(aa));
471 const double coordinate_stretch =
472 EshelbianCore::inv_f(principal_stretch);
473 if (!std::isfinite(coordinate_stretch)) {
474 SETERRQ(PETSC_COMM_SELF, PETSC_ERR_FP,
475 "Non-finite H1 coordinate stretch for principal stretch %g",
476 principal_stretch);
477 }
478 t_coordinate_stretch(aa) = coordinate_stretch;
479 }
480 t_eigen_vals_C(i) = t_eig_C(i);
481 t_eigen_vecs_C(i, j) = t_eigen_vec(i, j);
482
483 t_log_u2_h1(i, j) =
484 EigenMatrix::getMat(t_coordinate_stretch, t_eigen_vec,
485 [](const double v) { return v; })(i, j);
486 // The hand-coded Hencky formulation uses additive stretch coordinates.
487 // For logarithmic coordinates this is log(U_H1) + log(U_increment).
488 t_log_stretch_total(i, j) = t_log_u2_h1(i, j) + t_log_u(i, j);
489 }
491 };
492
493 auto no_h1_loop = [&]() {
495
497 case LARGE_ROT:
498 break;
499 case SMALL_ROT:
500 break;
501 default:
502 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
503 "no_h1_loop is only implemented for LARGE_ROT");
504 };
505
506 for (int gg = 0; gg != nb_integration_pts; ++gg) {
507
509
511 t_h1(i, j) = t_kd(i, j);
512
513 // calculate streach
514 CHKERR calculate_log_stretch();
516 if ((dataAtPts->physicsPtr->getFeatures() &
517 PhysicalEquations::noStretchMask)
518 .any()) {
519 t_u0(i, j) = t_u(i, j);
520 } else {
521 FTensor::Tensor1<double, 3> t_eigen_vals_0;
522 FTensor::Tensor2<double, 3, 3> t_eigen_vecs_0;
523 int nb_uniq_0 = 0;
524 CHKERR calculate_stretch_from_log(t_log_u0, t_u0, t_eigen_vals_0,
525 t_eigen_vecs_0, nb_uniq_0);
526 }
527 // calculate total stretch
528 CHKERR calculate_total_stretch(t_h1);
529
530 t_u_h1(i, j) = t_u(i, j);
531 t_diff_u_h1(i, j, k, l) = t_diff_u(i, j, k, l);
533 t_Ldiff_u(i, j, L) = t_diff_u(i, j, m, n) * t_L(m, n, L);
534
537
538 auto large_rot = [&]() {
539 t_R(i, j) = LieGroups::SO3::exp(t_omega, t_omega.l2())(i, j);
540 t_diff_R(i, j, k) =
541 LieGroups::SO3::diffExp(t_omega, t_omega.l2())(i, j, k);
542 t_diff_diff_R(i, j, k, l) =
543 LieGroups::SO3::diffDiffExp(t_omega, t_omega.l2())(i, j, k, l);
544
546 t_diff_R0(i, j, k) =
547 LieGroups::SO3::diffExp(t_omega0, t_omega0.l2())(i, j, k);
548
549 t_h(i, k) = t_R(i, l) * t_u(l, k);
550
552 t_rotated_P(l, k) = t_R(i, l) * t_approx_P(i, k);
553 t_approx_P_adjoint_dstretch(l, k) =
554 t_diff_sym(l, k, i, j) * t_rotated_P(i, j);
555 t_approx_P_adjoint_log_du(L) =
556 t_approx_P_adjoint_dstretch(l, k) * t_Ldiff_u(l, k, L);
557
558 t_levi_kirchhoff(m) =
559 t_diff_R(i, l, m) * (t_u(l, k) * t_approx_P(i, k));
560 t_levi_kirchhoff0(m) =
561 t_diff_R0(i, l, m) * (t_u0(l, k) * t_approx_P0(i, k));
562
564 t_h_domega(i, k, m) = t_diff_R(i, l, m) * t_u(l, k);
565 t_h_dlog_u(i, k, L) = t_R(i, l) * t_Ldiff_u(l, k, L);
566
567 t_approx_P_adjoint_log_du_dP(i, k, L) =
568 t_R(i, l) * t_Ldiff_u(l, k, L);
569
571 t_A(k, l, m) = t_diff_R(i, l, m) * t_approx_P(i, k);
572 t_approx_P_adjoint_log_du_domega(m, L) =
573 t_A(k, l, m) * t_Ldiff_u(k, l, L);
574
575 t_levi_kirchhoff_dstreach(m, L) =
576 t_diff_R(i, l, m) * (t_Ldiff_u(l, k, L) * t_approx_P(i, k));
577 t_levi_kirchhoff_dP(m, i, k) = t_diff_R(i, l, m) * t_u(l, k);
578 t_levi_kirchhoff_domega(m, n) =
579 t_diff_diff_R(i, l, m, n) * (t_u(l, k) * t_approx_P(i, k));
580
581 if (dataAtPts->physicsPtr->getFeatures().test(
582 PhysicalEquations::NO_STRETCH_NONLINEAR)) {
583 auto t_d_u_d_b = GetFTensor4DdgFromMatImpl<
584 SPACE_DIM, SPACE_DIM, -1, DL, MatrixDouble>::get(
585 dataAtPts->matInvD, gg, 0);
586 auto [t_d_b_d_omega, t_d_u_d_omega, t_d_h_d_omega] =
587 getDiffSpatialGradientDR(t_d_u_d_b, t_R, t_diff_R,
588 t_approx_P);
589
590 t_h_domega(i, k, m) += t_d_h_d_omega(i, k, m);
592 t_d_u_contract_p;
593 t_d_u_contract_p(i, l, n) =
594 t_d_u_d_omega(l, k, n) * t_approx_P(i, k);
595 t_levi_kirchhoff_domega(m, n) +=
596 t_diff_R(i, l, m) * t_d_u_contract_p(i, l, n);
597
600 SPACE_DIM>
601 t_d_b_d_p;
602 t_d_b_d_p(i, j, k, l) =
603 t_diff_sym(i, j, m, l) * t_R(k, m);
605 SPACE_DIM>
606 t_d_u_d_p;
607 t_d_u_d_p(i, j, k, l) =
608 t_d_u_d_b(i, j, m, n) * t_d_b_d_p(m, n, k, l);
609 t_levi_kirchhoff_dP(m, k, l) +=
610 t_d_u_d_p(i, j, k, l) * t_d_b_d_omega(i, j, m);
611 }
612 }
613 }
614 };
615
616 auto moderate_rot = [&](auto &t_omega0) {
617 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
618 "moderate_rot is not implemented yet");
619 };
620
621 auto small_rot = [&]() {
622 t_u_h1(i, j) = t_u(i, j);
623 t_diff_u_h1(i, j, k, l) = t_diff_u(i, j, k, l);
625 t_Ldiff_u(i, j, L) = t_diff_u(i, j, m, n) * t_L(m, n, L);
626
627 t_R(i, j) = t_kd(i, j) + levi_civita(i, j, k) * t_omega(k);
628 t_h(i, j) = levi_civita(i, j, k) * t_omega(k) + t_u(i, j);
629
630 t_h_domega(i, j, k) = levi_civita(i, j, k);
631 t_h_dlog_u(i, j, L) = t_Ldiff_u(i, j, L);
632
633 // Adjoint stress
635 t_rotated_P(i, j) = t_R(k, i) * t_approx_P(k, j);
636 t_approx_P_adjoint_dstretch(i, j) =
637 t_diff_sym(i, j, k, l) * t_rotated_P(k, l);
638 t_approx_P_adjoint_log_du(L) =
639 t_approx_P_adjoint_dstretch(i, j) * t_Ldiff_u(i, j, L);
640 t_approx_P_adjoint_log_du_dP(i, j, L) =
641 t_R(i, k) * t_Ldiff_u(k, j, L);
642 t_approx_P_adjoint_log_du_domega(m, L) =
643 levi_civita(k, i, m) * t_approx_P(k, j) *
644 t_Ldiff_u(i, j, L);
645
646 // Kirchhoff stress
647 t_levi_kirchhoff(k) = levi_civita(i, j, k) * t_approx_P(i, j);
648 t_levi_kirchhoff0(k) = levi_civita(i, j, k) * t_approx_P0(i, j);
649 t_levi_kirchhoff_dstreach(m, L) = 0;
650 t_levi_kirchhoff_dP(k, i, j) = levi_civita(i, j, k);
651 t_levi_kirchhoff_domega(m, n) = 0;
652 };
653
654 // rotation
656 case LARGE_ROT:
657 large_rot();
658 break;
659 case MODERATE_ROT:
660 moderate_rot(t_omega0);
661 break;
662 case SMALL_ROT:
663 small_rot();
664 break;
665 default:
666 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
667 "rotationSelector not handled");
668 }
669
670 next();
671 }
672
674 };
675
676 auto large_loop = [&]() {
678
680 case LARGE_ROT:
681 break;
682 case SMALL_ROT:
683 break;
684 default:
685 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
686 "rotSelector should be large or small");
687 };
688
689 for (int gg = 0; gg != nb_integration_pts; ++gg) {
690
692
695 case LARGE_ROT:
696 t_h1(i, j) = t_grad_h1(i, j) + t_kd(i, j);
697 break;
698 default:
699 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
700 "Selected grad approximator not handled");
701 };
702
703 // calculate streach
704 CHKERR calculate_log_stretch();
706 if ((dataAtPts->physicsPtr->getFeatures() &
707 PhysicalEquations::noStretchMask)
708 .any()) {
709 t_u0(i, j) = t_u(i, j);
710 } else {
711 FTensor::Tensor1<double, 3> t_eigen_vals_0;
712 FTensor::Tensor2<double, 3, 3> t_eigen_vecs_0;
713 int nb_uniq_0 = 0;
714 CHKERR calculate_stretch_from_log(t_log_u0, t_u0, t_eigen_vals_0,
715 t_eigen_vecs_0, nb_uniq_0);
716 }
717 // calculate total stretch
718 CHKERR calculate_total_stretch(t_h1);
719
720 t_u_h1(l, k) = t_u(l, o) * t_h1(o, k);
722 t_u_h10(l, k) = t_u0(l, o) * t_h1(o, k);
723 t_diff_u_h1(i, j, k, l) = t_diff_u(i, o, k, l) * t_h1(o, j);
725 t_Ldiff_u_h1(l, k, L) = t_diff_u_h1(l, k, i, j) * t_L(i, j, L);
726
730
731 // rotation
733 case SMALL_ROT:
734 t_R(i, k) = t_kd(i, k) + levi_civita(i, k, l) * t_omega(l);
735 t_diff_R(i, j, k) = levi_civita(i, j, k);
736 t_diff_R0(i, j, k) = levi_civita(i, j, k);
737 t_diff_diff_R(i, j, l, m) = 0;
738 break;
739 case LARGE_ROT:
740 t_R(i, j) = LieGroups::SO3::exp(t_omega, t_omega.l2())(i, j);
741 t_diff_R(i, j, k) =
742 LieGroups::SO3::diffExp(t_omega, t_omega.l2())(i, j, k);
743 t_diff_R0(i, j, k) =
744 LieGroups::SO3::diffExp(t_omega0, t_omega0.l2())(i, j, k);
745 t_diff_diff_R(i, j, k, l) =
746 LieGroups::SO3::diffDiffExp(t_omega, t_omega.l2())(i, j, k, l);
747 break;
748
749 default:
750 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
751 "rotationSelector not handled");
752 }
753
754 // calculate gradient
755 t_h(i, k) = t_R(i, l) * t_u_h1(l, k);
756
757 // Adjoint stress
759 t_rotated_P(l, o) =
760 (t_R(i, l) * t_approx_P(i, k)) * t_h1(o, k);
761 t_approx_P_adjoint_dstretch(l, o) =
762 t_diff_sym(l, o, i, j) * t_rotated_P(i, j);
763 t_approx_P_adjoint_log_du(L) =
764 t_R(i, l) * t_approx_P(i, k) * t_Ldiff_u_h1(l, k, L);
765
766 // Kirchhoff stress
767 t_levi_kirchhoff(m) = t_diff_R(i, l, m) * t_u_h1(l, k) * t_approx_P(i, k);
768 t_levi_kirchhoff0(m) =
769 t_diff_R0(i, l, m) * t_u_h10(l, k) * t_approx_P0(i, k);
770
772
773 t_h_domega(i, k, m) = t_diff_R(i, l, m) * t_u_h1(l, k);
774 t_h_dlog_u(i, k, L) = t_R(i, l) * t_Ldiff_u_h1(l, k, L);
775
776 t_approx_P_adjoint_log_du_dP(i, k, L) =
777 t_R(i, l) * t_Ldiff_u_h1(l, k, L);
778
780 t_A(m, L, i, k) = t_diff_R(i, l, m) * t_Ldiff_u_h1(l, k, L);
781 t_approx_P_adjoint_log_du_domega(m, L) =
782 t_A(m, L, i, k) * t_approx_P(i, k);
783
784 t_levi_kirchhoff_dstreach(m, L) =
785 t_diff_R(i, l, m) * (t_Ldiff_u_h1(l, k, L) * t_approx_P(i, k));
786
787 t_levi_kirchhoff_dP(m, i, k) = t_diff_R(i, l, m) * t_u_h1(l, k);
788 t_levi_kirchhoff_domega(m, n) =
789 t_diff_diff_R(i, l, m, n) * (t_u_h1(l, k) * t_approx_P(i, k));
790 }
791
792 next();
793 }
794
796 };
797
798 auto moderate_loop = [&]() {
800
802 case LARGE_ROT:
803 break;
804 case SMALL_ROT:
805 break;
806 default:
807 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
808 "rotSelector should be large or small");
809 };
810
811 for (int gg = 0; gg != nb_integration_pts; ++gg) {
812
814
817 case MODERATE_ROT:
818 t_h1(i, j) = t_grad_h1(i, j) + t_kd(i, j);
819 break;
820 default:
821 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
822 "Selected grad approximator not handled");
823 };
824
825 // calculate streach
826 CHKERR calculate_log_stretch();
827 // calculate total stretch
828 CHKERR calculate_total_stretch(t_h1);
829
830 auto t_diff = FTensor::DiffTensor<double>();
831
832 t_u_h1(l, k) = (t_kd(l, o) + t_log_u(l, o)) * t_h1(o, k);
834 t_u_h10(l, k) = (t_kd(l, o) + t_log_u0(l, o)) * t_h1(o, k);
835 t_diff_u_h1(i, j, k, l) = t_diff(i, o, k, l) * t_h1(o, j);
837 t_Ldiff_u_h1(l, k, L) = t_diff_u_h1(l, k, i, j) * t_L(i, j, L);
838
842
843 // rotation
845 case SMALL_ROT:
846 t_R(i, k) = t_kd(i, k) + levi_civita(i, k, l) * t_omega(l);
847 t_diff_R(i, j, k) = levi_civita(i, j, k);
848 t_diff_R0(i, j, k) = levi_civita(i, j, k);
849 t_diff_diff_R(i, j, l, m) = 0;
850 break;
851 case LARGE_ROT:
852 t_R(i, j) = LieGroups::SO3::exp(t_omega, t_omega.l2())(i, j);
853 t_diff_R(i, j, k) =
854 LieGroups::SO3::diffExp(t_omega, t_omega.l2())(i, j, k);
855 t_diff_R0(i, j, k) =
856 LieGroups::SO3::diffExp(t_omega0, t_omega0.l2())(i, j, k);
857 t_diff_diff_R(i, j, k, l) =
858 LieGroups::SO3::diffDiffExp(t_omega, t_omega.l2())(i, j, k, l);
859 break;
860
861 default:
862 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
863 "rotationSelector not handled");
864 }
865
866 // calculate gradient
867 t_h(i, k) = t_R(i, l) * t_u_h1(l, k);
868
869 // Adjoint stress
871 t_rotated_P(l, o) =
872 (t_R(i, l) * t_approx_P(i, k)) * t_h1(o, k);
873 t_approx_P_adjoint_dstretch(l, o) =
874 t_diff_sym(l, o, i, j) * t_rotated_P(i, j);
875 t_approx_P_adjoint_log_du(L) =
876 t_R(i, l) * t_approx_P(i, k) * t_Ldiff_u_h1(l, k, L);
877
878 // Kirchhoff stress
879 t_levi_kirchhoff(m) = t_diff_R(i, l, m) * t_u_h1(l, k) * t_approx_P(i, k);
880 t_levi_kirchhoff0(m) =
881 t_diff_R0(i, l, m) * t_u_h10(l, k) * t_approx_P0(i, k);
882
884
885 t_h_domega(i, k, m) = t_diff_R(i, l, m) * t_u_h1(l, k);
886 t_h_dlog_u(i, k, L) = t_R(i, l) * t_Ldiff_u_h1(l, k, L);
887
888 t_approx_P_adjoint_log_du_dP(i, k, L) =
889 t_R(i, l) * t_Ldiff_u_h1(l, k, L);
890
892 t_A(m, L, i, k) = t_diff_R(i, l, m) * t_Ldiff_u_h1(l, k, L);
893 t_approx_P_adjoint_log_du_domega(m, L) =
894 t_A(m, L, i, k) * t_approx_P(i, k);
895
896 t_levi_kirchhoff_dstreach(m, L) =
897 t_diff_R(i, l, m) * (t_Ldiff_u_h1(l, k, L) * t_approx_P(i, k));
898
899 t_levi_kirchhoff_dP(m, i, k) = t_diff_R(i, l, m) * t_u_h1(l, k);
900 t_levi_kirchhoff_domega(m, n) =
901 t_diff_diff_R(i, l, m, n) * (t_u_h1(l, k) * t_approx_P(i, k));
902 }
903
904 next();
905 }
906
908 };
909
910 auto small_loop = [&]() {
913 case SMALL_ROT:
914 break;
915 default:
916 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
917 "rotSelector should be small");
918 };
919
920 for (int gg = 0; gg != nb_integration_pts; ++gg) {
921
924 case SMALL_ROT:
925 t_h1(i, j) = t_kd(i, j);
926 break;
927 default:
928 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
929 "gradApproximator not handled");
930 };
931
933 if (EshelbianCore::stretchSelector > LINEAR) {
934 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
935 "stretchSelector should be linear for small loop");
936 } else {
937 t_u(i, j) = t_symm_kd(i, j) + t_log_u(i, j);
938 t_u_h1(i, j) = t_u(i, j);
939 t_diff_u_h1(i, j, k, l) =
940 (t_kd(i, k) * t_kd(j, l) + t_kd(i, l) * t_kd(j, k));
941 t_diff_u_h1(i, j, k, l) /= 2.;
942 t_Ldiff_u(i, j, L) = t_L(i, j, L);
943 }
944 t_log_u2_h1(i, j) = 0;
945 t_log_stretch_total(i, j) = t_log_u(i, j);
946
947 t_R(i, j) = t_kd(i, j) + levi_civita(i, j, k) * t_omega(k);
948 t_h(i, j) = levi_civita(i, j, k) * t_omega(k) + t_u(i, j);
949
950 t_h_domega(i, j, k) = levi_civita(i, j, k);
951 t_h_dlog_u(i, j, L) = t_Ldiff_u(i, j, L);
952
953 // Adjoint stress
954 t_approx_P_adjoint_dstretch(i, j) =
955 t_diff_sym(i, j, k, l) * t_approx_P(k, l);
956 t_approx_P_adjoint_log_du(L) =
957 t_approx_P_adjoint_dstretch(i, j) * t_Ldiff_u(i, j, L);
958 t_approx_P_adjoint_log_du_dP(i, j, L) = t_Ldiff_u(i, j, L);
959 t_approx_P_adjoint_log_du_domega(m, L) = 0;
960
961 // Kirchhoff stress
962 t_levi_kirchhoff(k) = levi_civita(i, j, k) * t_approx_P(i, j);
963 t_levi_kirchhoff0(k) = levi_civita(i, j, k) * t_approx_P0(i, j);
964 t_levi_kirchhoff_dstreach(m, L) = 0;
965 t_levi_kirchhoff_dP(k, i, j) = levi_civita(i, j, k);
966 t_levi_kirchhoff_domega(m, n) = 0;
967
968 next();
969 }
970
972 };
973
976 CHKERR no_h1_loop();
977 break;
978 case LARGE_ROT:
979 CHKERR large_loop();
980 break;
981 case MODERATE_ROT:
982 CHKERR moderate_loop();
983 break;
984 case SMALL_ROT:
985 CHKERR small_loop();
986 break;
987 default:
988 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
989 "gradApproximator not handled");
990 break;
991 };
992
994}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
Kronecker Delta class symmetric.
Kronecker Delta class.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_OPERATION_UNSUCCESSFUL
Definition definitions.h:34
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
@ MOFEM_INVALID_DATA
Definition definitions.h:36
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
constexpr auto t_kd
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
const double n
refractive index of diffusive medium
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
MoFEM::TsCtx * ts_ctx
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
boost::function< T(const T)> Fun
auto getMat(A &&t_val, B &&t_vec, Fun< double > f)
Get the Mat object.
auto getDiffMat(A &&t_val, B &&t_vec, Fun< double > f, Fun< double > d_f, const int nb)
Get the Diff Mat object.
auto getDiffSpatialGradientDR(TInvD &t_d_u_d_b, TRotation &t_R, TDiffRotation &t_diff_R, TStress &t_P)
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
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
Definition MatHuHu.hpp:33
decltype(GetFTensor2SymmetricFromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor2SymmetricFromMatType
decltype(GetFTensor4FromMatImpl< Tensor_Dim0, Tensor_Dim1, Tensor_Dim2, Tensor_Dim3, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor4FromMatType
decltype(GetFTensor4DdgFromMatImpl< Tensor_Dim01, Tensor_Dim23, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor4DdgFromMatType
decltype(GetFTensor1FromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor1FromMatType
MoFEMErrorCode computeEigenValuesSymmetric(const MatrixDouble &mat, VectorDouble &eig, MatrixDouble &eigen_vec)
compute eigenvalues of a symmetric matrix using lapack dsyev
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
decltype(GetFTensor3FromMatImpl< Tensor_Dim0, Tensor_Dim1, Tensor_Dim2, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor3FromMatType
decltype(GetFTensor2FromMatImpl< Tensor_Dim0, Tensor_Dim1, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor2FromMatType
constexpr IntegrationType I
FTensor::Index< 'm', 3 > m
static enum StretchSelector stretchSelector
static enum RotSelector rotSelector
static enum RotSelector gradApproximator
static constexpr enum SymmetrySelector symmetrySelector
static boost::function< double(const double)> f
static boost::function< double(const double)> d_f
static boost::function< double(const double)> inv_f
static auto diffDiffExp(A &&t_w_vee, B &&theta)
Definition Lie.hpp:105
static auto diffExp(A &&t_w_vee, B &&theta)
Definition Lie.hpp:100
static auto exp(A &&t_w_vee, B &&theta)
Definition Lie.hpp:69
MatrixDouble & getGaussPts()
matrix of integration (Gauss) points for Volume Element
@ CTX_TSSETIJACOBIAN
Setting up implicit Jacobian.
constexpr auto size_symm
Definition plastic.cpp:42

Member Data Documentation

◆ dataAtPts

boost::shared_ptr<DataAtIntegrationPts> OpCalculateRotationAndSpatialGradient::dataAtPts
private

data at integration pts

Definition at line 282 of file EshelbianOperators.hpp.


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