v0.14.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
EshelbianPlasticity::OpAssembleBasic< T > Struct Template Reference

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

Inheritance diagram for EshelbianPlasticity::OpAssembleBasic< T >:
[legend]
Collaboration diagram for EshelbianPlasticity::OpAssembleBasic< T >:
[legend]

Public Types

using ScaleOff = boost::function< double()>
 

Public Member Functions

 OpAssembleBasic (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type)
 
 OpAssembleBasic (const std::string &row_field, const std::string &col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const char type, const bool assemble_symmetry, ScaleOff scale_off=[]() { return 1;})
 
virtual MoFEMErrorCode integrate (EntData &data)
 
virtual MoFEMErrorCode integrate (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode assemble (EntData &data)
 
virtual MoFEMErrorCode assemble (int row_side, EntityType row_type, EntData &data)
 
virtual MoFEMErrorCode integrate (EntData &row_data, EntData &col_data)
 
virtual MoFEMErrorCode assemble (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 

Public Attributes

const bool assembleSymmetry
 
boost::shared_ptr< DataAtIntegrationPtsdataAtPts
 data at integration pts More...
 
VectorDouble nF
 local right hand side vector More...
 
MatrixDouble K
 local tangent matrix More...
 
MatrixDouble transposeK
 
ScaleOff scaleOff
 

Detailed Description

template<typename T>
struct EshelbianPlasticity::OpAssembleBasic< T >

Definition at line 352 of file EshelbianPlasticity.hpp.

Member Typedef Documentation

◆ ScaleOff

template<typename T >
using EshelbianPlasticity::OpAssembleBasic< T >::ScaleOff = boost::function<double()>

Definition at line 354 of file EshelbianPlasticity.hpp.

Constructor & Destructor Documentation

◆ OpAssembleBasic() [1/2]

template<typename T >
EshelbianPlasticity::OpAssembleBasic< T >::OpAssembleBasic ( const std::string &  field_name,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
const char  type 
)
inline

Definition at line 360 of file EshelbianPlasticity.hpp.

363 : T(field_name, type), dataAtPts(data_ptr), assembleSymmetry(false) {}
const double T
constexpr auto field_name
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts

◆ OpAssembleBasic() [2/2]

template<typename T >
EshelbianPlasticity::OpAssembleBasic< T >::OpAssembleBasic ( const std::string &  row_field,
const std::string &  col_field,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
const char  type,
const bool  assemble_symmetry,
ScaleOff  scale_off = []() { return 1; } 
)
inline

Definition at line 365 of file EshelbianPlasticity.hpp.

368 { return 1; })
369 : T(row_field, col_field, type, false), dataAtPts(data_ptr),
370 assembleSymmetry(assemble_symmetry), scaleOff(scale_off) {}

Member Function Documentation

◆ assemble() [1/3]

template<typename T >
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::assemble ( EntData data)
inlinevirtual

Definition at line 391 of file EshelbianPlasticity.hpp.

391 {
393 double *vec_ptr = &*nF.begin();
394 int nb_dofs = data.getIndices().size();
395 int *ind_ptr = &*data.getIndices().begin();
396 CHKERR VecSetValues(this->getTSf(), nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
398 }
#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
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
VectorDouble nF
local right hand side vector
const VectorInt & getIndices() const
Get global indices of dofs on entity.

◆ assemble() [2/3]

template<typename T >
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::assemble ( int  row_side,
EntityType  row_type,
EntData data 
)
inlinevirtual

Definition at line 400 of file EshelbianPlasticity.hpp.

401 {
403 CHKERR assemble(data);
405 }
virtual MoFEMErrorCode assemble(EntData &data)

◆ assemble() [3/3]

template<typename T >
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::assemble ( int  row_side,
int  col_side,
EntityType  row_type,
EntityType  col_type,
EntData row_data,
EntData col_data 
)
inlinevirtual

Definition at line 413 of file EshelbianPlasticity.hpp.

415 {
417
418 if (assembleSymmetry) {
419 const auto row_nb_dofs = row_data.getIndices().size();
420 const auto col_nb_dofs = col_data.getIndices().size();
421 transposeK.resize(col_nb_dofs, row_nb_dofs, false);
422 noalias(transposeK) = trans(K);
423 transposeK *= scaleOff();
424 }
425
426 CHKERR MatSetValues<SchurL2Mats>(this->getTSA(), row_data, col_data, K,
427 ADD_VALUES);
428 if (assembleSymmetry) {
429 CHKERR MatSetValues<SchurL2Mats>(this->getTSA(), col_data, row_data,
430 transposeK, ADD_VALUES);
431 }
432
434 }
MatrixDouble K
local tangent matrix

◆ doWork() [1/2]

template<typename T >
MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::doWork ( int  row_side,
int  col_side,
EntityType  row_type,
EntityType  col_type,
EntData row_data,
EntData col_data 
)
inline

Definition at line 447 of file EshelbianPlasticity.hpp.

449 {
451 if (row_data.getIndices().empty())
453 if (col_data.getIndices().empty())
455 K.resize(row_data.getIndices().size(), col_data.getIndices().size(), false);
456 K.clear();
457 CHKERR integrate(row_data, col_data);
458 CHKERR assemble(row_side, col_side, row_type, col_type, row_data, col_data);
460 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
virtual MoFEMErrorCode integrate(EntData &data)

◆ doWork() [2/2]

template<typename T >
MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::doWork ( int  side,
EntityType  type,
EntData data 
)
inline

Definition at line 436 of file EshelbianPlasticity.hpp.

436 {
438 if (data.getIndices().empty())
440 nF.resize(data.getIndices().size(), false);
441 nF.clear();
442 CHKERR integrate(side, type, data);
443 CHKERR assemble(side, type, data);
445 }

◆ integrate() [1/3]

template<typename T >
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::integrate ( EntData data)
inlinevirtual

◆ integrate() [2/3]

template<typename T >
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::integrate ( EntData row_data,
EntData col_data 
)
inlinevirtual

◆ integrate() [3/3]

template<typename T >
virtual MoFEMErrorCode EshelbianPlasticity::OpAssembleBasic< T >::integrate ( int  row_side,
EntityType  row_type,
EntData data 
)
inlinevirtual

Definition at line 384 of file EshelbianPlasticity.hpp.

385 {
387 CHKERR integrate(data);
389 }

Member Data Documentation

◆ assembleSymmetry

template<typename T >
const bool EshelbianPlasticity::OpAssembleBasic< T >::assembleSymmetry

Definition at line 355 of file EshelbianPlasticity.hpp.

◆ dataAtPts

template<typename T >
boost::shared_ptr<DataAtIntegrationPts> EshelbianPlasticity::OpAssembleBasic< T >::dataAtPts

data at integration pts

Definition at line 358 of file EshelbianPlasticity.hpp.

◆ K

template<typename T >
MatrixDouble EshelbianPlasticity::OpAssembleBasic< T >::K

local tangent matrix

Definition at line 373 of file EshelbianPlasticity.hpp.

◆ nF

template<typename T >
VectorDouble EshelbianPlasticity::OpAssembleBasic< T >::nF

local right hand side vector

Definition at line 372 of file EshelbianPlasticity.hpp.

◆ scaleOff

template<typename T >
ScaleOff EshelbianPlasticity::OpAssembleBasic< T >::scaleOff

Definition at line 376 of file EshelbianPlasticity.hpp.

◆ transposeK

template<typename T >
MatrixDouble EshelbianPlasticity::OpAssembleBasic< T >::transposeK

Definition at line 374 of file EshelbianPlasticity.hpp.


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