https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
INSFVVariableTest Class Reference
Inheritance diagram for INSFVVariableTest:
[legend]

Public Member Functions

 INSFVVariableTest ()
 

Protected Member Functions

void buildObjects ()
 
MooseVariableFieldBaseaddINSFVVar (const std::string &name)
 

Protected Attributes

std::unique_ptr< MooseMesh_mesh
 
std::shared_ptr< MooseApp_app
 
Factory_factory
 
std::shared_ptr< FEProblem_fe_problem
 

Detailed Description

Definition at line 20 of file INSFVVariableTest.C.

Constructor & Destructor Documentation

◆ INSFVVariableTest()

INSFVVariableTest::INSFVVariableTest ( )
inline

Definition at line 23 of file INSFVVariableTest.C.

24 : _app(Moose::createMooseApp("NavierStokesUnitApp", 0, nullptr)), _factory(_app->getFactory())
25 {
27 }
std::shared_ptr< MooseApp > _app
std::unique_ptr< MooseApp > createMooseApp(const std::string &default_app_type, int argc, char *argv[])

Member Function Documentation

◆ addINSFVVar()

MooseVariableFieldBase & INSFVVariableTest::addINSFVVar ( const std::string &  name)
inlineprotected

Definition at line 49 of file INSFVVariableTest.C.

50 {
51 InputParameters params = _factory.getValidParams("INSFVPressureVariable");
52 _fe_problem->addVariable("INSFVPressureVariable", name, params);
53 return _fe_problem->getVariable(0, name);
54 }
const std::string name
Definition Setup.h:21
InputParameters getValidParams(const std::string &name) const
std::shared_ptr< FEProblem > _fe_problem

◆ buildObjects()

void INSFVVariableTest::buildObjects ( )
inlineprotected

Definition at line 30 of file INSFVVariableTest.C.

31 {
32 InputParameters mesh_params = _factory.getValidParams("GeneratedMesh");
33 mesh_params.set<MooseEnum>("dim") = "2";
34 mesh_params.set<unsigned int>("nx") = 2;
35 mesh_params.set<unsigned int>("ny") = 2;
36 _mesh = _factory.createUnique<MooseMesh>("GeneratedMesh", "moose_mesh", mesh_params);
37 _mesh->setMeshBase(_mesh->buildMeshBaseObject());
38 _mesh->buildMesh();
39
40 InputParameters problem_params = _factory.getValidParams("FEProblem");
41 problem_params.set<MooseMesh *>("mesh") = _mesh.get();
42 problem_params.set<std::string>(MooseBase::name_param) = "problem";
43 _fe_problem = _factory.create<FEProblem>("FEProblem", "problem", problem_params);
45 _app->actionWarehouse().problemBase() = _fe_problem;
46 }
virtual void createQRules(libMesh::QuadratureType type, libMesh::Order order, libMesh::Order volume_order=libMesh::INVALID_ORDER, libMesh::Order face_order=libMesh::INVALID_ORDER, SubdomainID block=Moose::ANY_BLOCK_ID, bool allow_negative_qweights=true)
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
std::unique_ptr< MooseObject > createUnique(const std::string &obj_name, const std::string &name, const InputParameters &parameters, THREAD_ID tid=0, bool print_deprecated=true)
std::unique_ptr< MooseMesh > _mesh
T & set(const std::string &name, bool quiet_mode=false)
static const std::string name_param

Referenced by INSFVVariableTest().

Member Data Documentation

◆ _app

std::shared_ptr<MooseApp> INSFVVariableTest::_app
protected

Definition at line 57 of file INSFVVariableTest.C.

Referenced by buildObjects().

◆ _factory

Factory& INSFVVariableTest::_factory
protected

Definition at line 58 of file INSFVVariableTest.C.

Referenced by addINSFVVar(), and buildObjects().

◆ _fe_problem

std::shared_ptr<FEProblem> INSFVVariableTest::_fe_problem
protected

Definition at line 59 of file INSFVVariableTest.C.

Referenced by addINSFVVar(), and buildObjects().

◆ _mesh

std::unique_ptr<MooseMesh> INSFVVariableTest::_mesh
protected

Definition at line 56 of file INSFVVariableTest.C.

Referenced by buildObjects().


The documentation for this class was generated from the following file: