<commit_before>//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#pragma once

#include "MooseObjectAction.h"

#include "libmesh/fe_type.h"

// Forward declerations
class AddVariableAction;

template <>
InputParameters validParams<AddVariableAction>();

/**
 * Adds nonlinear variable
 */
class AddVariableAction : public MooseObjectAction
{
public:
  /**
   * Class constructor
   */
  static InputParameters validParams();

  AddVariableAction(InputParameters params);

  virtual void act() override;

  /**
   * Get the possible variable families
   * @return MooseEnum with the possible variable families (e.g., LAGRANGE)
   */
  static MooseEnum getNonlinearVariableFamilies();

  /**
   * Get the possible variable orders
   * @return MooseEnum with the possible variable orders (e.g., SECOND)
   */
  static MooseEnum getNonlinearVariableOrders();

  /**
   * determine the FEType by examining family and order in the provided parameters
   */
  static FEType feType(const InputParameters & params);

  /**
   * determine the variable type given an FEType and number of components
   */
  static std::string determineType(const FEType & fe_type, unsigned int components, bool is_fv);

protected:
  /**
   * Initialize the action's member variables
   */
  virtual void init();

  /**
   * Adds a nonlinear variable to the system.
   *
   * @param var_name The name of the variable.<commit_msg>actions: add is_fv=false default to determineType to keep backward API compat<commit_after>//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#pragma once

#include "MooseObjectAction.h"

#include "libmesh/fe_type.h"

// Forward declerations
class AddVariableAction;

template <>
InputParameters validParams<AddVariableAction>();

/**
 * Adds nonlinear variable
 */
class AddVariableAction : public MooseObjectAction
{
public:
  /**
   * Class constructor
   */
  static InputParameters validParams();

  AddVariableAction(InputParameters params);

  virtual void act() override;

  /**
   * Get the possible variable families
   * @return MooseEnum with the possible variable families (e.g., LAGRANGE)
   */
  static MooseEnum getNonlinearVariableFamilies();

  /**
   * Get the possible variable orders
   * @return MooseEnum with the possible variable orders (e.g., SECOND)
   */
  static MooseEnum getNonlinearVariableOrders();

  /**
   * determine the FEType by examining family and order in the provided parameters
   */
  static FEType feType(const InputParameters & params);

  /**
   * determine the variable type given an FEType and number of components
   */
  static std::string
  determineType(const FEType & fe_type, unsigned int components, bool is_fv = false);

protected:
  /**
   * Initialize the action's member variables
   */
  virtual void init();

  /**
   * Adds a nonlinear variable to the system.
   *
   * @param var_name The name of the variable.
{'fraction_non_alphanumeric': 0.10299295774647887, 'fraction_numerical': 0.002347417840375587, 'mean_word_length': 3.6891334250343877, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, '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': '7311394', 'n_tokens_mistral': 993, 'n_tokens_neox': 968, 'n_words': 322}