v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
EshelbianPlasticity::OpConstrainBoundaryLhs_dP Struct Reference

#include <users_modules/eshelbian_plasticty/src/EshelbianContact.hpp>

Inheritance diagram for EshelbianPlasticity::OpConstrainBoundaryLhs_dP:
[legend]
Collaboration diagram for EshelbianPlasticity::OpConstrainBoundaryLhs_dP:
[legend]

Public Member Functions

 OpConstrainBoundaryLhs_dP (const std::string row_field_name, boost::shared_ptr< ContactOps::CommonData > common_data_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 

Private Attributes

ContactOps::SurfaceDistanceFunction surfaceDistanceFunction
 
ContactOps::GradSurfaceDistanceFunction gradSurfaceDistanceFunction
 
ContactOps::HessSurfaceDistanceFunction hessSurfaceDistanceFunction
 
boost::shared_ptr< ContactOps::CommonDatacommonDataPtr
 

Detailed Description

Examples
EshelbianPlasticity.cpp.

Definition at line 69 of file EshelbianContact.hpp.

Constructor & Destructor Documentation

◆ OpConstrainBoundaryLhs_dP()

EshelbianPlasticity::OpConstrainBoundaryLhs_dP::OpConstrainBoundaryLhs_dP ( const std::string  row_field_name,
boost::shared_ptr< ContactOps::CommonData common_data_ptr 
)

Definition at line 290 of file EshelbianContact.cpp.

293 : ContactOps::AssemblyBoundaryEleOp(row_field_name, row_field_name,
295 commonDataPtr(common_data_ptr) {
296 sYmm = false;
297}
FormsIntegrators< BoundaryEleOp >::Assembly< A >::OpBase AssemblyBoundaryEleOp
boost::shared_ptr< ContactOps::CommonData > commonDataPtr
@ OPROWCOL
operator doWork is executed on FE rows &columns

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode EshelbianPlasticity::OpConstrainBoundaryLhs_dP::iNtegrate ( EntitiesFieldData::EntData &  row_data,
EntitiesFieldData::EntData &  col_data 
)

Definition at line 300 of file EshelbianContact.cpp.

301 {
303
307
308 const size_t nb_gauss_pts = getGaussPts().size2();
309
310 auto t_w = getFTensor0IntegrationWeight();
311 auto t_disp = getFTensor1FromMat<3>(commonDataPtr->contactDisp);
312 auto t_traction = getFTensor1FromMat<3>(commonDataPtr->contactTraction);
313 auto t_coords = getFTensor1CoordsAtGaussPts();
314 auto t_normal_at_pts = getFTensor1NormalsAtGaussPts();
315
316 auto next = [&]() {
317 ++t_w;
318 ++t_disp;
319 ++t_traction;
320 ++t_coords;
321 ++t_normal_at_pts;
322 };
323
324 auto t_row_base = row_data.getFTensor1N<3>();
325 size_t nb_face_functions = row_data.getN().size2() / 3;
326
327 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
328
330 t_normal(i) = t_normal_at_pts(i) / t_normal_at_pts.l2();
331
332 const double alpha = t_w * getMeasure();
333
334 FTensor::Tensor1<double, 3> t_spatial_coords{0., 0., 0.};
335 t_spatial_coords(i) = t_coords(i) + t_disp(i);
336
337 auto ts_time = getTStime();
338
339 auto sdf = surfaceDistanceFunction(ts_time, t_spatial_coords(0),
340 t_spatial_coords(1), t_spatial_coords(2),
341 0, 0, 0);
342 auto t_grad_sdf = gradSurfaceDistanceFunction(
343 ts_time, t_spatial_coords(0), t_spatial_coords(1), t_spatial_coords(2),
344 t_normal_at_pts(0), t_normal_at_pts(1), t_normal_at_pts(2));
345
346 auto tn = t_traction(i) * t_grad_sdf(i);
347 auto c = ContactOps::constrain(sdf, tn);
348
350 t_cP(i, j) = (c * t_grad_sdf(i)) * t_grad_sdf(j);
352 t_cQ(i, j) = kronecker_delta(i, j) - t_cP(i, j);
353
355 t_res_dt(i, j) = -ContactOps::cn_contact * t_cQ(i, j);
356
357 size_t rr = 0;
358 for (; rr != nbRows / 3; ++rr) {
359
360 auto t_mat = getFTensor2FromArray<3, 3, 3>(locMat, 3 * rr);
361 const double row_base = t_row_base(i) * t_normal(i);
362
363 auto t_col_base = col_data.getFTensor1N<3>(gg, 0);
364 for (size_t cc = 0; cc != nbCols / 3; ++cc) {
365 const double col_base = t_col_base(i) * t_normal(i);
366 const double beta = alpha * row_base * col_base;
367
368 t_mat(i, j) -= beta * t_res_dt(i, j);
369
370 ++t_col_base;
371 ++t_mat;
372 }
373
374 ++t_row_base;
375 }
376 for (; rr < nb_face_functions; ++rr)
377 ++t_row_base;
378
379 next();
380 }
381
383}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
FTensor::Index< 'i', SPACE_DIM > i
const double c
speed of light (cm/ns)
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
double constrain(double sdf, double tn)
constrain function
Definition: ContactOps.hpp:572
Tensor2_Expr< Kronecker_Delta< T >, T, Dim0, Dim1, i, j > kronecker_delta(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
Rank 2.
Definition: sdf.py:1
ContactOps::SurfaceDistanceFunction surfaceDistanceFunction
ContactOps::GradSurfaceDistanceFunction gradSurfaceDistanceFunction

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<ContactOps::CommonData> EshelbianPlasticity::OpConstrainBoundaryLhs_dP::commonDataPtr
private

Definition at line 87 of file EshelbianContact.hpp.

◆ gradSurfaceDistanceFunction

ContactOps::GradSurfaceDistanceFunction EshelbianPlasticity::OpConstrainBoundaryLhs_dP::gradSurfaceDistanceFunction
private
Initial value:
=
MatrixDouble grad_surface_distance_function(double delta_t, double t, int nb_gauss_pts, MatrixDouble &m_spatial_coords, MatrixDouble &m_normals_at_pts, int block_id)
Definition: ContactOps.hpp:273

Definition at line 82 of file EshelbianContact.hpp.

◆ hessSurfaceDistanceFunction

ContactOps::HessSurfaceDistanceFunction EshelbianPlasticity::OpConstrainBoundaryLhs_dP::hessSurfaceDistanceFunction
private
Initial value:
=
MatrixDouble hess_surface_distance_function(double delta_t, double t, int nb_gauss_pts, MatrixDouble &m_spatial_coords, MatrixDouble &m_normals_at_pts, int block_id)
Definition: ContactOps.hpp:330

Definition at line 84 of file EshelbianContact.hpp.

◆ surfaceDistanceFunction

ContactOps::SurfaceDistanceFunction EshelbianPlasticity::OpConstrainBoundaryLhs_dP::surfaceDistanceFunction
private
Initial value:
=
VectorDouble surface_distance_function(double delta_t, double t, int nb_gauss_pts, MatrixDouble &m_spatial_coords, MatrixDouble &m_normals_at_pts, int block_id)
Definition: ContactOps.hpp:216

Definition at line 80 of file EshelbianContact.hpp.


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