https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PhysicsVariableCoordinator.h
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#pragma once
11
12#include "Action.h"
13
35{
36public:
39
40 virtual void act() override;
41
55 void requestVariable(bool nl,
56 const std::string & var_type,
57 const VariableName & var_name,
58 const InputParameters & params,
59 const std::vector<SubdomainName> & blocks,
60 const std::string & requester);
61
65 ActionFactory & action_factory);
66
67private:
70 {
72 bool _nl;
74 std::string _type;
78 std::vector<std::pair<std::string, std::vector<SubdomainName>>> _requester_blocks;
79 };
80
83 void checkFVAdjacency(const VariableName & var_name, const MergedRequest & req) const;
84
86 std::map<VariableName, MergedRequest> _requests;
87};
char ** blocks
Specialized factory for generic Action System objects.
Storage for action instances.
Base class for actions.
Definition Action.h:38
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Lets multiple Physics instances (for example one per component) share a single variable across all of...
static PhysicsVariableCoordinator & findOrCreate(ActionWarehouse &awh, ActionFactory &action_factory)
Finds this simulation's coordinator, creating it and adding it to awh (using action_factory) if it do...
void checkFVAdjacency(const VariableName &var_name, const MergedRequest &req) const
Errors if req is a finite volume variable on two adjacent subdomains that no single requester is defi...
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
std::map< VariableName, MergedRequest > _requests
Pending variable requests, keyed by variable name.
void requestVariable(bool nl, const std::string &var_type, const VariableName &var_name, const InputParameters &params, const std::vector< SubdomainName > &blocks, const std::string &requester)
Requests that a shared variable be created on blocks, in addition to any blocks already requested for...
static InputParameters validParams()
The merged requests for one shared variable.
std::vector< std::pair< std::string, std::vector< SubdomainName > > > _requester_blocks
Name of each requesting Physics, in request order, with the blocks it requested.
InputParameters _params
Parameters of the variable, from the first request.
bool _nl
Whether the variable is a solver variable, as opposed to an auxiliary one.