v0.13.1
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
PlaneRigidBody Struct Reference

#include <users_modules/multifield_plasticity/src/RigidBodies.hpp>

Inheritance diagram for PlaneRigidBody:
[legend]
Collaboration diagram for PlaneRigidBody:
[legend]

Public Member Functions

 PlaneRigidBody (VectorDouble c_coords, VectorDouble roller_disp, int id)
 
MoFEMErrorCode getRollerDataForTag ()
 
Tensor1< double, 3 > getNormal (Tensor1< TPack3, 3 > &t_coords, Tensor1< TPack1, 3 > &t_disp)
 
Tensor1< double, 3 > getNormal (Tensor1< TPack3, 3 > &t_coords, Tensor1< double, 3 > &t_disp)
 
Tensor1< double, 3 > getNormal (Tensor1< double, 3 > &t_coords, Tensor1< double, 3 > &t_disp)
 
Tensor2< double, 3, 3 > getDiffNormal (Tensor1< TPack3, 3 > &t_coords, Tensor1< TPack1, 3 > &t_disp, Tensor1< TPack1, 3 > &t_normal)
 
double getGap (Tensor1< TPack3, 3 > &t_coords)
 
Tensor1< double, 3 > getdGap (Tensor1< TPack3, 3 > &t_coords, Tensor1< TPack1, 3 > &t_normal)
 
template<typename T1 , typename T2 >
Tensor1< double, 3 > & getNormalImpl (Tensor1< T1, 3 > &t_coords, Tensor1< T2, 3 > &t_disp)
 
template<typename T1 >
double getGapImpl (Tensor1< T1, 3 > &t_coords)
 
template<typename T1 , typename T2 , typename T3 >
Tensor2< double, 3, 3 > getDiffNormalImpl (Tensor1< T1, 3 > &t_coords, Tensor1< T2, 3 > &t_disp, Tensor1< T3, 3 > &t_normal)
 
template<typename T1 , typename T2 >
Tensor1< double, 3 > getdGapImpl (Tensor1< T1, 3 > &t_coords, Tensor1< T2, 3 > &t_normal)
 
MoFEMErrorCode getBodyOptions ()
 
- Public Member Functions inherited from RigidBodyData
 RigidBodyData (VectorDouble c_coords, VectorDouble roller_disp, int id)
 
 RigidBodyData ()=delete
 
virtual ~RigidBodyData ()
 
virtual Tensor1< double, 3 > getNormal (Tensor1< TPack3, 3 > &t_coords, Tensor1< TPack1, 3 > &t_disp)=0
 
virtual Tensor1< double, 3 > getNormal (Tensor1< TPack3, 3 > &t_coords, Tensor1< double, 3 > &t_disp)=0
 
virtual Tensor1< double, 3 > getNormal (Tensor1< double, 3 > &t_coords, Tensor1< double, 3 > &t_disp)=0
 
virtual Tensor2< double, 3, 3 > getDiffNormal (Tensor1< TPack3, 3 > &t_coords, Tensor1< TPack1, 3 > &t_disp, Tensor1< TPack1, 3 > &t_normal)=0
 
virtual double getGap (Tensor1< TPack3, 3 > &t_coords)=0
 
virtual Tensor1< double, 3 > getdGap (Tensor1< TPack3, 3 > &t_coords, Tensor1< TPack1, 3 > &t_normal)=0
 
virtual MoFEMErrorCode getBodyOptions ()=0
 
MoFEMErrorCode computeRotationMatrix ()
 
Tensor1< double, 3 > getBodyOffset ()
 
template<typename T1 , typename T2 >
Tensor1< double, 3 > & getPointCoords (Tensor1< T1, 3 > &t_coords, Tensor1< T2, 3 > &t_disp)
 
MoFEMErrorCode saveBasicDataOnTag (moab::Interface &moab_debug, EntityHandle &vertex)
 
virtual MoFEMErrorCode getRollerDataForTag ()=0
 

Public Attributes

PetscBool fLip
 
double sIze
 
- Public Attributes inherited from RigidBodyData
const int iD
 
Index< 'i', 3 > i
 
Index< 'j', 3 > j
 
Index< 'k', 3 > k
 
VectorDouble originCoords
 
VectorDouble rollerDisp
 
VectorDouble BodyDispScaled
 
VectorDouble BodyDirectionScaled
 
double gAp
 
Tensor1< double, 3 > tNormal
 
Tensor1< double, 3 > dGap
 
Tensor1< double, 3 > pointCoords
 
Tensor1< double, 3 > closestPoint
 
Tensor1< double, 3 > defaultOrientation
 
Tensor1< double, 3 > oRientation
 
Tensor2< double, 3, 3 > rotationMat
 
Tensor2< double, 3, 3 > diffNormal
 
boost::shared_ptr< TimeAccelerogrammethodOpForRollerPosition
 
boost::shared_ptr< TimeAccelerogrammethodOpForRollerDirection
 
int bodyType
 
array< double, 9 > dataForTags
 

Additional Inherited Members

- Public Types inherited from RigidBodyData
using TPack3 = PackPtr< double *, 3 >
 
using TPack1 = PackPtr< double *, 1 >
 

Detailed Description

Definition at line 191 of file RigidBodies.hpp.

Constructor & Destructor Documentation

◆ PlaneRigidBody()

PlaneRigidBody::PlaneRigidBody ( VectorDouble  c_coords,
VectorDouble  roller_disp,
int  id 
)
inline

Definition at line 194 of file RigidBodies.hpp.

195 : RigidBodyData(c_coords, roller_disp, id), fLip(PETSC_FALSE), sIze(0) {}
PetscBool fLip
RigidBodyData()=delete

Member Function Documentation

◆ getBodyOptions()

MoFEMErrorCode PlaneRigidBody::getBodyOptions ( )
inlinevirtual

Implements RigidBodyData.

Definition at line 269 of file RigidBodies.hpp.

269 {
271 PetscBool rflg;
272 PetscInt nb_dirs = 3;
273 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "", "", "");
274 string param = "-direction" + to_string(iD);
275 CHKERR PetscOptionsGetRealArray(NULL, NULL, param.c_str(), &oRientation(0),
276 &nb_dirs, &rflg);
277 param = "-flip" + to_string(iD);
278 CHKERR PetscOptionsBool(param.c_str(), "flip the plane normal", "", fLip,
279 &fLip, PETSC_NULL);
280 if (rflg)
282 ierr = PetscOptionsEnd();
283 CHKERRG(ierr);
285 }
static PetscErrorCode ierr
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:483
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
PetscErrorCode PetscOptionsGetRealArray(PetscOptions *, const char pre[], const char name[], PetscReal dval[], PetscInt *nmax, PetscBool *set)
Tensor1< double, 3 > oRientation
Definition: RigidBodies.hpp:44
MoFEMErrorCode computeRotationMatrix()
Definition: RigidBodies.hpp:91
const int iD
Definition: RigidBodies.hpp:30

◆ getdGap()

Tensor1< double, 3 > PlaneRigidBody::getdGap ( Tensor1< TPack3, 3 > &  t_coords,
Tensor1< TPack1, 3 > &  t_normal 
)
inlinevirtual

Implements RigidBodyData.

Definition at line 226 of file RigidBodies.hpp.

227 {
228 return getdGapImpl(t_coords, t_normal);
229 }
Tensor1< double, 3 > getdGapImpl(Tensor1< T1, 3 > &t_coords, Tensor1< T2, 3 > &t_normal)

◆ getdGapImpl()

template<typename T1 , typename T2 >
Tensor1< double, 3 > PlaneRigidBody::getdGapImpl ( Tensor1< T1, 3 > &  t_coords,
Tensor1< T2, 3 > &  t_normal 
)
inline

Definition at line 263 of file RigidBodies.hpp.

264 {
265 dGap(i) = tNormal(i);
266 return dGap;
267 };
Tensor1< double, 3 > tNormal
Definition: RigidBodies.hpp:39
Tensor1< double, 3 > dGap
Definition: RigidBodies.hpp:40
Index< 'i', 3 > i
Definition: RigidBodies.hpp:31

◆ getDiffNormal()

Tensor2< double, 3, 3 > PlaneRigidBody::getDiffNormal ( Tensor1< TPack3, 3 > &  t_coords,
Tensor1< TPack1, 3 > &  t_disp,
Tensor1< TPack1, 3 > &  t_normal 
)
inlinevirtual

Implements RigidBodyData.

Definition at line 216 of file RigidBodies.hpp.

218 {
219 return getDiffNormalImpl(t_coords, t_disp, t_normal);
220 }
Tensor2< double, 3, 3 > getDiffNormalImpl(Tensor1< T1, 3 > &t_coords, Tensor1< T2, 3 > &t_disp, Tensor1< T3, 3 > &t_normal)

◆ getDiffNormalImpl()

template<typename T1 , typename T2 , typename T3 >
Tensor2< double, 3, 3 > PlaneRigidBody::getDiffNormalImpl ( Tensor1< T1, 3 > &  t_coords,
Tensor1< T2, 3 > &  t_disp,
Tensor1< T3, 3 > &  t_normal 
)
inline

Definition at line 255 of file RigidBodies.hpp.

257 {
258 const Tensor2<double, 3, 3> t_diff_norm(0., 0., 0., 0., 0., 0., 0., 0., 0.);
259 return t_diff_norm;
260 };

◆ getGap()

double PlaneRigidBody::getGap ( Tensor1< TPack3, 3 > &  t_coords)
inlinevirtual

Implements RigidBodyData.

Definition at line 222 of file RigidBodies.hpp.

222 {
223 return getGapImpl(t_coords);
224 }
double getGapImpl(Tensor1< T1, 3 > &t_coords)

◆ getGapImpl()

template<typename T1 >
double PlaneRigidBody::getGapImpl ( Tensor1< T1, 3 > &  t_coords)
inline

Definition at line 247 of file RigidBodies.hpp.

247 {
248 // test(i) = rotationMat(j, i) * t_off(j);
249 // t_d2(i) = t_coords(i) - rotationMat(j, i) * t_off(j);
250 gAp = tNormal(i) * pointCoords(i);
251 return gAp;
252 };
Tensor1< double, 3 > pointCoords
Definition: RigidBodies.hpp:41

◆ getNormal() [1/3]

Tensor1< double, 3 > PlaneRigidBody::getNormal ( Tensor1< double, 3 > &  t_coords,
Tensor1< double, 3 > &  t_disp 
)
inlinevirtual

Implements RigidBodyData.

Definition at line 211 of file RigidBodies.hpp.

212 {
213 return getNormalImpl(t_coords, t_disp);
214 }
Tensor1< double, 3 > & getNormalImpl(Tensor1< T1, 3 > &t_coords, Tensor1< T2, 3 > &t_disp)

◆ getNormal() [2/3]

Tensor1< double, 3 > PlaneRigidBody::getNormal ( Tensor1< TPack3, 3 > &  t_coords,
Tensor1< double, 3 > &  t_disp 
)
inlinevirtual

Implements RigidBodyData.

Definition at line 207 of file RigidBodies.hpp.

208 {
209 return getNormalImpl(t_coords, t_disp);
210 }

◆ getNormal() [3/3]

Tensor1< double, 3 > PlaneRigidBody::getNormal ( Tensor1< TPack3, 3 > &  t_coords,
Tensor1< TPack1, 3 > &  t_disp 
)
inlinevirtual

Implements RigidBodyData.

Definition at line 203 of file RigidBodies.hpp.

204 {
205 return getNormalImpl(t_coords, t_disp);
206 }

◆ getNormalImpl()

template<typename T1 , typename T2 >
Tensor1< double, 3 > & PlaneRigidBody::getNormalImpl ( Tensor1< T1, 3 > &  t_coords,
Tensor1< T2, 3 > &  t_disp 
)
inline

Definition at line 232 of file RigidBodies.hpp.

233 {
234 auto t_d = getPointCoords(t_coords, t_disp);
235 // FIXME:
237 // tNormal(i) = rotationMat(j, i) * oRientation(j);
238 // TODO: test this
239 // tNormal(i) = rotationMat(i, j) * oRientation(j);
241 if (fLip)
242 tNormal(i) *= -1;
243 // rotationMat(i, j)
244 return tNormal;
245 };
Tensor1< double, 3 > & getPointCoords(Tensor1< T1, 3 > &t_coords, Tensor1< T2, 3 > &t_disp)

◆ getRollerDataForTag()

MoFEMErrorCode PlaneRigidBody::getRollerDataForTag ( )
inlinevirtual

Implements RigidBodyData.

Definition at line 197 of file RigidBodies.hpp.

197 {
199 bodyType = PLANE;
201 }
@ PLANE
Definition: RigidBodies.hpp:18
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440

Member Data Documentation

◆ fLip

PetscBool PlaneRigidBody::fLip

Definition at line 192 of file RigidBodies.hpp.

◆ sIze

double PlaneRigidBody::sIze

Definition at line 193 of file RigidBodies.hpp.


The documentation for this struct was generated from the following file: