34 #include "libmesh/getpot.h"
35 #include "libmesh/elem.h"
36 #include "libmesh/fe_interface.h"
47 _physics_name( physics_name ),
66 const std::string& physics_name )
68 int num_ids = input.vector_variable_size(
"Physics/"+physics_name+
"/enabled_subdomains" );
70 for(
int i = 0; i < num_ids; i++ )
72 libMesh::subdomain_id_type dumvar = input(
"Physics/"+physics_name+
"/enabled_subdomains", -1, i );
137 const libMesh::Point& ,
144 const libMesh::FEGenericBase<libMesh::Real>* fe,
145 const libMesh::Point p )
148 FEType fe_type = fe->get_fe_type();
153 libmesh_assert(elem || fe_type.family == SCALAR);
155 unsigned int elem_dim = elem ? elem->dim() : 0;
157 UniquePtr<FEGenericBase<libMesh::Real> >
158 fe_new(FEGenericBase<libMesh::Real>::build(elem_dim, fe_type));
162 Point master_point = elem ?
163 FEInterface::inverse_map(elem_dim, fe_type, elem, p) :
166 std::vector<Point> coor(1, master_point);
169 fe_new->reinit (elem, &coor);
176 const std::set<libMesh::subdomain_id_type>& var_subdomains = var.
subdomain_ids();
183 libmesh_error_msg(
"ERROR: Physics enabled on all subdomains but variable is not!");
187 if( var_subdomains.find(*it) == var_subdomains.end() )
188 libmesh_error_msg(
"ERROR: Could not find subdomain " << *it <<
" in varaible!");
virtual void compute_postprocessed_quantity(unsigned int quantity_index, const AssemblyContext &context, const libMesh::Point &point, libMesh::Real &value)
GRINS::ICHandlingBase * _ic_handler
bool is_steady() const
Returns whether or not this physics is being solved with a steady solver.
virtual void register_postprocessing_vars(const GetPot &input, PostProcessedQuantities< libMesh::Real > &postprocessing)
Register name of postprocessed quantity with PostProcessedQuantities.
libMesh::UniquePtr< libMesh::FEGenericBase< libMesh::Real > > build_new_fe(const libMesh::Elem *elem, const libMesh::FEGenericBase< libMesh::Real > *fe, const libMesh::Point p)
void check_var_subdomain_consistency(const FEVariablesBase &var) const
Check that var is enabled on at least the subdomains this Physics is.
const std::set< libMesh::subdomain_id_type > & subdomain_ids() const
ParameterUser base class. Utility methods for subclasses.
virtual bool enabled_on_elem(const libMesh::Elem *elem)
Find if current physics is active on supplied element.
virtual void auxiliary_init(MultiphysicsSystem &system)
Any auxillary initialization a Physics class may need.
Base class for reading and handling initial conditions for physics classes.
static void set_is_axisymmetric(bool is_axisymmetric)
Set whether we should treat the problem as axisymmetric.
static bool _is_steady
Caches whether or not the solver that's being used is steady or not.
virtual void set_time_evolving_vars(libMesh::FEMSystem *system)
Set which variables are time evolving.
Interface with libMesh for solving Multiphysics problems.
virtual void init_context(AssemblyContext &context)
Initialize context for added physics variables.
void parse_enabled_subdomains(const GetPot &input, const std::string &physics_name)
virtual void init_ic_data(const libMesh::FEMSystem &system, libMesh::CompositeFunction< libMesh::Number > &all_ics)
Override this method to initialize any system-dependent data.
static bool _is_axisymmetric
Caches whether we are solving an axisymmetric problem or not.
void init_ics(libMesh::FEMSystem *system, libMesh::CompositeFunction< libMesh::Number > &all_ics)
std::set< libMesh::subdomain_id_type > _enabled_subdomains
Subdomains on which the current Physics class is enabled.
void set_is_steady(bool is_steady)
Sets whether this physics is to be solved with a steady solver or not.