message: added trick to skip the copying code in SerialBCSCMat::addWeightValues
diff: @@ -107,6 +107,16 @@ void SerialBCSCMat::addWeightValues( int nvars, const int *varp,
  int nv, int mv,
  const TacsScalar *values,
  MatrixOrientation matOr ){
  + if (varp[nvars] == nvars){
  + // Special case when there are no weights - no copying required
  + int is_transpose = 0;
  + if (matOr == TRANSPOSE){
  + is_transpose = 1;
  + }
  + mat->addMatBlockValues(nvars, vars, nvars, vars,
  + values, nvars, is_transpose);
  + }
  + else {
  // Allocate space for the matrix
  int n = varp[nvars];
  TacsScalar *Aw = new TacsScalar[ bsize*bsize*n*n ];
  @@ -136,6 +146,7 @@ void SerialBCSCMat::addWeightValues( int nvars, const int *varp,
  mat->addMatBlockValues(n, vars, n, vars, Aw, n, is_transpose);
  delete [] Aw;
  }
  +}
  /*
  Apply the Dirichlet boundary conditions to the matrix
  