759 {
761
763 OpMatBlocks(std::string
field_name, boost::shared_ptr<MatrixDouble>
m,
766 std::vector<const CubitMeshSets *> meshset_vec_ptr)
770 std::fill(&(doEntities[MBEDGE]), &(doEntities[MBMAXTYPE]), false);
772 "Can not get data from block");
773 }
774
778
779 for (auto &b : blockData) {
780
781 if (b.blockEnts.find(getFEEntityHandle()) != b.blockEnts.end()) {
782 CHKERR getMatDPtr(matDPtr, b.bulkModulusK, b.shearModulusG);
784 }
785 }
786
787 CHKERR getMatDPtr(matDPtr, bulkModulusKDefault, shearModulusGDefault);
789 }
790
791 private:
792 boost::shared_ptr<MatrixDouble> matDPtr;
793
795 double bulkModulusK;
796 double shearModulusG;
798 };
799
800 double bulkModulusKDefault;
801 double shearModulusGDefault;
802 std::vector<BlockData> blockData;
803
806 std::vector<const CubitMeshSets *> meshset_vec_ptr,
809
810 for (
auto m : meshset_vec_ptr) {
812 std::vector<double> block_data;
813 CHKERR m->getAttributes(block_data);
814 if (block_data.size() != 2) {
816 "Expected that block has two attribute");
817 }
818 auto get_block_ents = [&]() {
821 m_field.
get_moab().get_entities_by_handle(
m->meshset, ents,
true);
822 return ents;
823 };
824
829
832
833 blockData.push_back(
835 }
838 }
839
840 MoFEMErrorCode getMatDPtr(boost::shared_ptr<MatrixDouble> mat_D_ptr,
843
844 auto set_material_stiffness = [&]() {
853 : 1;
854 auto t_D = getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, 0>(*mat_D_ptr);
859 };
860
863 set_material_stiffness();
865 }
866 };
867
870 pipeline.push_back(new OpMatBlocks(
872
873
875
876 (boost::format("%s(.*)") % block_name).str()
877
878 ))
879
880 ));
881
883}
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
Kronecker Delta class symmetric.
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
constexpr double shear_modulus_G
constexpr double bulk_modulus_K
FTensor::Index< 'm', SPACE_DIM > m
SeverityLevel
Severity levels.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
MoFEMErrorCode getCubitMeshsetPtr(const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr) const
get cubit meshset
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
constexpr auto field_name
virtual moab::Interface & get_moab()=0
virtual MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Operator for bi-linear form, usually to calculate values on left hand side.
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
Interface for managing meshsets containing materials and boundary conditions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.