61double PrescribedDispSlipBCDirichletRC :: give(
Dof *dof, ValueModeType mode,
double time)
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.");
80 dispGradient.resizeWithData(coords.giveSize(), coords.giveSize());
81 dispField.resizeWithValues(coords.giveSize());
82 slipField.resizeWithValues(coords.giveSize());
83 slipGradient.resizeWithData(coords.giveSize(), coords.giveSize());
98 int pos = this->
dofs.findFirstIndexOf(
id);
100 bool onConcrete =
true;
101 bool onSteel =
false;
115 }
else if ( onSteel ) {
126 if ( pos > 0 && pos <= u.
giveSize() ) {
137 bool isXReinf =
false;
138 bool isYReinf =
false;
145 return u.
at(pos) + us.
at(pos);
146 }
else if ( pos == 2 ) {
148 }
else if ( pos == 3 ) {
153 }
else if ( isYReinf ) {
156 }
else if ( pos == 2 ) {
157 return u.
at(pos) + us.
at(pos);
158 }
else if ( pos == 3 ) {
187 int nsd =
domain->giveNumberOfSpatialDimensions();
189 C.
resize(npeq, nsd * nsd);
193 double xbar = cCoords.
at(1), ybar = cCoords.
at(2);
195 for (
auto &n :
domain->giveDofManagers() ) {
196 const auto &coords = n->giveCoordinates();
197 Dof *d1 = n->giveDofWithID( this->
dofs[0] );
198 Dof *d2 = n->giveDofWithID( this->
dofs[1] );
205 Dof *d3 = n->giveDofWithID( this->
dofs[2] );
219 C.
at(k1, 1) = coords.at(1) - xbar;
220 C.
at(k1, 4) = coords.at(2) - ybar;
224 C.
at(k2, 2) = coords.at(2) - ybar;
225 C.
at(k2, 3) = coords.at(1) - xbar;
229 C.
at(k3, 1) = ePerp.
at(1) * eL.
at(1);
230 C.
at(k3, 2) = ePerp.
at(2) * eL.
at(2);
231 C.
at(k3, 3) = ePerp.
at(1) * eL.
at(2);
232 C.
at(k3, 4) = ePerp.
at(2) * eL.
at(1);
256 R_c.subtract( R_ext );
263 sigma.
times( 1. / volRVE );
277 int nsd =
domain->giveNumberOfSpatialDimensions();
301 for (
int i=1; i<=nodesX.
giveSize(); i++) {
306 bStress.
at(1) += R_L*eL.
at(1);
307 bStress.
at(2) += R_L*eL.
at(2);
310 for (
int i=1; i<=nodesY.
giveSize(); i++) {
315 bStress.
at(1) += R_L*eL.
at(1);
316 bStress.
at(2) += R_L*eL.
at(2);
320 bStress.
times( 1. / volRVE );
335 int nsd =
domain->giveNumberOfSpatialDimensions();
355 double xbar=cCoords.
at(1), ybar=cCoords.
at(2), R_L;
359 for (
int i=1; i<=nodesX.
giveSize(); i++) {
365 rStress.
at(1) += R_L*eL.
at(1) * (coords.at(1) - xbar);
366 rStress.
at(2) += R_L*eL.
at(2) * (coords.at(2) - ybar);
367 rStress.
at(3) += R_L*eL.
at(1) * (coords.at(2) - ybar);
368 rStress.
at(4) += R_L*eL.
at(2) * (coords.at(1) - xbar);
371 for (
int i=1; i<=nodesY.
giveSize(); i++) {
377 rStress.
at(1) += R_L*eL.
at(1) * (coords.at(1) - xbar);
378 rStress.
at(2) += R_L*eL.
at(2) * (coords.at(2) - ybar);
379 rStress.
at(3) += R_L*eL.
at(1) * (coords.at(2) - ybar);
380 rStress.
at(4) += R_L*eL.
at(2) * (coords.at(1) - xbar);
384 rStress.
times( 1. / volRVE );
402 std ::unique_ptr<SparseLinearSystemNM> solver(
classFactory.createSparseLinSolver(
ST_Petsc, this->domain, this->domain->giveEngngModel() ) );
408 std ::unique_ptr<SparseMtrx> Kff(
classFactory.createSparseMtrx( stype ) );
409 std ::unique_ptr<SparseMtrx> Kfp(
classFactory.createSparseMtrx( stype ) );
410 std ::unique_ptr<SparseMtrx> Kpf(
classFactory.createSparseMtrx( stype ) );
411 std ::unique_ptr<SparseMtrx> Kpp(
classFactory.createSparseMtrx( stype ) );
413 OOFEM_ERROR(
"Couldn't create sparse matrix of type %d\n", stype );
415 Kff->buildInternalStructure( rve, 1, fnum );
416 Kfp->buildInternalStructure( rve, 1, fnum, pnum );
417 Kpf->buildInternalStructure( rve, 1, pnum, fnum );
418 Kpp->buildInternalStructure( rve, 1, pnum );
427 Kpf->timesT( C, KfpC );
428 solver->solve( *Kff, KfpC, a );
430 Kpf->times( a, Kpfa );
437void PrescribedDispSlipBCDirichletRC :: initializeFrom(
InputRecord &ir)
439 GeneralBoundaryCondition :: initializeFrom(ir);
464 GeneralBoundaryCondition :: giveInputRecord(input);
465 PrescribedDispSlipHomogenization :: giveInputRecord(input);
481 if ( this->
giveDomain()->giveNumberOfSpatialDimensions() == 2 ) {
488 return omegaBox * thickness;
#define REGISTER_BoundaryCondition(class)
virtual double give(CrossSectionProperty a, GaussPoint *gp) const
int giveGlobalNumber() const
const FloatArray & giveCoordinates() const
Dof * giveDofWithID(int dofID) const
int giveDofManGlobalNumber() const
DofIDItem giveDofID() const
DofManager * giveDofManager() const
virtual int __givePrescribedEquationNumber()=0
Element * giveElement(int n)
virtual FEInterpolation * giveInterpolation() const
CrossSection * giveCrossSection()
virtual Element_Geometry_Type giveGeometryType() const =0
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain)
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
virtual std::unique_ptr< IntegrationRule > giveIntegrationRule(int order, const Element_Geometry_Type) const
int giveInterpolationOrder() const
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
double & at(std::size_t i)
Index giveSize() const
Returns the size of receiver.
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void resize(Index rows, Index cols)
void zero()
Zeroes all coefficient of receiver.
double at(std::size_t i, std::size_t j) const
void subtract(const FloatMatrix &a)
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
int set
Set number for boundary condition to be applied to.
Function * giveTimeFunction()
IntArray dofs
Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s).
int giveSetNumber() const
bool contains(int value) const
void scale(double s) override
void computeReinfStress(FloatArray &rStress, TimeStep *tStep) override
bool slipGradON
on/off flag specifying whether the slip field should be applied via Neumann BCs
bool slipON
on/off flag specifying whether the displacement gradient should be applied via Neumann BCs
virtual void updateCoefficientMatrix(FloatMatrix &C)
double giveOnSteel(Dof *dof, int pos, const FloatArray u, const FloatArray us)
void computeTransferStress(FloatArray &bStress, TimeStep *tStep) override
int conBoundSet
on/off flag specifying whether the slip gradient should be applied via Neumann BCs
double giveOnConcrete(Dof *dof, int pos, const FloatArray u)
double domainSize(Domain *d, int set) override
virtual void initializeFrom(InputRecord &ir)
FloatArray & giveCenterCoordinate()
FloatArray dispField
Prescribed fields.
FloatArray mCenterCoord
Center coordinates.
virtual double domainSize(Domain *d, int set)
FloatMatrix dispGradient
Prescribed gradients.
const IntArray & giveNodeList()
ClassFactory & classFactory
#define _IFT_PrescribedDispSlipBCDirichletRC_ReinfYBound
#define _IFT_PrescribedDispSlipBCDirichletRC_ConcreteBoundary
#define _IFT_PrescribedDispSlipBCDirichletRC_ReinfXBound