78 std::map< DofIDItem, IntArray > masterDofID;
79 std::map< DofIDItem, FloatArray > masterContribution;
89 for (
int &nodeNum: masterNodes ) {
96 for (
Dof *dof: *
this ) {
100 sdof->
initialize(masterNodes, masterDofID [
id ], masterContribution [
id ]);
107 if ( ( * masterNode )->giveParallelMode() !=
parallel_mode ) {
108 OOFEM_WARNING(
"mismatch in parallel mode of RigidArmNode and master", 1);
133 OOFEM_ERROR(
"incompatible mastermask and doftype data");
143 std::map< DofIDItem, FloatArray > &masterContribution)
145 #if 0 // original implementation without support of different LCS in slave and master 167 masterDofID [ id ].resize(numberOfMasterDofs);
168 masterContribution [ id ].resize(numberOfMasterDofs);
177 R_uvw.at(3) = ( ( int ) R_v );
181 R_uvw.at(2) = -( ( int ) R_w );
183 }
else if (
id == D_v ) {
185 R_uvw.at(3) = -( ( int ) R_u );
189 R_uvw.at(1) = ( ( int ) R_w );
191 }
else if (
id == D_w ) {
193 R_uvw.at(2) = ( ( int ) R_u );
197 R_uvw.at(1) = -( ( int ) R_v );
208 masterDofID [ id ].at(k) = ( int )
id;
209 masterContribution [ id ].at(k) = 1.0;
211 for (
int j = 1; j <= 3; j++ ) {
212 if ( R_uvw.at(j) != 0 ) {
213 int sign = R_uvw.at(j) < 0 ? -1 : 1;
216 masterDofID [ id ].at(k) = sign * R_uvw.at(j);
217 masterContribution [ id ].at(k) = sign * xyz.
at(j);
220 masterDofID [ id ].resizeWithValues(k);
221 masterContribution [ id ].resizeWithValues(k);
231 IntArray fullDofMask = {D_u, D_v, D_w, R_u, R_v, R_w};
238 TR.
at(1,5) = xyz.
at(3);
239 TR.
at(1,6) = -xyz.
at(2);
240 TR.
at(2,4) = -xyz.
at(3);
241 TR.
at(2,6) = xyz.
at(1);
242 TR.
at(3,4) = xyz.
at(2);
243 TR.
at(3,5) = -xyz.
at(1);
245 if (hasg2l && mhasg2l) {
251 }
else if (mhasg2l) {
265 masterContribution [ id ].at(j) = T.
at(
id,
dofidmask->
at(j));
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
#define _IFT_DofManager_mastermask
int masterDofMngr
Number of master DofManager (Node)
bool hasLocalCS()
Returns nonzero if node has prescribed local coordinate system.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
FloatMatrix * localCoordinateSystem
Triplet defining the local coordinate system in node.
virtual void postInitialize()
Performs post-initialization such like checking if there are any slave dofs etc.
double & at(int i)
Coefficient access function.
virtual void postInitialize()
Performs post-initialization such like checking if there are any slave dofs etc.
virtual int checkConsistency()
Allows programmer to test some internal data, before computation begins.
std::vector< Dof * > dofArray
Array of DOFs.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual int checkConsistency()
Allows programmer to test some internal data, before computation begins.
void rotatedWith(FloatMatrix &r, char mode)
Returns the receiver a rotated according the change-of-base matrix r.
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
virtual void updateLocalNumbering(EntityRenumberingFunctor &f)
Local renumbering support.
Node * masterNode
Pointer to master Node.
int giveNumberOfDofs() const
REGISTER_DofManager(ElementSide)
void initialize(const IntArray &masterNodes, const IntArray &mstrDofID, const FloatArray &mstrContribution)
DofIDItem
Type representing particular dof type.
DofIDItem giveDofID() const
Returns DofID value of receiver, which determines type of of unknown connected to receiver (e...
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
void computeMasterContribution(std::map< DofIDItem, IntArray > &masterDofID, std::map< DofIDItem, FloatArray > &masterContribution)
Compute vector of master contribution coefficients - SUMA of contributions == 1.0.
#define _IFT_RigidArmNode_master
Class representing vector of real numbers.
dofManagerParallelMode parallel_mode
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
Dof * giveDofWithID(int dofID) const
Returns DOF with given dofID; issues error if not present.
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual FloatArray * giveCoordinates()
void beUnitMatrix()
Sets receiver to unity matrix.
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
virtual bool computeL2GTransformation(FloatMatrix &answer, const IntArray &dofIDArry)
Computes transformation matrix from global c.s.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class implementing node in finite element mesh.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
DofManager is local, there are no contribution from other domains to this DofManager.
#define OOFEM_WARNING(...)
Class representing "slave" degree of freedom.
virtual void updateLocalNumbering(EntityRenumberingFunctor &f)
Local renumbering support.
int findFirstIndexOf(int value) const
Finds index of first occurrence of given value in array.
IntArray * dofidmask
List of additional dof ids to include.
RigidArmNode(int n, Domain *aDomain)
Constructor.