https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
13
16{
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}
registerMooseObject("PhaseFieldTestApp", EBCoupledVarTest)
static InputParameters validParams()
EBCoupledVarTest(const InputParameters &parameters)
static InputParameters validParams()
std::vector< EBTerm > _vals
const unsigned int _op_num
User facing host object for a function. This combines a term with an argument list.
User facing host object for an expression tree.
void addClassDescription(const std::string &doc_string)
void addRequiredCoupledVarWithAutoBuild(const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
void functionParse(const std::string &function_expression)
void tester(const std::set< int > &s, int i)