25 #ifndef GRINS_PHYSICS_H
26 #define GRINS_PHYSICS_H
33 #include "grins_config.h"
42 #include "libmesh/libmesh.h"
43 #include "libmesh/point.h"
44 #include "libmesh/fe_base.h"
45 #include "libmesh/system.h"
46 #include "libmesh/mesh_base.h"
47 #include "libmesh/auto_ptr.h"
53 template <
typename Scalar>
54 class CompositeFunction;
59 template <
typename Scalar>
60 class ParameterMultiAccessor;
71 class MultiphysicsSystem;
72 class FEVariablesBase;
74 template <
typename Scalar>
75 class PostProcessedQuantities;
209 void init_ics( libMesh::FEMSystem* system,
232 const libMesh::Point& point,
233 libMesh::Real& value );
240 libMesh::UniquePtr<libMesh::FEGenericBase<libMesh::Real> >
build_new_fe(
const libMesh::Elem* elem,
241 const libMesh::FEGenericBase<libMesh::Real>* fe,
242 const libMesh::Point p );
245 const std::string& physics_name );
285 #endif //GRINS_PHYSICS_H
virtual void compute_element_constraint_cache(AssemblyContext &)
static bool is_axisymmetric()
virtual void compute_postprocessed_quantity(unsigned int quantity_index, const AssemblyContext &context, const libMesh::Point &point, libMesh::Real &value)
virtual void compute_mass_residual_cache(AssemblyContext &)
GRINS::ICHandlingBase * _ic_handler
bool is_steady() const
Returns whether or not this physics is being solved with a steady solver.
Physics abstract base class. Defines API for physics to be added to MultiphysicsSystem.
virtual void compute_element_time_derivative_cache(AssemblyContext &)
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)
virtual void compute_damping_residual_cache(AssemblyContext &)
virtual void reinit(MultiphysicsSystem &)
Any reinitialization that needs to be done.
virtual void side_time_derivative(bool, AssemblyContext &)
Time dependent part(s) of physics for boundaries of elements on the domain boundary.
void check_var_subdomain_consistency(const FEVariablesBase &var) const
Check that var is enabled on at least the subdomains this Physics is.
ICHandlingBase * get_ic_handler()
virtual void element_time_derivative(bool, AssemblyContext &)
Time dependent part(s) of physics for element interiors.
virtual void nonlocal_constraint(bool, AssemblyContext &)
Constraint part(s) of physics for scalar variables.
virtual void compute_side_constraint_cache(AssemblyContext &)
virtual void nonlocal_mass_residual(bool, AssemblyContext &)
Mass matrix part(s) for scalar variables.
virtual void side_constraint(bool, AssemblyContext &)
Constraint part(s) of physics for boundaries of elements on the domain boundary.
const PhysicsName _physics_name
Name of the physics object. Used for reading physics specific inputs.
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 element_constraint(bool, AssemblyContext &)
Constraint part(s) of physics for element interiors.
virtual void compute_nonlocal_time_derivative_cache(AssemblyContext &)
virtual void mass_residual(bool, AssemblyContext &)
Mass matrix part(s) for element interiors. All boundary terms lie within the time_derivative part...
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 compute_nonlocal_constraint_cache(AssemblyContext &)
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.
virtual void compute_nonlocal_mass_residual_cache(AssemblyContext &)
virtual void init_variables(libMesh::FEMSystem *)
Initialize variables for this physics.
void parse_enabled_subdomains(const GetPot &input, const std::string &physics_name)
virtual void compute_side_time_derivative_cache(AssemblyContext &)
virtual void preassembly(MultiphysicsSystem &)
Perform any necessary setup before element assembly begins.
virtual void damping_residual(bool, AssemblyContext &)
Damping matrix part(s) for element interiors. All boundary terms lie within the time_derivative part...
virtual void nonlocal_time_derivative(bool, AssemblyContext &)
Time dependent part(s) of physics for scalar variables.
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.