57double PrescribedGenStrainShell7 :: give(
Dof *dof, ValueModeType mode,
double time)
62 if ( coords.giveSize() != this->centerCoord.giveSize() ) {
63 OOFEM_ERROR(
"PrescribedGenStrainShell7 :: give - Size of coordinate system different from center coordinate in b.c.");
67 if ( mode == VM_Total ) {
69 }
else if ( mode == VM_Velocity ) {
71 }
else if ( mode == VM_Acceleration ) {
74 OOFEM_ERROR(
"Should not be called for value mode type then total, velocity, or acceleration.");
118 double dgamdxi1, dgamdxi2, gam;
119 Shell7Base :: giveGeneralizedStrainComponents(
genEps, dxdxi1, dxdxi2, dmdxi1, dmdxi2, m, dgamdxi1, dgamdxi2, gam);
120 double fac1 = ( zeta + 0.5 * gam * zeta * zeta );
121 double fac2 = ( 0.5 * zeta * zeta );
122 double fac3 = ( 1.0 + zeta * gam );
124 auto g1 = dxdxi1 + fac1*dmdxi1 + fac2*dgamdxi1*m;
125 auto g2 = dxdxi2 + fac1*dmdxi2 + fac2*dgamdxi2*m;
127 #pragma GCC diagnostic push
128 #pragma GCC diagnostic ignored "-Warray-bounds"
131 #pragma GCC diagnostic pop
162PrescribedGenStrainShell7 :: setDeformationGradient(
double zeta)
167 auto Gcon = Shell7Base :: giveDualBase(Gcov);
179 auto Gcon = Shell7Base :: giveDualBase(Gcov);
182 G3.
at(1) = Gcon.at(1,3);
183 G3.
at(2) = Gcon.at(2,3);
184 G3.
at(3) = Gcon.at(3,3);
186 double factor =
dot(G3, dx);
187 double gamma = this->
genEps.at(18);
191 auto g3prime = gamma*m;
193 answer = 0.5*factor*factor * g3prime;
199void PrescribedGenStrainShell7 :: updateCoefficientMatrix(
FloatMatrix &C)
210 Domain *domain = this->giveDomain();
215 C.
resize(npeq, nsd * ( nsd + 1 ) / 2);
218 FloatArray &cCoords = this->giveCenterCoordinate();
219 double xbar = cCoords.
at(1), ybar = cCoords.
at(2), zbar = 0.0;
221 zbar = cCoords.
at(3);
224 for (
int i = 1; i <= nNodes; i++ ) {
227 Dof *d1 = n->giveDofWithID( this->dofs[0] );
228 Dof *d2 = n->giveDofWithID( this->dofs[1] );
229 int k1 = d1->__givePrescribedEquationNumber();
230 int k2 = d2->__givePrescribedEquationNumber();
233 C.
at(k1, 1) = coords->at(1) - xbar;
234 C.
at(k1, 3) = coords->at(2) - ybar;
238 C.
at(k2, 2) = coords->at(2) - ybar;
239 C.
at(k2, 3) = coords->at(1) - xbar;
242 OOFEM_ERROR(
"PrescribedGenStrainShell7 :: updateCoefficientMatrix - 3D Not tested yet!");
243 Dof *d3 = n->giveDofWithID( this->dofs(2) );
247 C.
at(k1, 1) = coords->at(1) - xbar;
248 C.
at(k1, 4) = coords->at(2) - ybar;
249 C.
at(k1, 5) = coords->at(3) - zbar;
252 C.
at(k2, 2) = coords->at(2) - ybar;
253 C.
at(k2, 4) = coords->at(1) - xbar;
254 C.
at(k2, 6) = coords->at(3) - zbar;
257 C.
at(k3, 3) = coords->at(3) - zbar;
258 C.
at(k3, 5) = coords->at(1) - xbar;
259 C.
at(k3, 6) = coords->at(2) - ybar;
266double PrescribedGenStrainShell7 :: domainSize()
269 double domain_size = 0.0;
272 const IntArray &boundaries =
set->giveBoundaryList();
274 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
276 int boundary = boundaries.
at(pos * 2);
280 return domain_size / nsd;
288 GeneralBoundaryCondition :: initializeFrom(ir);
301 BoundaryCondition :: giveInputRecord(input);
#define REGISTER_BoundaryCondition(class)
const FloatArray & giveCoordinates() const
DofIDItem giveDofID() const
DofManager * giveDofManager() const
virtual int __givePrescribedEquationNumber()=0
int giveNumber()
Returns domain number.
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
EngngModel * giveEngngModel()
virtual FEInterpolation * giveInterpolation() const
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
virtual double evalNXIntegral(int boundary, const FEICellGeometry &cellgeo) const
Domain * giveDomain() const
double & at(std::size_t i)
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
void setColumn(const FloatArrayF< N > &src, std::size_t c)
void resize(Index rows, Index cols)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
int set
Set number for boundary condition to be applied to.
Function * giveTimeFunction()
FloatMatrixF< 3, 3 > evalCovarBaseVectorsAt(FloatArray &genEps, double zeta)
FloatMatrixF< 3, 3 > evalInitialCovarBaseVectorsAt(FloatArray &genEps, double zeta)
void setDeformationGradient(double zeta)
FloatMatrixF< 3, 3 > gradient
Prescribed gradient .
FloatArrayF< 3 > centerCoord
Center coordinate .
void evaluateHigherOrderContribution(FloatArray &answer, double zeta, FloatArray &dx)
FloatMatrixF< N, P > dotT(const FloatMatrixF< N, M > &a, const FloatMatrixF< P, M > &b)
Computes .
double dot(const FloatArray &x, const FloatArray &y)
FloatMatrixF< N, N > eye()
Constructs an identity matrix.
#define _IFT_PrescribedGenStrainShell7_centercoords
#define _IFT_PrescribedGenStrainShell7_generalizedstrain
#define _IFT_PrescribedGenStrainShell7_initialgeneralizedstrain