v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN > Struct Template Reference
Inheritance diagram for ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >:
[legend]
Collaboration diagram for ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >:
[legend]

Public Member Functions

 OpCalculateStressImpl (MoFEM::Interface &m_field, boost::shared_ptr< CommonData > common_data_ptr, boost::shared_ptr< ClosestPointProjection > cp_ptr, bool calc_lhs)
 

Protected Member Functions

MoFEMErrorCode getTags ()
 
MoFEMErrorCode setTagsData (const EntityHandle tet, const int nb_gauss_pts, const int nb_internal_variables)
 

Protected Attributes

MoFEM::Interface & mField
 
boost::shared_ptr< CommonData > commonDataPtr
 
boost::shared_ptr< ClosestPointProjection > cpPtr
 
bool calcLhs
 
Tag thPlasticStrain
 
Tag thInternalVariables
 

Detailed Description

template<int DIM, StrainType STRAIN>
struct ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >

Definition at line 255 of file ADOLCPlasticity.cpp.

Constructor & Destructor Documentation

◆ OpCalculateStressImpl()

template<int DIM, StrainType STRAIN>
ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >::OpCalculateStressImpl ( MoFEM::Interface &  m_field,
boost::shared_ptr< CommonData >  common_data_ptr,
boost::shared_ptr< ClosestPointProjection >  cp_ptr,
bool  calc_lhs 
)

Definition at line 306 of file ADOLCPlasticity.cpp.

311 mField(m_field), commonDataPtr(common_data_ptr), cpPtr(cp_ptr),
312 calcLhs(calc_lhs) {
313 CHK_THROW_MESSAGE(getTags(), "get tags");
314}
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
@ NOSPACE
Definition definitions.h:83
boost::shared_ptr< CommonData > commonDataPtr
boost::shared_ptr< ClosestPointProjection > cpPtr
UserDataOperator(const FieldSpace space, const char type=OPSPACE, const bool symm=true)
Constructor for operators working on finite element spaces.
@ OPSPACE
operator do Work is execute on space data

Member Function Documentation

◆ getTags()

template<int DIM, StrainType STRAIN>
MoFEMErrorCode ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >::getTags ( )
protected

Definition at line 317 of file ADOLCPlasticity.cpp.

317 {
319 int def_length = 0;
320 CHKERR mField.get_moab().tag_get_handle(
321 "PLASTIC_STRAIN", def_length, MB_TYPE_DOUBLE, thPlasticStrain,
322 MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_VARLEN, NULL);
323 CHKERR mField.get_moab().tag_get_handle(
324 "INTERNAL_VARIABLES", def_length, MB_TYPE_DOUBLE, thInternalVariables,
325 MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_VARLEN, NULL);
327}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
virtual moab::Interface & get_moab()=0

◆ setTagsData()

template<int DIM, StrainType STRAIN>
MoFEMErrorCode ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >::setTagsData ( const EntityHandle  tet,
const int  nb_gauss_pts,
const int  nb_internal_variables 
)
protected

Definition at line 330 of file ADOLCPlasticity.cpp.

332 {
334
336 {
337 rval = mField.get_moab().tag_get_by_ptr(
338 thPlasticStrain, &tet, 1,
339 (const void **)&commonDataPtr->plasticStrainPtr,
340 &commonDataPtr->plasticStrainSize);
341 if (rval != MB_SUCCESS ||
342 commonDataPtr->plasticStrainSize != 6 * nb_gauss_pts) {
343 v.resize(6 * nb_gauss_pts, false);
344 v.clear();
345 int tag_size[1];
346 tag_size[0] = v.size();
347 void const *tag_data[] = {&v[0]};
348 CHKERR mField.get_moab().tag_set_by_ptr(thPlasticStrain, &tet, 1,
349 tag_data, tag_size);
350 CHKERR mField.get_moab().tag_get_by_ptr(
351 thPlasticStrain, &tet, 1,
352 (const void **)&commonDataPtr->plasticStrainPtr,
353 &commonDataPtr->plasticStrainSize);
354 }
355 }
356 if (nb_internal_variables > 0) {
357 rval = mField.get_moab().tag_get_by_ptr(
358 thInternalVariables, &tet, 1,
359 (const void **)&commonDataPtr->internalVariablesPtr,
360 &commonDataPtr->internalVariablesSize);
361 if (rval != MB_SUCCESS || commonDataPtr->internalVariablesSize !=
362 nb_internal_variables * nb_gauss_pts) {
363 v.resize(nb_internal_variables * nb_gauss_pts, false);
364 v.clear();
365 int tag_size[1];
366 tag_size[0] = v.size();
367 void const *tag_data[] = {&v[0]};
368 CHKERR mField.get_moab().tag_set_by_ptr(thInternalVariables, &tet, 1,
369 tag_data, tag_size);
370 CHKERR mField.get_moab().tag_get_by_ptr(
371 thInternalVariables, &tet, 1,
372 (const void **)&commonDataPtr->internalVariablesPtr,
373 &commonDataPtr->internalVariablesSize);
374 }
375 }
377}
const double v
phase velocity of light in medium (cm/ns)
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval

Member Data Documentation

◆ calcLhs

template<int DIM, StrainType STRAIN>
bool ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >::calcLhs
protected

Definition at line 266 of file ADOLCPlasticity.cpp.

◆ commonDataPtr

template<int DIM, StrainType STRAIN>
boost::shared_ptr<CommonData> ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >::commonDataPtr
protected

Definition at line 264 of file ADOLCPlasticity.cpp.

◆ cpPtr

template<int DIM, StrainType STRAIN>
boost::shared_ptr<ClosestPointProjection> ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >::cpPtr
protected

Definition at line 265 of file ADOLCPlasticity.cpp.

◆ mField

template<int DIM, StrainType STRAIN>
MoFEM::Interface& ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >::mField
protected

Definition at line 263 of file ADOLCPlasticity.cpp.

◆ thInternalVariables

template<int DIM, StrainType STRAIN>
Tag ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >::thInternalVariables
protected

Definition at line 269 of file ADOLCPlasticity.cpp.

◆ thPlasticStrain

template<int DIM, StrainType STRAIN>
Tag ADOLCPlasticity::OpCalculateStressImpl< DIM, STRAIN >::thPlasticStrain
protected

Definition at line 268 of file ADOLCPlasticity.cpp.


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