v0.14.0
Classes | Typedefs | Functions | Variables
adolc_plasticity.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>
#include <ContactNaturalBC.hpp>
#include <ADOLCPlasticity.hpp>
#include <ADOLCPlasticityMaterialModels.hpp>

Go to the source code of this file.

Classes

struct  ElementsAndOps< DIM >
 
struct  ElementsAndOps< 2 >
 
struct  ElementsAndOps< 3 >
 
struct  PlasticProblem
 
struct  Monitor
 [Push operators to pipeline] More...
 

Typedefs

using EntData = EntitiesFieldData::EntData
 
using DomainEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::DomainEle
 
using BoundaryEle = PipelineManager::ElementsAndOpsByDim< SPACE_DIM >::BoundaryEle
 
using DomainEleOp = DomainEle::UserDataOperator
 
using BoundaryEleOp = BoundaryEle::UserDataOperator
 
using DomainNaturalBC = NaturalBC< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 
using OpBodyForce = DomainNaturalBC::OpFlux< NaturalMeshsetType< BLOCKSET >, 1, SPACE_DIM >
 
using BoundaryRhsBCs = NaturalBC< BoundaryEleOp >::Assembly< PETSC >::LinearForm< GAUSS >
 
using OpBoundaryRhsBCs = BoundaryRhsBCs::OpFlux< ContactOps::BoundaryBCs, 1, SPACE_DIM >
 
using BoundaryLhsBCs = NaturalBC< BoundaryEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >
 
using OpBoundaryLhsBCs = BoundaryLhsBCs::OpFlux< ContactOps::BoundaryBCs, 1, SPACE_DIM >
 
using PostProcEleDomain = ElementsAndOps< SPACE_DIM >::PostProcEleDomain
 
using SideEle = ElementsAndOps< SPACE_DIM >::SideEle
 
using PostProcEleBdy = ElementsAndOps< SPACE_DIM >::PostProcEleBdy
 

Functions

int main (int argc, char *argv[])
 

Variables

constexpr int SPACE_DIM
 
constexpr FieldSpace CONTACT_SPACE = ElementsAndOps<SPACE_DIM>::CONTACT_SPACE
 
double scale = 1.
 
static boost::shared_ptr< TSUpdatets_update_ptr = nullptr
 
static char help [] = "...\n\n"
 [Check] More...
 

Typedef Documentation

◆ BoundaryEle

Select finite element type for integrate on boundary based on problem dimension

Definition at line 28 of file adolc_plasticity.cpp.

◆ BoundaryEleOp

Operators used to assemble boundary integrals

Definition at line 35 of file adolc_plasticity.cpp.

◆ BoundaryLhsBCs

using BoundaryLhsBCs = NaturalBC<BoundaryEleOp>::Assembly<PETSC>::BiLinearForm<GAUSS>

Use Gauss quadrature rule and PETSc assembly to integrate neural boundary conditions. Select bi-linear forms operators.

Definition at line 70 of file adolc_plasticity.cpp.

◆ BoundaryRhsBCs

using BoundaryRhsBCs = NaturalBC<BoundaryEleOp>::Assembly<PETSC>::LinearForm<GAUSS>

Use Gauss quadrature rule and PETSc assembly to integrate neural boundary conditions. Select linear forms operators.

Definition at line 58 of file adolc_plasticity.cpp.

◆ DomainEle

Select finite element type for integration on domain based on problem dimension

Examples
adolc_plasticity.cpp.

Definition at line 22 of file adolc_plasticity.cpp.

◆ DomainEleOp

Operators used to assemble domain integrals

Definition at line 31 of file adolc_plasticity.cpp.

◆ DomainNaturalBC

using DomainNaturalBC = NaturalBC<DomainEleOp>::Assembly<PETSC>::LinearForm<GAUSS>

Linear forms used to integrate body forces

Definition at line 40 of file adolc_plasticity.cpp.

◆ EntData

Examples
adolc_plasticity.cpp.

Definition at line 17 of file adolc_plasticity.cpp.

◆ OpBodyForce

Select linear froms reading data from blockest (e.g. "BODY_FORCE") and applying body force.

Definition at line 46 of file adolc_plasticity.cpp.

◆ OpBoundaryLhsBCs

using OpBoundaryLhsBCs = BoundaryLhsBCs::OpFlux<ContactOps::BoundaryBCs, 1, SPACE_DIM>

Use specialization from adv-1 integrating boundary conditions on forces and with springs

Definition at line 76 of file adolc_plasticity.cpp.

◆ OpBoundaryRhsBCs

using OpBoundaryRhsBCs = BoundaryRhsBCs::OpFlux<ContactOps::BoundaryBCs, 1, SPACE_DIM>

Definition at line 64 of file adolc_plasticity.cpp.

◆ PostProcEleBdy

Definition at line 104 of file adolc_plasticity.cpp.

◆ PostProcEleDomain

Definition at line 102 of file adolc_plasticity.cpp.

◆ SideEle

Definition at line 103 of file adolc_plasticity.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

[Register MoFEM discrete manager in PETSc]

[Register MoFEM discrete manager in PETSc

[Create MoAB]

< mesh database

< mesh database interface

[Create MoAB]

[Create MoFEM]

< finite element database

< finite element database interface

[Create MoFEM]

[PlasticProblem]

[PlasticProblem]

Examples
adolc_plasticity.cpp.

Definition at line 1189 of file adolc_plasticity.cpp.

1189  {
1190 
1191 #ifdef ADD_CONTACT
1192 #ifdef PYTHON_SDF
1193  Py_Initialize();
1194  np::initialize();
1195 #endif
1196 #endif // ADD_CONTACT
1197 
1198  // Initialisation of MoFEM/PETSc and MOAB data structures
1199  const char param_file[] = "param_file.petsc";
1200  MoFEM::Core::Initialize(&argc, &argv, param_file, help);
1201 
1202  // Add logging channel for example
1203  auto core_log = logging::core::get();
1204  core_log->add_sink(
1205  LogManager::createSink(LogManager::getStrmWorld(), "PlasticPrb"));
1206  LogManager::setLog("PlasticPrb");
1207  MOFEM_LOG_TAG("PlasticPrb", "PlasticPrb");
1208  MOFEM_LOG("PlasticPrb", Sev::inform) << "SPACE_DIM " << SPACE_DIM;
1209 #ifdef ADD_CONTACT
1210  core_log->add_sink(
1211  LogManager::createSink(LogManager::getStrmWorld(), "CONTACT"));
1212  LogManager::setLog("CONTACT");
1213  MOFEM_LOG_TAG("CONTACT", "Contact");
1214 #endif // ADD_CONTACT
1215 
1216  try {
1217 
1218  //! [Register MoFEM discrete manager in PETSc]
1219  DMType dm_name = "DMMOFEM";
1220  CHKERR DMRegister_MoFEM(dm_name);
1221  //! [Register MoFEM discrete manager in PETSc
1222 
1223  //! [Create MoAB]
1224  moab::Core mb_instance; ///< mesh database
1225  moab::Interface &moab = mb_instance; ///< mesh database interface
1226  //! [Create MoAB]
1227 
1228  //! [Create MoFEM]
1229  MoFEM::Core core(moab); ///< finite element database
1230  MoFEM::Interface &m_field = core; ///< finite element database interface
1231  //! [Create MoFEM]
1232 
1233  //! [PlasticProblem]
1234  PlasticProblem ex(m_field);
1235  CHKERR ex.runProblem();
1236  //! [PlasticProblem]
1237  }
1238  CATCH_ERRORS;
1239 
1241 #ifdef ADD_CONTACT
1242 #ifdef PYTHON_SDF
1243  if (Py_FinalizeEx() < 0) {
1244  exit(120);
1245  }
1246 #endif
1247 #endif // ADD_CONTACT
1248  return 0;
1249 }

Variable Documentation

◆ CONTACT_SPACE

constexpr FieldSpace CONTACT_SPACE = ElementsAndOps<SPACE_DIM>::CONTACT_SPACE
constexpr
Examples
adolc_plasticity.cpp.

Definition at line 100 of file adolc_plasticity.cpp.

◆ help

char help[] = "...\n\n"
static

[Check]

Examples
adolc_plasticity.cpp.

Definition at line 1187 of file adolc_plasticity.cpp.

◆ scale

double scale = 1.
Examples
adolc_plasticity.cpp.

Definition at line 109 of file adolc_plasticity.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:
Examples
adolc_plasticity.cpp.

Definition at line 14 of file adolc_plasticity.cpp.

◆ ts_update_ptr

boost::shared_ptr<TSUpdate> ts_update_ptr = nullptr
static
Examples
adolc_plasticity.cpp.

Definition at line 690 of file adolc_plasticity.cpp.

EXECUTABLE_DIMENSION
#define EXECUTABLE_DIMENSION
Definition: plastic.cpp:13
SPACE_DIM
constexpr int SPACE_DIM
Definition: adolc_plasticity.cpp:14
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
MoFEM::CoreTmp< 0 >::Finalize
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:112
help
static char help[]
[Check]
Definition: adolc_plasticity.cpp:1187
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
PlasticProblem
Definition: adolc_plasticity.cpp:127
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::DMRegister_MoFEM
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMoFEM.cpp:43
MOFEM_LOG_TAG
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Definition: LogManager.hpp:339
MoFEM::CoreTmp< 0 >::Initialize
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:72
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
CATCH_ERRORS
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:385
MoFEM::Core
CoreTmp< 0 > Core
Definition: Core.hpp:1148