v0.13.2
Loading...
Searching...
No Matches
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 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)
 
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
 

Detailed Description

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

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

390 : 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 
)
inline

Definition at line 392 of file EshelbianPlasticity.hpp.

395 : T(row_field, col_field, type, false), dataAtPts(data_ptr),
396 assembleSymmetry(assemble_symmetry) {}

Member Function Documentation

◆ assemble() [1/3]

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

Definition at line 415 of file EshelbianPlasticity.hpp.

415 {
417 double *vec_ptr = &*nF.begin();
418 int nb_dofs = data.getIndices().size();
419 int *ind_ptr = &*data.getIndices().begin();
420 CHKERR VecSetValues(this->getTSf(), nb_dofs, ind_ptr, vec_ptr, ADD_VALUES);
422 }
#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 424 of file EshelbianPlasticity.hpp.

425 {
427 CHKERR assemble(data);
429 }
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 437 of file EshelbianPlasticity.hpp.

439 {
441
442 if (assembleSymmetry) {
443 const auto row_nb_dofs = row_data.getIndices().size();
444 const auto col_nb_dofs = col_data.getIndices().size();
445 transposeK.resize(col_nb_dofs, row_nb_dofs, false);
446 noalias(transposeK) = trans(K);
447
448 }
449
450 CHKERR MatSetValues<AssemblyTypeSelector<A>>(this->getTSB(), row_data,
451 col_data, K, ADD_VALUES);
452 if (assembleSymmetry) {
453 CHKERR MatSetValues<AssemblyTypeSelector<A>>(
454 this->getTSB(), col_data, row_data, transposeK, ADD_VALUES);
455 }
456
458 }
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 471 of file EshelbianPlasticity.hpp.

473 {
475 if (row_data.getIndices().empty())
477 if (col_data.getIndices().empty())
479 K.resize(row_data.getIndices().size(), col_data.getIndices().size(), false);
480 K.clear();
481 CHKERR integrate(row_data, col_data);
482 CHKERR assemble(row_side, col_side, row_type, col_type, row_data, col_data);
484 }
#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 460 of file EshelbianPlasticity.hpp.

460 {
462 if (data.getIndices().empty())
464 nF.resize(data.getIndices().size(), false);
465 nF.clear();
466 CHKERR integrate(side, type, data);
467 CHKERR assemble(side, type, data);
469 }

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

409 {
411 CHKERR integrate(data);
413 }

Member Data Documentation

◆ assembleSymmetry

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

Definition at line 382 of file EshelbianPlasticity.hpp.

◆ dataAtPts

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

data at integration pts

Definition at line 385 of file EshelbianPlasticity.hpp.

◆ K

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

local tangent matrix

Definition at line 399 of file EshelbianPlasticity.hpp.

◆ nF

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

local right hand side vector

Definition at line 398 of file EshelbianPlasticity.hpp.

◆ transposeK

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

Definition at line 400 of file EshelbianPlasticity.hpp.


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