v0.13.1
Classes | Typedefs | Functions | Variables
multifield_plasticity.cpp File Reference
#include <MoFEM.hpp>
#include <chrono>
#include <boost/tokenizer.hpp>
#include <IntegrationRules.hpp>
#include <BlockMatData.hpp>
#include <MultifieldPlasticity.hpp>
#include <BasicFiniteElements.hpp>
#include <AnalyticalSurfaces.hpp>
#include <RigidBodies.hpp>
#include <BasicFeTools.hpp>
#include <MatrixFunction.hpp>
#include <ElasticOperators.hpp>
#include <PlasticOperators.hpp>
#include <ContactOperators.hpp>
#include <RotatingFrameOperators.hpp>
#include <DualBase.hpp>
#include <DefaultParams.hpp>

Go to the source code of this file.

Classes

struct  MeasureTime
 
struct  ContactPlasticity
 
struct  ContactPlasticity::ProblemData
 
struct  ContactPlasticity::MMonitor
 

Typedefs

using OpLogStrainMatrixLhs = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::BiLinearForm< GAUSS >::OpGradTensorGrad< 1, 3, 3, 1 >
 
using OpStiffnessMatrixLhs = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::BiLinearForm< GAUSS >::OpGradSymTensorGrad< 1, 3, 3, 0 >
 
using OpBodyForce = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::LinearForm< GAUSS >::OpSource< 1, 3 >
 
using OpMixDivULhs = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::BiLinearForm< GAUSS >::OpMixDivTimesVec< 3 >
 
using OpLambdaGraULhs = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::BiLinearForm< GAUSS >::OpMixTensorTimesGrad< 3 >
 
using OpMixDivURhs = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::LinearForm< GAUSS >::OpMixDivTimesU< 3, 3, 3 >
 
using OpMiXLambdaGradURhs = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::LinearForm< GAUSS >::OpMixTensorTimesGradU< 3 >
 
using OpMixUTimesDivLambdaRhs = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::LinearForm< GAUSS >::OpMixVecTimesDivLambda< 3 >
 
using OpMixUTimesLambdaRhs = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::LinearForm< GAUSS >::OpGradTimesTensor< 1, 3, 3 >
 
using OpSpringLhs = FormsIntegrators< BoundaryEleOp >::Assembly< USER_ASSEMBLE >::BiLinearForm< GAUSS >::OpMass< 1, 3 >
 
using OpSpringLhsNoFS = FormsIntegrators< BoundaryEleOp >::Assembly< USER_ASSEMBLE >::BiLinearForm< GAUSS >::OpMass< 1, 3 >
 
using OpSpringRhs = FormsIntegrators< BoundaryEleOp >::Assembly< USER_ASSEMBLE >::LinearForm< GAUSS >::OpBaseTimesVector< 1, 3, 1 >
 
using OpInertiaForce = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::LinearForm< GAUSS >::OpBaseTimesVector< 1, 3, 1 >
 
using OpCentrifugalForce2 = FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::LinearForm< GAUSS >::OpSource< 1, 3 >
 

Functions

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

Variables

BlockParamDatacache
 
std::map< int, BlockParamDatamat_blocks
 
constexpr bool TEST_H1_SPACE = false
 
EntityType zero_type = TEST_H1_SPACE ? MBVERTEX : MBTET
 
FieldSpace space_test = (TEST_H1_SPACE ? H1 : L2)
 
static char help [] = "...\n\n"
 

Detailed Description

Multifield plasticity with contact

Definition in file multifield_plasticity.cpp.

Typedef Documentation

◆ OpBodyForce

using OpBodyForce = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::LinearForm<GAUSS>::OpSource<1, 3>

Definition at line 49 of file multifield_plasticity.cpp.

◆ OpCentrifugalForce2

using OpCentrifugalForce2 = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::LinearForm<GAUSS>::OpSource<1, 3>

Definition at line 75 of file multifield_plasticity.cpp.

◆ OpInertiaForce

using OpInertiaForce = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::LinearForm<GAUSS>::OpBaseTimesVector<1, 3, 1>

Definition at line 72 of file multifield_plasticity.cpp.

◆ OpLambdaGraULhs

using OpLambdaGraULhs = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::BiLinearForm<GAUSS>::OpMixTensorTimesGrad<3>

Definition at line 54 of file multifield_plasticity.cpp.

◆ OpLogStrainMatrixLhs

using OpLogStrainMatrixLhs = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::BiLinearForm<GAUSS>::OpGradTensorGrad<1, 3, 3, 1>

Definition at line 45 of file multifield_plasticity.cpp.

◆ OpMixDivULhs

using OpMixDivULhs = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::BiLinearForm<GAUSS>::OpMixDivTimesVec<3>

Definition at line 52 of file multifield_plasticity.cpp.

◆ OpMixDivURhs

using OpMixDivURhs = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::LinearForm<GAUSS>::OpMixDivTimesU<3, 3, 3>

Definition at line 56 of file multifield_plasticity.cpp.

◆ OpMiXLambdaGradURhs

using OpMiXLambdaGradURhs = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::LinearForm<GAUSS>::OpMixTensorTimesGradU<3>

Definition at line 58 of file multifield_plasticity.cpp.

◆ OpMixUTimesDivLambdaRhs

using OpMixUTimesDivLambdaRhs = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::LinearForm<GAUSS>::OpMixVecTimesDivLambda<3>

Definition at line 60 of file multifield_plasticity.cpp.

◆ OpMixUTimesLambdaRhs

using OpMixUTimesLambdaRhs = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::LinearForm<GAUSS>::OpGradTimesTensor<1, 3, 3>

Definition at line 62 of file multifield_plasticity.cpp.

◆ OpSpringLhs

using OpSpringLhs = FormsIntegrators<BoundaryEleOp>::Assembly< USER_ASSEMBLE>::BiLinearForm<GAUSS>::OpMass<1, 3>

Definition at line 65 of file multifield_plasticity.cpp.

◆ OpSpringLhsNoFS

using OpSpringLhsNoFS = FormsIntegrators<BoundaryEleOp>::Assembly< USER_ASSEMBLE>::BiLinearForm<GAUSS>::OpMass<1, 3>

Definition at line 67 of file multifield_plasticity.cpp.

◆ OpSpringRhs

using OpSpringRhs = FormsIntegrators<BoundaryEleOp>::Assembly< USER_ASSEMBLE>::LinearForm<GAUSS>::OpBaseTimesVector<1, 3, 1>

Definition at line 69 of file multifield_plasticity.cpp.

◆ OpStiffnessMatrixLhs

using OpStiffnessMatrixLhs = FormsIntegrators<DomainEleOp>::Assembly< USER_ASSEMBLE>::BiLinearForm<GAUSS>::OpGradSymTensorGrad<1, 3, 3, 0>

Definition at line 47 of file multifield_plasticity.cpp.

Function Documentation

◆ main()

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

Definition at line 2557 of file multifield_plasticity.cpp.

2557 {
2558
2559#include <DefaultParams.hpp>
2560
2561 MoFEM::Core::Initialize(&argc, &argv, param_file.c_str(), help);
2562
2563 try {
2564
2565 DMType dm_name = "DMMOFEM";
2566 CHKERR DMRegister_MoFEM(dm_name);
2567
2568 moab::Core mb_instance; ///< mesh database
2569 moab::Interface &moab = mb_instance; ///< mesh database interface
2570
2571 MoFEM::Core core(moab); ///< finite element database
2572 MoFEM::Interface &m_field = core; ///< finite element database insterface
2573
2574 Simple *simple = m_field.getInterface<Simple>();
2575 simple->getProblemName() = "Multifield plasticity";
2576 CHKERR simple->getOptions();
2577
2578 ContactPlasticity ex(m_field);
2580
2581 PetscBool is_partitioned = PETSC_FALSE;
2582 CHKERR PetscOptionsGetBool(PETSC_NULL, "", "-is_partitioned",
2583 &is_partitioned, PETSC_NULL);
2584 if (is_partitioned) {
2585 CHKERR simple->loadFile();
2586 } else {
2587 if (m_field.get_comm_size() > 1 && true) {
2588 CHKERR simple->loadFile("", "");
2590 } else
2591 CHKERR simple->loadFile("");
2592 }
2593
2594 // Add meshsets with material and boundary conditions
2595 CHKERR m_field.getInterface<MeshsetsManager>()->setMeshsetFromFile();
2596
2597 CHKERR ex.loadMeshBlockSets();
2599 if (ex.data.scale_params)
2600 for (auto &mit : mat_blocks)
2601 CHKERR mit.second.scaleParameters();
2602
2603 CHKERR ex.runProblem();
2604 }
2606
2608}
std::string param_file
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition: acoustic.cpp:69
#define CATCH_ERRORS
Catch errors.
Definition: definitions.h:385
#define CHKERR
Inline error check.
Definition: definitions.h:548
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition: DMMMoFEM.cpp:59
std::map< int, BlockParamData > mat_blocks
static char help[]
BlockParamData * cache
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
CoreTmp< 0 > Core
Definition: Core.hpp:1096
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1965
MoFEMErrorCode getOptionsFromCommandLine()
static MoFEMErrorCode getAnalysisParameters()
static MoFEMErrorCode myMeshPartition(MoFEM::Interface &m_field)
virtual int get_comm_size() const =0
Core (interface) class.
Definition: Core.hpp:92
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition: Core.cpp:85
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition: Core.cpp:125
Deprecated interface functions.
Interface for managing meshsets containing materials and boundary conditions.
Simple interface for fast problem set-up.
Definition: Simple.hpp:35
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.

Variable Documentation

◆ cache

Definition at line 87 of file multifield_plasticity.cpp.

◆ help

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

Definition at line 2555 of file multifield_plasticity.cpp.

◆ mat_blocks

std::map<int, BlockParamData> mat_blocks

Definition at line 88 of file multifield_plasticity.cpp.

◆ space_test

FieldSpace space_test = (TEST_H1_SPACE ? H1 : L2)

Definition at line 105 of file multifield_plasticity.cpp.

◆ TEST_H1_SPACE

constexpr bool TEST_H1_SPACE = false
constexpr

Definition at line 103 of file multifield_plasticity.cpp.

◆ zero_type

EntityType zero_type = TEST_H1_SPACE ? MBVERTEX : MBTET

Definition at line 104 of file multifield_plasticity.cpp.