50 CHKERR require(
cells.size() == 1,
"Expected the one-hex fixture");
51 const auto cell =
cells.front();
53 auto physical_fe = boost::make_shared<DomainEle>(
mField);
54 physical_fe->getRuleHook =
updateFe->getRuleHook;
55 auto values = boost::make_shared<MatrixDouble>();
56 physical_fe->getOpPtrVector().push_back(
60 const auto material_points =
values->size1();
61 CHKERR require(material_points > 0,
"Missing physical integration points");
69 const void *ptr =
values.data();
73 const auto check_output = [&](
auto &fe,
const std::string &fe_name) {
75 CHKERR require(
static_cast<bool>(fe),
"Missing output pipeline");
80 auto &output = fe->getPostProcMesh();
83 CHKERR require(
vertices.size() > 1,
"Expected several plotting points");
86 CHKERR output.tag_get_handle(
name.c_str(), output_tag);
87 int output_components;
88 CHKERR output.tag_get_length(output_tag, output_components);
92 CHKERR require(std::abs(
v - 1.25) < 1e-12,
93 "Output differs from accepted material history");
100 "Plotting added entries to material history");
101 const auto *
values =
static_cast<const double *
>(ptr);
102 for (
int i = 0;
i !=
size; ++
i)
104 "Plotting changed accepted material history");
110 MOFEM_LOG(
"WORLD", Sev::inform) <<
"UMAT post-processing checks passed";
116int main(
int argc,
char **argv) {
118 logging::core::get()->add_sink(
std::vector< int > vertices
std::vector< Cell > cells
int components
Inferred from the source tag length.
SmartPetscObj< Vec > values
ElementsAndOps< SPACE_DIM >::DomainEle DomainEle
ElementsAndOps< SPACE_DIM >::BoundaryEle BoundaryEle
#define CATCH_ERRORS
Catch errors.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_ATOM_TEST_INVALID
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
PostProcEleByDim< SPACE_DIM >::PostProcEleDomain PostProcEleDomain
PostProcEleByDim< SPACE_DIM >::PostProcEleBdy PostProcEleBdy
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG(channel, severity)
Log.
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
ElementsAndOps< SPACE_DIM >::SideEle SideEle
MoFEMErrorCode boundaryCondition()
[Set up problem]
MoFEMErrorCode readMesh()
[Run problem]
MoFEM::Interface & mField
Reference to MoFEM interface.
MoFEMErrorCode setupProblem()
[Run problem]
virtual moab::Interface & get_moab()=0
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Data on single entity (This is passed as argument to DataOperator::doWork)
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.
Specialization for MatrixDouble vector field values calculation.
Template struct for dimension-specific finite element types.
Simple interface for fast problem set-up.
const std::string getBoundaryFEName() const
Get the Boundary FE Name.
MoFEMErrorCode getDM(DM *dm)
Get DM.
const std::string getDomainFEName() const
Get the Domain FE Name.
Force scale operator for reading two columns.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
MatOps::StateTags postProcStateTags
UmatExample(MoFEM::Interface &m_field)
boost::shared_ptr< PostProcEleBdy > postProcBdyFe
MoFEMErrorCode assembleSystemAdolc()
boost::shared_ptr< MatOps::PhysicalEquations > physicalEquationsPtr
boost::shared_ptr< PostProcEleDomain > postProcDomainFe
boost::shared_ptr< DomainEle > updateFe