本文整理汇总了C++中StructuralElement::computeBmatrixAt方法的典型用法代码示例。如果您正苦于以下问题:C++ StructuralElement::computeBmatrixAt方法的具体用法?C++ StructuralElement::computeBmatrixAt怎么用?C++ StructuralElement::computeBmatrixAt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StructuralElement
的用法示例。
在下文中一共展示了StructuralElement::computeBmatrixAt方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: giveRemoteNonlocalStiffnessContribution
void
MisesMatNl :: giveRemoteNonlocalStiffnessContribution(GaussPoint *gp, IntArray &rloc, const UnknownNumberingScheme &s,
FloatArray &rcontrib, TimeStep *tStep)
{
double kappa, tempKappa;
MisesMatNlStatus *status = static_cast< MisesMatNlStatus * >( this->giveStatus(gp) );
StructuralElement *elem = static_cast< StructuralElement * >( gp->giveElement() );
FloatMatrix b;
LinearElasticMaterial *lmat = this->giveLinearElasticMaterial();
double E = lmat->give('E', gp);
elem->giveLocationArray(rloc, s);
elem->computeBmatrixAt(gp, b);
kappa = status->giveCumulativePlasticStrain();
tempKappa = status->giveTempCumulativePlasticStrain();
rcontrib.clear();
if ( ( tempKappa - kappa ) > 0 ) {
const FloatArray &stress = status->giveTempEffectiveStress();
if ( gp->giveMaterialMode() == _1dMat ) {
double coeff = sgn( stress.at(1) ) * E / ( E + H );
rcontrib.plusProduct(b, stress, coeff);
return;
}
}
rcontrib.resize(b.giveNumberOfColumns());
rcontrib.zero();
}
示例2: giveRemoteNonlocalStiffnessContribution
void
TrabBoneNL3D :: giveRemoteNonlocalStiffnessContribution(GaussPoint *gp, IntArray &rloc, const UnknownNumberingScheme &s,
FloatArray &rcontrib, TimeStep *tStep)
{
TrabBoneNL3DStatus *nlStatus = static_cast< TrabBoneNL3DStatus * >( this->giveStatus(gp) );
StructuralElement *elem = static_cast< StructuralElement * >( gp->giveElement() );
FloatMatrix b;
elem->giveLocationArray(rloc, s);
elem->computeBmatrixAt(gp, b);
double kappa = nlStatus->giveKappa();
double tempKappa = nlStatus->giveTempKappa();
double dKappa = tempKappa - kappa;
if ( dKappa < 10.e-9 ) {
dKappa = 0;
}
if ( dKappa > 0.0 ) {
FloatArray remoteNu, prodTensor;
const FloatArray &plasFlowDirec = nlStatus->givePlasFlowDirec();
const FloatMatrix &SSaTensor = nlStatus->giveSSaTensor();
double beta = nlStatus->giveBeta();
prodTensor.beTProductOf(SSaTensor, plasFlowDirec);
remoteNu = 1 / beta * prodTensor;
rcontrib.beTProductOf(b, remoteNu);
} else {
rcontrib.resize(b.giveNumberOfColumns());
rcontrib.zero();
}
}
示例3: eta
// computes Btransposed*eta for the given Gauss point
// (where eta is the derivative of cum. plastic strain wrt final strain)
void
RankineMatNl :: giveRemoteNonlocalStiffnessContribution(GaussPoint *gp, IntArray &rloc, const UnknownNumberingScheme &s,
FloatArray &rcontrib, TimeStep *atTime)
{
RankineMatNlStatus *status = ( RankineMatNlStatus * ) this->giveStatus(gp);
StructuralElement *elem = ( StructuralElement * )( gp->giveElement() );
elem->giveLocationArray(rloc, EID_MomentumBalance, s);
FloatMatrix b;
elem->computeBmatrixAt(gp, b);
int ncols = b.giveNumberOfColumns();
rcontrib.resize(ncols);
double kappa = status->giveCumulativePlasticStrain();
double tempKappa = status->giveTempCumulativePlasticStrain();
if ( tempKappa <= kappa ) {
rcontrib.zero();
return;
}
int i, j;
double sum;
int nsize = 3;
FloatArray eta(3);
computeEta(eta, status);
for ( i = 1; i <= ncols; i++ ) {
sum = 0.;
for ( j = 1; j <= nsize; j++ ) {
sum += eta.at(j) * b.at(j, i);
}
rcontrib.at(i) = sum;
}
}
示例4: giveLocalNonlocalStiffnessContribution
int
MisesMatNl :: giveLocalNonlocalStiffnessContribution(GaussPoint *gp, IntArray &loc, const UnknownNumberingScheme &s,
FloatArray &lcontrib, TimeStep *atTime)
{
int nrows, nsize, i, j;
double sum, nlKappa, damage, tempDamage, dDamF;
MisesMatNlStatus *status = ( MisesMatNlStatus * ) this->giveStatus(gp);
StructuralElement *elem = ( StructuralElement * )( gp->giveElement() );
FloatMatrix b;
FloatArray stress;
this->computeCumPlasticStrain(nlKappa, gp, atTime);
damage = status->giveDamage();
tempDamage = status->giveTempDamage();
if ( ( tempDamage - damage ) > 0 ) {
elem->giveLocationArray(loc, EID_MomentumBalance, s);
status->giveTempEffectiveStress(stress);
elem->computeBmatrixAt(gp, b);
dDamF = computeDamageParamPrime(nlKappa);
nrows = b.giveNumberOfColumns();
nsize = stress.giveSize();
lcontrib.resize(nrows);
for ( i = 1; i <= nrows; i++ ) {
sum = 0.0;
for ( j = 1; j <= nsize; j++ ) {
sum += b.at(j, i) * stress.at(j);
}
lcontrib.at(i) = sum * mm * dDamF;
}
}
return 1;
}
示例5: giveLocalNonlocalStiffnessContribution
int
TrabBoneNL3D :: giveLocalNonlocalStiffnessContribution(GaussPoint *gp, IntArray &loc, const UnknownNumberingScheme &s,
FloatArray &lcontrib, TimeStep *tStep)
{
TrabBoneNL3DStatus *nlStatus = static_cast< TrabBoneNL3DStatus * >( this->giveStatus(gp) );
StructuralElement *elem = static_cast< StructuralElement * >( gp->giveElement() );
int nrows, nsize;
double sum, nlKappa, dDamFunc, dam, tempDam;
FloatArray localNu;
FloatMatrix b;
this->computeCumPlastStrain(nlKappa, gp, tStep);
dam = nlStatus->giveDam();
tempDam = nlStatus->giveTempDam();
if ( ( tempDam - dam ) > 0.0 ) {
elem->giveLocationArray(loc, s);
localNu = nlStatus->giveTempEffectiveStress();
elem->giveLocationArray(loc, EModelDefaultEquationNumbering() );
elem->computeBmatrixAt(gp, b);
dDamFunc = expDam * critDam * exp(-expDam * nlKappa);
nrows = b.giveNumberOfColumns();
nsize = localNu.giveSize();
lcontrib.resize(nrows);
for ( int i = 1; i <= nrows; i++ ) {
sum = 0.0;
for ( int j = 1; j <= nsize; j++ ) {
sum += b.at(j, i) * localNu.at(j);
}
lcontrib.at(i) = mParam * dDamFunc * sum;
}
return 1;
} else {
loc.clear();
return 0;
}
}
示例6: giveLocalNonlocalStiffnessContribution
// computes m*gprime*Btransposed*sigmaeff for the given Gauss point
// and returns 0 of damage is not growing, 1 if it is growing
// (if damage is not growing, the contribution is not considered at all)
int
RankineMatNl :: giveLocalNonlocalStiffnessContribution(GaussPoint *gp, IntArray &loc, const UnknownNumberingScheme &s,
FloatArray &lcontrib, TimeStep *atTime)
{
int nrows, nsize, i, j;
double sum, nlKappa, damage, tempDamage;
RankineMatNlStatus *status = ( RankineMatNlStatus * ) this->giveStatus(gp);
StructuralElement *elem = ( StructuralElement * )( gp->giveElement() );
FloatMatrix b;
FloatArray stress;
damage = status->giveDamage();
tempDamage = status->giveTempDamage();
if ( tempDamage <= damage ) {
return 0; // no contribution if damage is not growing
}
elem->giveLocationArray(loc, EID_MomentumBalance, s);
status->giveTempEffectiveStress(stress);
elem->computeBmatrixAt(gp, b);
this->computeCumPlasticStrain(nlKappa, gp, atTime);
double factor = computeDamageParamPrime(nlKappa);
factor *= mm; // this factor is m*gprime
nrows = b.giveNumberOfColumns();
nsize = stress.giveSize();
lcontrib.resize(nrows);
// compute the product Btransposed*stress and multiply by factor
for ( i = 1; i <= nrows; i++ ) {
sum = 0.0;
for ( j = 1; j <= nsize; j++ ) {
sum += b.at(j, i) * stress.at(j);
}
lcontrib.at(i) = sum * factor;
}
return 1; // contribution will be considered
}
示例7: giveRemoteNonlocalStiffnessContribution
void
MisesMatNl :: giveRemoteNonlocalStiffnessContribution(GaussPoint *gp, IntArray &rloc, const UnknownNumberingScheme &s,
FloatArray &rcontrib, TimeStep *atTime)
{
int ncols, nsize, i, j;
double sum, kappa, tempKappa;
MisesMatNlStatus *status = ( MisesMatNlStatus * ) this->giveStatus(gp);
StructuralElement *elem = ( StructuralElement * )( gp->giveElement() );
FloatMatrix b;
FloatArray stress;
LinearElasticMaterial *lmat = this->giveLinearElasticMaterial();
double E = lmat->give('E', gp);
elem->giveLocationArray(rloc, EID_MomentumBalance, s);
elem->computeBmatrixAt(gp, b);
ncols = b.giveNumberOfColumns();
rcontrib.resize(ncols);
kappa = status->giveCumulativePlasticStrain();
tempKappa = status->giveTempCumulativePlasticStrain();
if ( ( tempKappa - kappa ) > 0 ) {
status->giveTempEffectiveStress(stress);
if ( gp->giveMaterialMode() == _1dMat ) {
nsize = stress.giveSize();
double coeff = sgn( stress.at(1) ) * E / ( E + H );
for ( i = 1; i <= ncols; i++ ) {
sum = 0.;
for ( j = 1; j <= nsize; j++ ) {
sum += stress.at(j) * coeff * b.at(j, i);
}
rcontrib.at(i) = sum;
}
}
} else {
rcontrib.zero();
}
}
示例8: giveLocalNonlocalStiffnessContribution
int
MisesMatNl :: giveLocalNonlocalStiffnessContribution(GaussPoint *gp, IntArray &loc, const UnknownNumberingScheme &s,
FloatArray &lcontrib, TimeStep *tStep)
{
double nlKappa, damage, tempDamage, dDamF;
MisesMatNlStatus *status = static_cast< MisesMatNlStatus * >( this->giveStatus(gp) );
StructuralElement *elem = static_cast< StructuralElement * >( gp->giveElement() );
FloatMatrix b;
this->computeCumPlasticStrain(nlKappa, gp, tStep);
damage = status->giveDamage();
tempDamage = status->giveTempDamage();
if ( ( tempDamage - damage ) > 0 ) {
const FloatArray &stress = status->giveTempEffectiveStress();
elem->giveLocationArray(loc, s);
elem->computeBmatrixAt(gp, b);
dDamF = computeDamageParamPrime(nlKappa);
lcontrib.clear();
lcontrib.plusProduct(b, stress, mm * dDamF);
}
return 1;
}