Ejemplo n.º 1
0
void SIERRA_HypoElasticT::SetOutputVariables(iArrayT& variable_index, 
	ArrayT<StringT>& output_labels) const
{
	/* no additional material outputs */
	variable_index.Dimension(0);
	output_labels.Dimension(0);
}
Ejemplo n.º 2
0
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];
}
Ejemplo n.º 3
0
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];
}
Ejemplo n.º 4
0
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];
}
Ejemplo n.º 5
0
/* 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";
}
Ejemplo n.º 6
0
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];
}
Ejemplo n.º 7
0
void TextInputT::ReadNodeLabels (ArrayT<StringT>& nlabels) const
{
	/* allocate */
	nlabels.Dimension(NumNodeVariables());

	/* copy */
	for (int i=0; i < nlabels.Length(); i++)
		nlabels[i] = fNodeVariable[i];
}
Ejemplo n.º 8
0
void TextInputT::ReadElementLabels (ArrayT<StringT>& elabels) const
{
	/* allocate */
	elabels.Dimension(NumElementVariables());

	/* copy */
  	for (int i=0; i < elabels.Length(); i++)
		elabels[i] = fElementVariable[i];
}
Ejemplo n.º 9
0
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]; 
} 
Ejemplo n.º 10
0
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];
}
Ejemplo n.º 11
0
/* 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";
}
Ejemplo n.º 12
0
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";
}
Ejemplo n.º 13
0
/* 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";
}
Ejemplo n.º 14
0
/* 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";
}
Ejemplo n.º 15
0
/* 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];
    }
}
Ejemplo n.º 16
0
/* generate labels for output data */
void FS_SCNIMF_AxiT::GenerateOutputLabels(ArrayT<StringT>& labels)
{
	/* 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[2] = {"R", "Z"};
		int index = offsets[kCoordinates];
		for (int i = 0; i < 2; 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 < NumDOF(); i++)
			labels[index++] = field_labels[i];
	}

	/* mass */
	if (fOutputFlags[kMass])
		labels[offsets[kMass]] = "volume";

	/* strain */
	if (fOutputFlags[kStrain]) {
		const char* elabels[4] = {"err", "ezz", "erz", "ett"};
		int index = offsets[kStrain];
		for (int i = 0; i < 4; i++)
			labels[index++] = elabels[i];
	}

	/* stress */
	if (fOutputFlags[kStress]) {
		const char* slabels[4] = {"srr", "szz", "srz", "stt"};
		int index = offsets[kStress];
		for (int i = 0; i < 4; 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];
	}
}
Ejemplo n.º 17
0
void ABAQUS_UMAT_SS_BaseT::OutputLabels(ArrayT<StringT>& labels) const
{
	labels.Dimension(fOutputLabels.Length());
	for (int i = 0; i < labels.Length(); i++)
		labels[i] = fOutputLabels[i];
}
Ejemplo n.º 18
0
/* extract string parameters to an array */
void StringListT::Extract(const ParameterListT& list, ArrayT<StringT>& values)
{
	values.Dimension(list.NumLists("String"));
	for (int i = 0; i < values.Length(); i++)
		values[i] = list.GetList("String", i).GetParameter("value");
}