www.mooseframework.org
FXValuePenaltyBC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<FunctionPenaltyDirichletBC>();
20 
21  params.addClassDescription(
22  "Sets a value boundary condition, evaluated using a FunctionSeries instance. This does not "
23  "fix the value, but rather 'strongly encourages' value agreement by penalizing the "
24  "differences through contributions to the residual.");
25 
26  return params;
27 }
28 
29 FXValuePenaltyBC::FXValuePenaltyBC(const InputParameters & parameters)
30  : FunctionPenaltyDirichletBC(parameters)
31 {
32  FunctionSeries & fe_basis =
33  FunctionSeries::checkAndConvertFunction(_func, getParam<std::string>("_moose_base"), name());
34 
35  fe_basis.useCache(true);
36 }
FXValuePenaltyBC
Defines an FX-based BC that strongly encourages the values to match.
Definition: FXValuePenaltyBC.h:22
validParams< FXValuePenaltyBC >
InputParameters validParams< FXValuePenaltyBC >()
Definition: FXValuePenaltyBC.C:17
registerMooseObject
registerMooseObject("FunctionalExpansionToolsApp", FXValuePenaltyBC)
FXValuePenaltyBC::FXValuePenaltyBC
FXValuePenaltyBC(const InputParameters &parameters)
Definition: FXValuePenaltyBC.C:29
FXValuePenaltyBC.h
FunctionSeries
This class uses implementations of CompositeSeriesBasisInterface to generate a function based on conv...
Definition: FunctionSeries.h:25
name
const std::string name
Definition: Setup.h:21
MemoizedFunctionInterface::useCache
void useCache(bool use)
Enable/disable the cache.
Definition: MemoizedFunctionInterface.C:75
FunctionSeries::checkAndConvertFunction
static FunctionSeries & checkAndConvertFunction(const Function &function, const std::string &typeName, const std::string &objectName)
Static function to cast a Function to SeriesFunction.
Definition: FunctionSeries.C:175
FunctionSeries.h