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 346 of file EshelbianPlasticity.hpp.

Member Typedef Documentation

◆ ScaleOff

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

Definition at line 348 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 354 of file EshelbianPlasticity.hpp.

357 : 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 359 of file EshelbianPlasticity.hpp.

362 { return 1; })
363 : T(row_field, col_field, type, false), dataAtPts(data_ptr),
364 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 385 of file EshelbianPlasticity.hpp.

385 {
387 double *vec_ptr = &*nF.begin();
388 int nb_dofs = data.getIndices().size();
389 int *ind_ptr = &*data.getIndices().begin();
390 CHKERR VecSetValues(this->getTSf(), nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
392 }
#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 394 of file EshelbianPlasticity.hpp.

395 {
397 CHKERR assemble(data);
399 }
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 407 of file EshelbianPlasticity.hpp.

409 {
411
412 if (assembleSymmetry) {
413 const auto row_nb_dofs = row_data.getIndices().size();
414 const auto col_nb_dofs = col_data.getIndices().size();
415 transposeK.resize(col_nb_dofs, row_nb_dofs, false);
416 noalias(transposeK) = trans(K);
417 transposeK *= scaleOff();
418 }
419
420 CHKERR MatSetValues<SchurL2Mats>(this->getTSA(), row_data, col_data, K,
421 ADD_VALUES);
422 if (assembleSymmetry) {
423 CHKERR MatSetValues<SchurL2Mats>(this->getTSA(), col_data, row_data,
424 transposeK, ADD_VALUES);
425 }
426
428 }
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 441 of file EshelbianPlasticity.hpp.

443 {
445 if (row_data.getIndices().empty())
447 if (col_data.getIndices().empty())
449 K.resize(row_data.getIndices().size(), col_data.getIndices().size(), false);
450 K.clear();
451 CHKERR integrate(row_data, col_data);
452 CHKERR assemble(row_side, col_side, row_type, col_type, row_data, col_data);
454 }
#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 430 of file EshelbianPlasticity.hpp.

430 {
432 if (data.getIndices().empty())
434 nF.resize(data.getIndices().size(), false);
435 nF.clear();
436 CHKERR integrate(side, type, data);
437 CHKERR assemble(side, type, data);
439 }

◆ 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 378 of file EshelbianPlasticity.hpp.

379 {
381 CHKERR integrate(data);
383 }

Member Data Documentation

◆ assembleSymmetry

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

Definition at line 349 of file EshelbianPlasticity.hpp.

◆ dataAtPts

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

data at integration pts

Definition at line 352 of file EshelbianPlasticity.hpp.

◆ K

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

local tangent matrix

Definition at line 367 of file EshelbianPlasticity.hpp.

◆ nF

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

local right hand side vector

Definition at line 366 of file EshelbianPlasticity.hpp.

◆ scaleOff

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

Definition at line 370 of file EshelbianPlasticity.hpp.

◆ transposeK

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

Definition at line 368 of file EshelbianPlasticity.hpp.


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