v0.15.0
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
adolc_plasticity.cpp File Reference
#include <MoFEM.hpp>
#include <MatrixFunction.hpp>
#include <ContactNaturalBC.hpp>
#include <HenckyOps.hpp>
#include <ADOLCPlasticity.hpp>
#include <ADOLCPlasticityLargeStrain.hpp>
#include <ADOLCPlasticityMaterialModels.hpp>

Go to the source code of this file.

Classes

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]
 

Typedef Documentation

◆ BoundaryEle

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

Definition at line 27 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 69 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 57 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 39 of file adolc_plasticity.cpp.

◆ EntData

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 45 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 75 of file adolc_plasticity.cpp.

◆ OpBoundaryRhsBCs

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

Definition at line 63 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]

Definition at line 1344 of file adolc_plasticity.cpp.

1344 {
1345
1346#ifdef ADD_CONTACT
1347#ifdef ENABLE_PYTHON_BINDING
1348 Py_Initialize();
1349 np::initialize();
1350#endif
1351#endif // ADD_CONTACT
1352
1353 // Initialisation of MoFEM/PETSc and MOAB data structures
1354 const char param_file[] = "param_file.petsc";
1355 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
1356
1357 // Add logging channel for example
1358 auto core_log = logging::core::get();
1359 core_log->add_sink(
1361 LogManager::setLog("PlasticPrb");
1362 MOFEM_LOG_TAG("PlasticPrb", "PlasticPrb");
1363 MOFEM_LOG("PlasticPrb", Sev::inform) << "SPACE_DIM " << SPACE_DIM;
1364#ifdef ADD_CONTACT
1365 core_log->add_sink(
1367 LogManager::setLog("CONTACT");
1368 MOFEM_LOG_TAG("CONTACT", "Contact");
1369#endif // ADD_CONTACT
1370
1371 try {
1372
1373 //! [Register MoFEM discrete manager in PETSc]
1374 DMType dm_name = "DMMOFEM";
1375 CHKERR DMRegister_MoFEM(dm_name);
1376 //! [Register MoFEM discrete manager in PETSc
1377
1378 //! [Create MoAB]
1379 moab::Core mb_instance; ///< mesh database
1380 moab::Interface &moab = mb_instance; ///< mesh database interface
1381 //! [Create MoAB]
1382
1383 //! [Create MoFEM]
1384 MoFEM::Core core(moab); ///< finite element database
1385 MoFEM::Interface &m_field = core; ///< finite element database interface
1386 //! [Create MoFEM]
1387
1388 //! [PlasticProblem]
1389 PlasticProblem ex(m_field);
1390 CHKERR ex.runProblem();
1391 //! [PlasticProblem]
1392 }
1394
1396#ifdef ADD_CONTACT
1397#ifdef ENABLE_PYTHON_BINDING
1398 if (Py_FinalizeEx() < 0) {
1399 exit(120);
1400 }
1401#endif
1402#endif // ADD_CONTACT
1403 return 0;
1404}
static char help[]
[Check]
constexpr int SPACE_DIM
#define CATCH_ERRORS
Catch errors.
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG(channel, severity)
Log.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
Core (interface) class.
Definition Core.hpp:82
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
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:118
Deprecated interface functions.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.

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]

Definition at line 1342 of file adolc_plasticity.cpp.

◆ scale

double scale = 1.
Examples
adolc_plasticity.cpp.

Definition at line 106 of file adolc_plasticity.cpp.

◆ SPACE_DIM

constexpr int SPACE_DIM
constexpr
Initial value:
=
#define EXECUTABLE_DIMENSION
Definition plastic.cpp:13
Examples
adolc_plasticity.cpp, and free_surface.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 792 of file adolc_plasticity.cpp.