https://mooseframework.inl.gov
FXValuePenaltyBC.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 "FXValuePenaltyBC.h"
11 #include "FunctionSeries.h"
12 
13 registerMooseObject("FunctionalExpansionToolsApp", FXValuePenaltyBC);
14 
17 {
19 
20  params.addClassDescription(
21  "Sets a value boundary condition, evaluated using a FunctionSeries instance. This does not "
22  "fix the value, but rather 'strongly encourages' value agreement by penalizing the "
23  "differences through contributions to the residual.");
24 
25  return params;
26 }
27 
29  : FunctionPenaltyDirichletBC(parameters)
30 {
31  FunctionSeries & fe_basis =
32  FunctionSeries::checkAndConvertFunction(_func, getParam<std::string>("_moose_base"), name());
33 
34  fe_basis.useCache(true);
35 }
const Function & _func
registerMooseObject("FunctionalExpansionToolsApp", FXValuePenaltyBC)
virtual const std::string & name() const
This class uses implementations of CompositeSeriesBasisInterface to generate a function based on conv...
Defines an FX-based BC that strongly encourages the values to match.
static FunctionSeries & checkAndConvertFunction(const Function &function, const std::string &typeName, const std::string &objectName)
Static function to cast a Function to SeriesFunction.
void useCache(bool use)
Enable/disable the cache.
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
FXValuePenaltyBC(const InputParameters &parameters)
static InputParameters validParams()