https://mooseframework.inl.gov
EBCoupledVarTest.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "EBCoupledVarTest.h"
11 
12 registerMooseObject("PhaseFieldTestApp", EBCoupledVarTest);
13 
16 {
18  params.addClassDescription(
19  "Test to see if vector of coupled variables works with ExpressionBuilder");
21  "v", "var_name_base", "op_num", "Array of coupled variables");
22 
23  return params;
24 }
25 
27  : DerivativeParsedMaterialHelper(parameters), _op_num(coupledComponents("v")), _vals(_op_num)
28 {
29  EBTerm newest("v");
30  std::string new_name;
31  for (unsigned int i = 0; i < _op_num; ++i)
32  {
33  new_name = "v" + std::to_string(i);
34  EBTerm new_term(new_name.c_str());
35  _vals[i] = new_term;
36  }
38  tester(_vals) = _vals[0] + 2 * _vals[1];
39 
41 }
User facing host object for an expression tree.
const unsigned int _op_num
std::vector< EBTerm > _vals
EBCoupledVarTest(const InputParameters &parameters)
static InputParameters validParams()
registerMooseObject("PhaseFieldTestApp", EBCoupledVarTest)
void addRequiredCoupledVarWithAutoBuild(const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
User facing host object for a function. This combines a term with an argument list.
void tester(const std::set< int > &s, int i)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
void functionParse(const std::string &function_expression)