<commit_before>#include "HomogenizationKernel.h"
#include "Material.h"
#include "SymmElasticityTensor.h"

template<>
InputParameters validParams<HomogenizationKernel>()
{
  InputParameters params = validParams<Kernel>();
  params.addRequiredParam<unsigned int>("component", "An integer corresponding to the direction the variable this kernel acts in. (0 for x, 1 for y, 2 for z)");
  params.addRequiredParam<unsigned int>("column", "An integer corresponding to the direction the variable this kernel acts in. (0 for xx, 1 for yy, 2 for zz, 3 for xy, 4 for yz, 5 for zx)");
  params.addParam<std::string>("appended_property_name", "", "Name appended to material properties to make them unique");

  return params;
}


HomogenizationKernel::HomogenizationKernel(const std::string & name, InputParameters parameters)
  :Kernel(name, parameters),

   _elasticity_tensor(getMaterialProperty<SymmElasticityTensor>("elasticity_tensor" + getParam<std::string>("appended_property_name"))),
   _component(getParam<unsigned int>("component")),
   _column(getParam<unsigned int>("column"))
{}

Real
HomogenizationKernel::computeQpResidual()
{
  unsigned k, l;

  if(_column == 0)
  {
    k = 0;
    l = 0;
  }


  if(_column == 1)
  {
    k = 1;
    l = 1;
  }


  if(_column == 2)
  {
    k = 2;
    l = 2;
  }


  if(_column == 3)
  {
    k = 0;
    l = 1;
  }


  if(_column == 4)
  {
    k = 1;
    l = 2;
  }

  if(_column == 5)
  {
    k = 2;
    l = 0;
  }


  const unsigned J( 3 * l + k );


  ColumnMajorMatrix E( _elasticity_tensor[_qp].columnMajorMatrix9x9() );

  Real value(0);

  for(unsigned j = 0; j < 3; j++)
  {
    const unsigned I = 3 * j + _component;
    value -= E(I,J) * _grad_test[_i][_qp](j);
  }

  return value;
}
<commit_msg>delete folder<commit_after>#include "HomogenizationKernel.h"
#include "Material.h"
#include "SymmElasticityTensor.h"

template<>
InputParameters validParams<HomogenizationKernel>()
{
  InputParameters params = validParams<Kernel>();
  params.addRequiredParam<unsigned int>("component", "An integer corresponding to the direction the variable this kernel acts in. (0 for x, 1 for y, 2 for z)");
  params.addRequiredParam<unsigned int>("column", "An integer corresponding to the direction the variable this kernel acts in. (0 for xx, 1 for yy, 2 for zz, 3 for xy, 4 for yz, 5 for zx)");
  params.addParam<std::string>("appended_property_name", "", "Name appended to material properties to make them unique");

  return params;
}


HomogenizationKernel::HomogenizationKernel(const std::string & name, InputParameters parameters)
  :Kernel(name, parameters),

   _elasticity_tensor(getMaterialProperty<SymmElasticityTensor>("elasticity_tensor" + getParam<std::string>("appended_property_name"))),
   _component(getParam<unsigned int>("component")),
   _column(getParam<unsigned int>("column"))
{}

Real
HomogenizationKernel::computeQpResidual()
{
  unsigned k, l;

  if(_column == 0)
  {
    k = 0;
    l = 0;
  }


  if(_column == 1)
  {
    k = 1;
    l = 1;
  }


  if(_column == 2)
  {
    k = 2;
    l = 2;
  }


  if(_column == 3)
  {
    k = 0;
    l = 1;
  }


  if(_column == 4)
  {
    k = 1;
    l = 2;
  }

  if(_column == 5)
  {
    k = 2;
    l = 0;
  }


  const unsigned J( 3 * l + k );


  ColumnMajorMatrix E( _elasticity_tensor[_qp].columnMajorMatrix9x9() );

  Real value(0);


      
  for(unsigned j = 0; j < 3; j++)
  {
    const unsigned I = 3 * j + _component;
    value = value - E(I,J) * _grad_test[_i][_qp](j);
  }

  return value;
}

{'fraction_non_alphanumeric': 0.13881748071979436, 'fraction_numerical': 0.01942302199371608, 'mean_word_length': 3.595800524934383, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3016934', 'n_tokens_mistral': 1297, 'n_tokens_neox': 1203, 'n_words': 324}