本文整理汇总了C++中ArrayT::Dimension方法的典型用法代码示例。如果您正苦于以下问题:C++ ArrayT::Dimension方法的具体用法?C++ ArrayT::Dimension怎么用?C++ ArrayT::Dimension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayT
的用法示例。
在下文中一共展示了ArrayT::Dimension方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetOutputVariables
void SIERRA_HypoElasticT::SetOutputVariables(iArrayT& variable_index,
ArrayT<StringT>& output_labels) const
{
/* no additional material outputs */
variable_index.Dimension(0);
output_labels.Dimension(0);
}
示例2: NeighborCounts
void MeshFreeSurfaceShapeT::NeighborCounts(ArrayT<int>& counts) const
{
const ArrayT<int>& counts_1 = fMFSurfaceSupport->NeighborCounts(0);
const ArrayT<int>& counts_2 = fMFSurfaceSupport->NeighborCounts(1);
counts.Dimension(counts_1.Length());
for (int i = 0; i < counts.Length(); i++)
counts[i] = counts_1[i] + counts_2[i];
}
示例3: OutputLabels
void DPSSKStVLoc::OutputLabels(ArrayT<StringT>& labels) const
{
/* set size */
labels.Dimension(kNumOutput);
/* copy labels */
for (int i = 0; i < kNumOutput; i++) labels[i] = Labels[i];
}
示例4:
void J2QL2DLinHardT::OutputLabels(ArrayT<StringT>& labels) const
{
/* set size */
labels.Dimension(kNumOutput);
/* copy labels */
for (int i = 0; i < kNumOutput; i++)
labels[i] = Labels[i];
}
示例5:
/* returns labels for output variables */
void J2Simo3D::OutputLabels(ArrayT<StringT>& labels) const
{
/* set labels */
labels.Dimension(4);
labels[0] = "alpha";
labels[1] = "norm_beta";
labels[2] = "VM_Kirch";
labels[3] = "press";
}
示例6:
void BCJHypoIsoDamageYC3D::OutputLabels(ArrayT<StringT>& labels) const
{
// allocate space for labels
labels.Dimension(kNumOutput);
// copy labels
for (int i = 0; i < kNumOutput; i++)
labels[i] = Labels[i];
}
示例7: ReadNodeLabels
void TextInputT::ReadNodeLabels (ArrayT<StringT>& nlabels) const
{
/* allocate */
nlabels.Dimension(NumNodeVariables());
/* copy */
for (int i=0; i < nlabels.Length(); i++)
nlabels[i] = fNodeVariable[i];
}
示例8: ReadElementLabels
void TextInputT::ReadElementLabels (ArrayT<StringT>& elabels) const
{
/* allocate */
elabels.Dimension(NumElementVariables());
/* copy */
for (int i=0; i < elabels.Length(); i++)
elabels[i] = fElementVariable[i];
}
示例9: OutputLabels
void ElasticHydrogelT::OutputLabels(ArrayT<StringT>& labels) const
{
/*allocates space for labels*/
labels.Dimension(kNumOutputVar);
/*copy labels*/
for (int i = 0; i< kNumOutputVar; i++)
labels[i] = Labels[i];
}
示例10:
void tevp3D::OutputLabels(ArrayT<StringT>& labels) const
{
/* set size */
labels.Dimension(kNumOutput);
/* copy labels - WHY? */
for (int i = 0; i < kNumOutput; i++)
labels[i] = Labels[i];
}
示例11: GenerateOutputLabels
/* construct output labels array */
void CSEBaseT::GenerateOutputLabels(const iArrayT& n_codes, ArrayT<StringT>& n_labels,
const iArrayT& e_codes, ArrayT<StringT>& e_labels) const
{
/* allocate nodal output labels */
n_labels.Dimension(n_codes.Sum());
int count = 0;
if (n_codes[NodalDisp])
{
#ifndef _FRACTURE_INTERFACE_LIBRARY_
/* labels from the field */
const ArrayT<StringT>& labels = Field().Labels();
for (int i = 0; i < labels.Length(); i++)
n_labels[count++] = labels[i];
#else
const char* labels[] = {"D_1", "D_2", "D_3"};
for (int i = 0; i < NumSD(); i++)
n_labels[count++] = labels[i];
#endif
}
if (n_codes[NodalCoord])
{
const char* xlabels[] = {"x1", "x2", "x3"};
for (int i = 0; i < NumSD(); i++)
n_labels[count++] = xlabels[i];
}
if (n_codes[NodalDispJump]) n_labels[count++] = "jump";
if (n_codes[NodalTraction]) n_labels[count++] = "Tmag";
/* allocate nodal output labels */
e_labels.Dimension(e_codes.Sum());
count = 0;
if (e_codes[Centroid])
{
const char* xlabels[] = {"xc_1", "xc_2", "xc_3"};
for (int i = 0; i < NumSD(); i++)
e_labels[count++] = xlabels[i];
}
if (e_codes[CohesiveEnergy]) e_labels[count++] = "phi";
if (e_codes[Traction]) e_labels[count++] = "Tmag";
}
示例12:
void MR_RP2DT::OutputLabels(ArrayT<StringT>& labels) const
{
labels.Dimension(8);
labels[0] = "up_t";
labels[1] = "up_n";
labels[2] = "Chi";
labels[3] = "Cohesion";
labels[4] = "Friction Angle";
labels[5] = "Yield Function Value";
labels[6] = "Norm of residuals";
labels[7] = "No. of Iterations";
}
示例13: SetOutputVariables
/* set material output */
void ABAQUS_UMAT_IsoPlast::SetOutputVariables(iArrayT& variable_index,
ArrayT<StringT>& output_labels)
{
int num_output = 1;
/* number of output */
variable_index.Dimension(num_output);
variable_index[0] = 2*ntens;
/* labels */
output_labels.Dimension(num_output);
output_labels[0] = "EQPLAS";
}
示例14: SetOutputVariables
/* set material output */
void ABAQUS_VUMAT_BCJ::SetOutputVariables(iArrayT& variable_index,
ArrayT<StringT>& output_labels)
{
int num_output = 5;
/* number of output */
variable_index.Dimension(num_output);
variable_index[0] = 6;
variable_index[1] = 7;
variable_index[2] = 11;
variable_index[3] = 9;
variable_index[4] = 8;
/* labels */
output_labels.Dimension(num_output);
output_labels[0] = "kappa";
output_labels[1] = "temp";
output_labels[2] = "pl_strn";
output_labels[3] = "damage";
output_labels[4] = "pl_strn_rate";
}
示例15: GenerateOutputLabels
/* generate labels for output data */
void SCNIMFT::GenerateOutputLabels(ArrayT<StringT>& labels)
{
const char caller[] = "SCNIMFT::GenerateOutputLabels";
int ndof = NumDOF();
if (ndof > 3) ExceptionT::GeneralFail(caller);
/* number of output variables */
iArrayT counts;
SetOutputCount(fOutputFlags, counts);
int num_output = counts.Sum();
/* offsets to the different output values */
iArrayT offsets(fOutputFlags.Length());
offsets = 0;
for (int i = 1; i < offsets.Length(); i++)
offsets[i] = offsets[i-1] + counts[i-1];
/* initialize */
labels.Dimension(num_output);
/* coordinates */
if (fOutputFlags[kCoordinates]) {
const char* ref[3] = {"X", "Y", "Z"};
int index = offsets[kCoordinates];
for (int i = 0; i < ndof; i++)
labels[index++] = ref[i];
}
/* displacements */
if (fOutputFlags[kDisplacement]) {
/* labels from the field */
const ArrayT<StringT>& field_labels = Field().Labels();
int index = offsets[kDisplacement];
for (int i = 0; i < ndof; i++)
labels[index++] = field_labels[i];
}
/* mass */
if (fOutputFlags[kMass])
labels[offsets[kMass]] = "mass";
/* strain */
if (fOutputFlags[kStrain]) {
const char* e1D[1] = {"e11"};
const char* e2D[3] = {"e11", "e22", "e12"};
const char* e3D[6] = {"e11", "e22", "e33", "e23", "e13", "e12"};
const char** elabels = NULL;
if (ndof == 1) elabels = e1D;
else if (ndof == 2) elabels = e2D;
else if (ndof == 3) elabels = e3D;
else ExceptionT::GeneralFail(caller);
int nstrs = dSymMatrixT::NumValues(ndof);
int index = offsets[kStrain];
for (int i = 0; i < nstrs; i++)
labels[index++] = elabels[i];
}
/* stress */
if (fOutputFlags[kStress]) {
const char* s1D[1] = {"s11"};
const char* s2D[3] = {"s11", "s22", "s12"};
const char* s3D[6] = {"s11", "s22", "s33", "s23", "s13", "s12"};
const char** slabels = NULL;
if (ndof == 1) slabels = s1D;
else if (ndof == 2) slabels = s2D;
else if (ndof == 3) slabels = s3D;
else ExceptionT::GeneralFail(caller);
int nstrs = dSymMatrixT::NumValues(ndof);
int index = offsets[kStress];
for (int i = 0; i < nstrs; i++)
labels[index++] = slabels[i];
}
/* material output labels */
if (fOutputFlags[kMaterialOutput])
{
ArrayT<StringT> mat_labels;
(*fMaterialList)[0]->OutputLabels(mat_labels);
int index = offsets[kMaterialOutput];
for (int i = 0; i < mat_labels.Length(); i++)
labels[index++] = mat_labels[i];
}
}