v0.14.0
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
FractureMechanics::MWLSApprox::OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl< T > Struct Template Reference

#include <users_modules/fracture_mechanics/src/MWLS.hpp>

Inheritance diagram for FractureMechanics::MWLSApprox::OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl< T >:
[legend]
Collaboration diagram for FractureMechanics::MWLSApprox::OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl< T >:
[legend]

Public Member Functions

 OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl (boost::shared_ptr< MatrixDouble > mat_pos_at_pts_ptr, boost::shared_ptr< MatrixDouble > mat_grad_pos_at_pts_ptr, boost::shared_ptr< CrackFrontElement > fe_singular_ptr, boost::shared_ptr< MWLSApprox > mwls_approx, bool testing=false)
 
- Public Member Functions inherited from FractureMechanics::MWLSApprox::OpMWLSBase< T >
 OpMWLSBase (boost::shared_ptr< MatrixDouble > mat_pos_at_pts_ptr, boost::shared_ptr< MatrixDouble > mat_grad_pos_at_pts_ptr, boost::shared_ptr< CrackFrontElement > fe_singular_ptr, boost::shared_ptr< MWLSApprox > mwls_approx, bool testing=false)
 
virtual ~OpMWLSBase ()=default
 
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 

Public Attributes

const bool testing
 
- Public Attributes inherited from FractureMechanics::MWLSApprox::OpMWLSBase< T >
boost::shared_ptr< MatrixDouble > matPosAtPtsPtr
 
boost::shared_ptr< MatrixDouble > matGradPosAtPtsPtr
 
boost::weak_ptr< CrackFrontElementfeSingularPtr
 
boost::shared_ptr< MWLSApproxmwlsApprox
 

Protected Member Functions

MoFEMErrorCode doMWLSWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 Do specific work in operator. More...
 

Detailed Description

template<class T>
struct FractureMechanics::MWLSApprox::OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl< T >

Definition at line 277 of file MWLS.hpp.

Constructor & Destructor Documentation

◆ OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl()

template<class T >
FractureMechanics::MWLSApprox::OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl< T >::OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl ( boost::shared_ptr< MatrixDouble >  mat_pos_at_pts_ptr,
boost::shared_ptr< MatrixDouble >  mat_grad_pos_at_pts_ptr,
boost::shared_ptr< CrackFrontElement fe_singular_ptr,
boost::shared_ptr< MWLSApprox mwls_approx,
bool  testing = false 
)
inline

Definition at line 280 of file MWLS.hpp.

285  : OpMWLSBase<T>(mat_pos_at_pts_ptr, mat_grad_pos_at_pts_ptr,
286  fe_singular_ptr, mwls_approx, testing),
287  testing(testing) {}

Member Function Documentation

◆ doMWLSWork()

template<class T >
MoFEMErrorCode FractureMechanics::MWLSApprox::OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl< T >::doMWLSWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData data 
)
protectedvirtual

Do specific work in operator.

Is protected to prevent direct call. This can be only called by doWork method.

Parameters
side
type
data
Returns
MoFEMErrorCode

Implements FractureMechanics::MWLSApprox::OpMWLSBase< T >.

Definition at line 1237 of file MWLS.cpp.

1238  {
1240 
1242  const int nb_gauss_pts = data.getN().size1();
1243  auto &mwls = this->mwlsApprox;
1244 
1245  if (mwls->invABMap.find(this->getFEEntityHandle()) == mwls->invABMap.end() ||
1246  mwls->influenceNodesMap.find(this->getFEEntityHandle()) ==
1247  mwls->influenceNodesMap.end()) {
1248 
1249  // MOFEM_LOG("MWLSSelf", Sev::noisy) << "Calculate coeffs" << endl;
1250 
1251  const bool use_global_base =
1252  mwls->getUseGlobalBaseAtMaterialReferenceConfiguration();
1253  if (use_global_base)
1254  SETERRQ(PETSC_COMM_SELF, MOFEM_IMPOSSIBLE_CASE,
1255  "Coefficients can be precalculated only for local base in "
1256  "reference configuration");
1257 
1258  auto &inv_AB_map = mwls->invABMap[this->getFEEntityHandle()];
1259  inv_AB_map.resize(nb_gauss_pts);
1260  auto &influence_nodes_map =
1261  mwls->influenceNodesMap[this->getFEEntityHandle()];
1262  influence_nodes_map.resize(nb_gauss_pts);
1263  auto &dm_nodes_map = mwls->dmNodesMap[this->getFEEntityHandle()];
1264  dm_nodes_map.resize(nb_gauss_pts);
1265 
1266  auto t_approx_base_point = getFTensor1FromMat<3>(mwls->approxBasePoint);
1267  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
1268 
1269  FTensor::Tensor1<double, 3> t_approx_base_pos;
1270  t_approx_base_pos(i) = t_approx_base_point(i);
1271 
1272  CHKERR mwls->getInfluenceNodes(&t_approx_base_pos(0));
1273  CHKERR mwls->calculateApproxCoeff(true, false);
1274 
1275  influence_nodes_map[gg] = mwls->influenceNodes;
1276  MatrixDouble &invAB = mwls->invAB;
1277  inv_AB_map[gg].resize(invAB.size1(), invAB.size2(), false);
1278  noalias(inv_AB_map[gg]) = invAB;
1279  dm_nodes_map[gg] = mwls->shortenDm;
1280 
1281  ++t_approx_base_point;
1282  }
1283  }
1284 
1286 }

Member Data Documentation

◆ testing

Definition at line 279 of file MWLS.hpp.


The documentation for this struct was generated from the following files:
FractureMechanics::MWLSApprox::OpMWLSBase::mwlsApprox
boost::shared_ptr< MWLSApprox > mwlsApprox
Definition: MWLS.hpp:242
FractureMechanics::MWLSApprox::invAB
MatrixDouble invAB
Definition: MWLS.hpp:648
FTensor::Tensor1< double, 3 >
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
MOFEM_IMPOSSIBLE_CASE
@ MOFEM_IMPOSSIBLE_CASE
Definition: definitions.h:35
FractureMechanics::MWLSApprox::OpMWLSCalculateBaseCoeffcientsAtGaussPtsTmpl::testing
const bool testing
Definition: MWLS.hpp:279
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index< 'i', 3 >
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346