57PrescribedDispSlipBCNeumannRC :: PrescribedDispSlipBCNeumannRC(
int n,
Domain *d) :
65 for (
int i = 0; i < nsd * nsd; i++ ) {
72 for (
int i = 0; i < nsd; i++ ) {
79 for (
int i = 0; i < nsd ; i++ ) {
87PrescribedDispSlipBCNeumannRC :: ~PrescribedDispSlipBCNeumannRC()
92void PrescribedDispSlipBCNeumannRC :: initializeFrom(
InputRecord &ir)
94 ActiveBoundaryCondition :: initializeFrom(ir);
95 PrescribedDispSlipHomogenization :: initializeFrom(ir);
118 ActiveBoundaryCondition :: giveInputRecord(input);
119 PrescribedDispSlipHomogenization :: giveInputRecord(input);
134DofManager *PrescribedDispSlipBCNeumannRC :: giveInternalDofManager(
int i)
138 else if ( i == 2 ) {
return lmTauHom.get(); }
143 else if ( i == 2 ) {
return lmTauHom.get(); }
148 if ( i == 1 ) {
return lmTauHom.get(); }
160void PrescribedDispSlipBCNeumannRC :: scale(
double s)
193 if ( type == ExternalForcesVector ) {
201 stressLoad.
beScaled(-rve_size*loadLevel, dispGrad);
203 answer.
assemble(stressLoad, sigma_loc);
204 }
else if ( type == InternalForcesVector ) {
208 IntArray loc, masterDofIDs, sigmaMasterDofIDs;
218 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
220 int boundary = boundaries.
at(pos * 2);
237 if ( eNorm != NULL ) {
251 if ( type == ExternalForcesVector ) {
258 bStressLoad.
beScaled(loadLevel, slipVec);
260 answer.
assemble(bStressLoad, tau_loc);
261 }
else if ( type == InternalForcesVector ) {
265 IntArray loc, loc_s, loc_c, masterDofIDs;
279 for (
int i = 0; i <
rebarSets.giveSize(); ++i) {
282 for (
int pos = 1; pos <= steelSet->
giveElementList().giveSize(); ++pos) {
298 Ktau.
times(1/gammaBoxInt);
317 for (
int pos = 1; pos <= concreteSet->
giveElementList().giveSize(); ++pos) {
328 Ktau.
times(1/omegaBox);
351 if ( type == ExternalForcesVector ) {
359 rStressLoad.
beScaled(loadLevel, slipGrad);
361 answer.
assemble(rStressLoad, sigmaS_loc);
362 }
else if ( type == InternalForcesVector ) {
366 IntArray loc, loc_s, loc_c, masterDofIDs;
381 for (
int i = 0; i <
rebarSets.giveSize(); ++i ) {
384 for (
int pos = 1; pos <= steelSet->
giveElementList().giveSize(); ++pos) {
400 Ksig.
times(1/gammaBoxInt);
408 answer.
assemble(fe_sig, sigmaS_loc);
421 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
423 int boundary = boundaries.
at(pos*2);
433 Ksig.
times(1/omegaBox);
445 answer.
assemble(fe_sig, sigmaS_loc);
457 if ( type == TangentStiffnessMatrix || type == SecantStiffnessMatrix || type == ElasticStiffnessMatrix ) {
470 OOFEM_LOG_DEBUG(
"Skipping assembly in PrescribedDispSlipBCNeumann::assemble().");
476void PrescribedDispSlipBCNeumannRC :: giveLocationArrays(std :: vector< IntArray > &rows, std :: vector< IntArray > &cols,
CharType type,
481 IntArray loc_r, loc_c, sigma_loc_r, sigma_loc_c;
488 const IntArray &boundaries =
set->giveBoundaryList();
490 rows.resize( boundaries.
giveSize() );
491 cols.resize( boundaries.
giveSize() );
492 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
505 cols[i] = sigma_loc_c;
508 rows[i] = sigma_loc_r;
515 IntArray loc_r, loc_c, tau_loc_r, tau_loc_c;
525 for (
int j = 1; j <= this->
rebarSets.giveSize(); ++j ) {
532 for (
int pos = 1; pos <= steelEl.
giveSize(); ++pos ) {
540 cols [ i ] = tau_loc_c;
543 rows [ i ] = tau_loc_r;
549 for (
int pos = 1; pos <= conEl.
giveSize(); ++pos ) {
557 cols [ i ] = tau_loc_c;
560 rows [ i ] = tau_loc_r;
567 IntArray loc_r, loc_c, sigmaS_loc_r, sigmaS_loc_c;
577 for (
int i = 1; i <= this->
rebarSets.giveSize(); ++i ) {
584 for (
int pos = 1; pos <= steelEl.
giveSize(); ++pos ) {
592 cols [ i ] = sigmaS_loc_c;
595 rows [ i ] = sigmaS_loc_r;
601 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
609 cols [ i ] = sigmaS_loc_c;
612 rows [ i ] = sigmaS_loc_r;
624 double thick = volRVE / areaRVE;
626 sigma.
times( 1 / thick );
636 bStress.
times( -1 / volRVE );
647 rStress.
times( -1 / volRVE );
658void PrescribedDispSlipBCNeumannRC :: integrateTangentStress(
FloatMatrix &oTangent,
Element *e,
int iBndIndex)
670 std :: unique_ptr< IntegrationRule > ir;
676 for (
auto &gp: *ir ) {
677 const FloatArray &lcoords = gp->giveNaturalCoordinates();
692 interp->
evalN(n, bulkElLocCoords, cellgeo);
699 E_n.
at(1, 1) = normal.
at(1);
700 E_n.
at(2, 2) = normal.
at(2);
701 E_n.
at(3, 3) = normal.
at(3);
702 E_n.
at(4, 1) = normal.
at(2);
703 E_n.
at(5, 1) = normal.
at(3);
704 E_n.
at(6, 2) = normal.
at(3);
705 E_n.
at(7, 2) = normal.
at(1);
706 E_n.
at(8, 3) = normal.
at(1);
707 E_n.
at(9, 3) = normal.
at(2);
708 }
else if ( nsd == 2 ) {
709 E_n.
at(1, 1) = normal.
at(1);
710 E_n.
at(2, 2) = normal.
at(2);
711 E_n.
at(3, 1) = normal.
at(2);
712 E_n.
at(4, 2) = normal.
at(1);
714 E_n.
at(1, 1) = normal.
at(1);
719 oTangent.
add(detJ * gp->giveWeight(), contrib);
736 std :: unique_ptr< IntegrationRule > ir;
741 for (
auto &gp : *ir ) {
742 const FloatArray &lcoords = gp->giveNaturalCoordinates();
747 interp->
evalN(nu, lcoords, cellgeo);
762 oTangent.
add(detJ * gp->giveWeight(), contrib);
778 std :: unique_ptr< IntegrationRule > ir;
784 for (
auto &gp : *ir ) {
785 const FloatArray &lcoords = gp->giveNaturalCoordinates();
790 interp->
evalN(nu, lcoords, cellgeo);
799 oTangent.
add(detJ * gp->giveWeight(), contrib);
815 std :: unique_ptr< IntegrationRule > ir;
822 for (
auto &gp : *ir ) {
823 const FloatArray &lcoords = gp->giveNaturalCoordinates();
831 Bs.
at(1,1) = b.
at(1,1);
832 Bs.
at(2,2) = b.
at(1,1);
833 Bs.
at(1,4) = b.
at(1,4);
834 Bs.
at(2,5) = b.
at(1,4);
848 oTangent.
add(detJ * gp->giveWeight(), contrib);
869 for (
auto &gp : *ir ) {
870 const FloatArray &lcoords = gp->giveNaturalCoordinates();
885 interp->
evalN(n, bulkElLocCoords, cellgeo);
891 E_n.
at(1, 1) = normal.
at(1);
892 E_n.
at(2, 2) = normal.
at(2);
893 E_n.
at(3, 3) = normal.
at(3);
894 }
else if ( nsd == 2 ) {
895 E_n.
at(1, 1) = normal.
at(1);
896 E_n.
at(2,2) = normal.
at(2);
898 E_n.
at(1, 1) = normal.
at(1);
903 oTangent.
add(detJ * gp->giveWeight(), contrib);
912 IntArray loc_r, loc_c, sigma_loc_r, sigma_loc_c;
914 const IntArray &boundaries =
set->giveBoundaryList();
921 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
923 int boundary = boundaries.
at(pos * 2);
934 answer.
assemble(sigma_loc_r, loc_c, Ke);
935 answer.
assemble(loc_r, sigma_loc_c, KeT);
944 IntArray loc_r, loc_c, tau_loc_r, tau_loc_c;
955 for (
int i = 0; i <
rebarSets.giveSize(); ++i ) {
958 for (
int pos = 1; pos <= steelSet->
giveElementList().giveSize(); ++pos ) {
966 Ke.
times(1/gammaBoxInt);
969 answer.
assemble(tau_loc_r, loc_c, Ke);
970 answer.
assemble(loc_r, tau_loc_c, KeT);
982 for (
int pos = 1; pos <= concreteSet->
giveElementList().giveSize(); ++pos ) {
989 Ke.
times(1/omegaBox);
993 answer.
assemble(tau_loc_r, loc_c, Ke);
994 answer.
assemble(loc_r, tau_loc_c, KeT);
1003 IntArray loc_r, loc_c, sigmaS_loc_r, sigmaS_loc_c;
1015 for (
int i = 0; i <
rebarSets.giveSize(); ++i ) {
1018 for (
int pos = 1; pos <= steelSet->
giveElementList().giveSize(); ++pos ) {
1026 Ke.
times(1/gammaBoxInt);
1029 answer.
assemble(sigmaS_loc_r, loc_c, Ke);
1030 answer.
assemble(loc_r, sigmaS_loc_c, KeT);
1043 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
1045 int boundary = boundaries.
at(pos*2);
1052 Ke.
times(1/omegaBox);
1056 answer.
assemble(sigmaS_loc_r, loc_c, Ke);
1057 answer.
assemble(loc_r, sigmaS_loc_c, KeT);
1068 for (
int i = 0; i < reinfSets.
giveSize(); ++i ) {
1070 double perimeterCoeff = 0;
1073 for (
int j = 0; j <
set->giveElementList().giveSize(); ++j ) {
1077 std :: unique_ptr< IntegrationRule > ir;
1080 for (
auto &gp : *ir ) {
1081 const FloatArray &lcoords = gp->giveNaturalCoordinates();
1086 perimeterCoeff = perimeterCoeff + perim * detJ * gp->giveWeight();
1091 dyadMatrix.
add(perimeterCoeff, dya);
1095 C.
times(gammaBoxInt);
1115 dyad.beDyadicProductOf(e_l,e_l);
1122 for (
int i=0; i < reinfSets.
giveSize(); ++i ) {
1124 for (
int j=0; j <
set->giveElementList().giveSize(); ++j ) {
1128 std :: unique_ptr< IntegrationRule > ir;
1131 for (
auto &gp : *ir ) {
1132 const FloatArray &lcoords = gp->giveNaturalCoordinates();
1135 gamma = gamma + detJ * gp->giveWeight();
1148 if ( this->
giveDomain()->giveNumberOfSpatialDimensions() == 2 ) {
1155 return omegaBox * thickness;
#define REGISTER_BoundaryCondition(class)
ActiveBoundaryCondition(int n, Domain *d)
virtual double give(CrossSectionProperty a, GaussPoint *gp) const
int giveNextFreeDofID(int increment=1)
Element * giveElement(int n)
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
virtual bool computeGtoLRotationMatrix(FloatMatrix &answer)
virtual FEInterpolation * giveInterpolation() const
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
CrossSection * giveCrossSection()
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
virtual Element_Geometry_Type giveGeometryType() const =0
const FloatArray giveVertexCoordinates(int i) const override
virtual std::unique_ptr< IntegrationRule > giveBoundaryIntegrationRule(int order, int boundary, const Element_Geometry_Type) const
virtual std::unique_ptr< IntegrationRule > giveBoundaryEdgeIntegrationRule(int order, int boundary, const Element_Geometry_Type) const
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
virtual std::unique_ptr< IntegrationRule > giveIntegrationRule(int order, const Element_Geometry_Type) const
int giveInterpolationOrder() const
virtual void boundaryLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double boundaryEvalNormal(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
Domain * giveDomain() const
void assemble(const FloatArray &fe, const IntArray &loc)
void resizeWithValues(Index s, std::size_t allocChunk=0)
void rotatedWith(FloatMatrix &r, char mode)
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void assembleSquared(const FloatArray &fe, const IntArray &loc)
void beScaled(double s, const FloatArray &b)
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void resizeWithData(Index, Index)
void add(const FloatMatrix &a)
void resize(Index rows, Index cols)
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void beNMatrixOf(const FloatArray &n, int nsd)
void beTranspositionOf(const FloatMatrix &src)
void zero()
Zeroes all coefficient of receiver.
bool beInverseOf(const FloatMatrix &src)
double at(std::size_t i, std::size_t j) const
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
void beUnitMatrix()
Sets receiver to unity matrix.
virtual double evaluateAtTime(double t)
int set
Set number for boundary condition to be applied to.
Function * giveTimeFunction()
int giveSetNumber() const
void followedBy(const IntArray &b, int allocChunk=0)
void assembleVectorBStress(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s)
int concreteVolSet
Element set containing concrete elements (in the volume of RVE).
void computeWeightMatrix(FloatMatrix &C, const IntArray &reinfSets)
void integrateTangentRStressConcrete(FloatMatrix &oTangent, Element *e, int iBndIndex)
std ::unique_ptr< Node > lmSigmaSHom
DofManager for effective reinforcement membrane stress.
void assembleOnStress(SparseMtrx &answer, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale)
void assembleOnReinfStress(SparseMtrx &answer, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale)
virtual double domainSize(Domain *d, int set) override
void assembleVectorRStress(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s)
void computeReinfStress(FloatArray &rStress, TimeStep *tStep) override
std ::unique_ptr< Node > lmTauHom
DofManager for effective transfer stress.
void assembleOnTransferStress(SparseMtrx &answer, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale)
std ::unique_ptr< Node > mpSigmaHom
on/off flag specifying whether the slip gradient should be applied via Neumann BCs
void integrateTangentStress(FloatMatrix &oTangent, Element *e, int iBndIndex)
void scale(double s) override
IntArray rebarSets
IntArray containing sets of individual reinforcement bars.
double computeInterfaceLength(const IntArray &reinfSets)
void integrateTangentBStressConcrete(FloatMatrix &oTangent, Element *e)
bool slipON
on/off flag specifying whether the displacement gradient should be applied via Neumann BCs
bool slipGradON
on/off flag specifying whether the slip field should be applied via Neumann BCs
void integrateTangentRStressSteel(FloatMatrix &oTangent, Element *e, const int &rebarSet)
void computeRebarDyad(FloatMatrix &dyad, const int &reinfSet)
int giveNumberOfInternalDofManagers() override
Gives the number of internal dof managers.
void integrateTangentBStressSteel(FloatMatrix &oTangent, Element *e, const int &rebarSet)
void computeTransferStress(FloatArray &bStress, TimeStep *tStep) override
void assembleVectorStress(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorm)
void giveSlipGradient(FloatArray &oGradient) const
void giveSlipField(FloatArray &oField) const
void giveDispGradient(FloatArray &oGradient) const
virtual double domainSize(Domain *d, int set)
PrescribedDispSlipHomogenization()
FloatMatrix dispGradient
Prescribed gradients.
const IntArray & giveBoundaryList()
const IntArray & giveElementList()
virtual int assemble(const IntArray &loc, const FloatMatrix &mat)=0
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx=1, int upperIndx=ALL_STRAINS)=0
double giveTargetTime()
Returns target time.
#define OOFEM_LOG_DEBUG(...)
FloatMatrixF< N, M > dyad(const FloatArrayF< N > &a, const FloatArrayF< M > &b)
Computes the dyadic product .
#define _IFT_PrescribedDispSlipBCNeumannRC_RebarSets
#define _IFT_PrescribedDispSlipBCNeumannRC_ConcreteVolSet