https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PFCRFFKernelAction.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 "PFCRFFKernelAction.h"
11#include "Factory.h"
12#include "FEProblem.h"
13#include "Conversion.h"
14
15registerMooseAction("PhaseFieldApp", PFCRFFKernelAction, "add_kernel");
16
19{
21 params.addParam<Real>("a", 1.0, "Parameter in the Taylor series expansion");
22 params.addParam<Real>("b", 1.0, "Parameter in the Taylor series expansion");
23 params.addParam<Real>("c", 1.0, "Parameter in the Taylor series expansion");
24 return params;
25}
26
31
32void
34{
35 // Create the two kernels required for the n_variable, starting with the time derivative
36 InputParameters poly_params = _factory.getValidParams("TimeDerivative");
37 poly_params.set<NonlinearVariableName>("variable") = _n_name;
38 poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
39 _problem->addKernel("TimeDerivative", "IE_n", poly_params);
40
41 // First, we have to create the vector containing the names of the real L variables
42 std::vector<VariableName> real_v(_num_L);
43 for (unsigned int l = 0; l < _num_L; ++l)
44 real_v[l] = _L_name_base + Moose::stringify(l) + "_real";
45
46 // CHPFCRFF kernel
47 poly_params = _factory.getValidParams("CHPFCRFF");
48 poly_params.set<NonlinearVariableName>("variable") = _n_name;
49 poly_params.set<std::vector<VariableName>>("v") = real_v;
50 poly_params.applyParameters(parameters());
51 _problem->addKernel("CHPFCRFF", "CH_bulk_n", poly_params);
52
53 // Loop over the L_variables
55}
registerMooseAction("PhaseFieldApp", PFCRFFKernelAction, "add_kernel")
std::shared_ptr< FEProblemBase > & _problem
InputParameters getValidParams(const std::string &name) const
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
const InputParameters & parameters() const
PFCRFFKernelAction(const InputParameters &params)
static InputParameters validParams()
Factory & _factory
std::string stringify(const T &t)