26 #ifndef GRINS_MULTIPHYSICS_SYS_H
27 #define GRINS_MULTIPHYSICS_SYS_H
33 #include "grins_config.h"
38 #include "libmesh/fem_system.h"
40 #ifdef GRINS_HAVE_GRVY
50 class EquationSystems;
53 template <
typename Scalar>
60 template <
typename Scalar>
88 const std::string& name,
89 const unsigned int number );
118 (
const std::string & param_name,
122 virtual libMesh::UniquePtr<libMesh::DiffContext>
build_context();
125 virtual void init_context( libMesh::DiffContext &context );
132 libMesh::DiffContext& context );
136 libMesh::DiffContext& context );
140 libMesh::DiffContext& context );
145 libMesh::DiffContext& context );
149 libMesh::DiffContext& context );
153 libMesh::DiffContext& context );
157 libMesh::DiffContext& context );
161 libMesh::DiffContext& context );
165 libMesh::DiffContext& context );
168 bool has_physics(
const std::string physics_name )
const;
170 SharedPtr<GRINS::Physics>
get_physics(
const std::string physics_name );
172 SharedPtr<GRINS::Physics>
get_physics(
const std::string physics_name )
const;
176 const libMesh::Point& point,
177 libMesh::Real& value );
185 #ifdef GRINS_USE_GRVY_TIMERS
186 void attach_grvy_timer( GRVY::GRVY_Timer_Class* grvy_timer );
219 #ifdef GRINS_USE_GRVY_TIMERS
220 GRVY::GRVY_Timer_Class* _timer;
229 libMesh::DiffContext& context,
235 const std::vector<SharedPtr<NeumannBCContainer> >& neumann_bcs,
236 std::vector<SharedPtr<NeumannBCContainer> >& active_neumann_bcs );
240 libMesh::DiffContext& context );
253 #endif // GRINS_MULTIPHYSICS_SYS_H
void(GRINS::Physics::* ResFuncType)(bool, AssemblyContext &, CachedValues &)
bool _use_numerical_jacobians_only
bool has_physics(const std::string physics_name) const
Query to check if a particular physics has been enabled.
const std::vector< SharedPtr< NeumannBCContainer > > & get_neumann_bcs() const
void(GRINS::Physics::* CacheFuncType)(const AssemblyContext &, CachedValues &)
void attach_physics_list(PhysicsList physics_list)
PhysicsList gets built by GRINS::PhysicsFactory and attached here.
std::vector< std::string > _numerical_jacobian_h_variables
std::vector< SharedPtr< NeumannBCContainer > > _neumann_bcs
Neumann boundary conditions.
Physics abstract base class. Defines API for physics to be added to MultiphysicsSystem.
virtual void init_data()
System initialization. Calls each physics implementation of init_variables()
void register_postprocessing_vars(const GetPot &input, PostProcessedQuantities< libMesh::Real > &postprocessing)
Each Physics will register their postprocessed quantities with this call.
virtual bool side_constraint(bool request_jacobian, libMesh::DiffContext &context)
Boundary contributions to which do not have time varying components.
libMesh::boundary_id_type BoundaryID
More descriptive name of the type used for boundary ids.
virtual bool damping_residual(bool request_jacobian, libMesh::DiffContext &context)
Contributions to .
SharedPtr< GRINS::Physics > get_physics(const std::string physics_name)
PhysicsList _physics_list
Container of pointers to GRINS::Physics classes requested at runtime.
virtual bool nonlocal_time_derivative(bool request_jacobian, libMesh::DiffContext &context)
Contributions to on SCALAR variables which have time varying components.
std::vector< SharedPtr< NeumannBCContainer > > & get_neumann_bcs()
virtual void compute_postprocessed_quantity(unsigned int quantity_index, const AssemblyContext &context, const libMesh::Point &point, libMesh::Real &value)
~MultiphysicsSystem()
Destructor. Clean up all physics allocations.
void register_parameter(const std::string ¶m_name, libMesh::ParameterMultiAccessor< libMesh::Number > ¶m_pointer)
Each Physics will register its copy(s) of an independent variable.
virtual bool nonlocal_mass_residual(bool request_jacobian, libMesh::DiffContext &context)
Contributions to on SCALAR variables.
virtual bool element_time_derivative(bool request_jacobian, libMesh::DiffContext &context)
Element interior contributions to which have time varying components.
virtual libMesh::UniquePtr< libMesh::DiffContext > build_context()
Override FEMSystem::build_context in order to use our own AssemblyContext.
virtual bool nonlocal_constraint(bool request_jacobian, libMesh::DiffContext &context)
Contributions to on SCALAR variables which do not have time varying components.
void get_active_neumann_bcs(BoundaryID bc_id, const std::vector< SharedPtr< NeumannBCContainer > > &neumann_bcs, std::vector< SharedPtr< NeumannBCContainer > > &active_neumann_bcs)
Extract the bcs from neumann_bcs that are active on bc_id and return them in active_neumann_bcs.
Interface with libMesh for solving Multiphysics problems.
std::map< std::string, SharedPtr< GRINS::Physics > > PhysicsList
Container for GRINS::Physics object pointers.
std::vector< libMesh::Real > _numerical_jacobian_h_values
bool _general_residual(bool request_jacobian, libMesh::DiffContext &context, ResFuncType resfunc, CacheFuncType cachefunc)
virtual bool element_constraint(bool request_jacobian, libMesh::DiffContext &context)
virtual bool mass_residual(bool request_jacobian, libMesh::DiffContext &context)
Contributions to .
bool apply_neumann_bcs(bool request_jacobian, libMesh::DiffContext &context)
Applies the subset of _neumann_bcs that are active on the current element side.
MultiphysicsSystem(libMesh::EquationSystems &es, const std::string &name, const unsigned int number)
Constructor. Will be called by libMesh only.
virtual bool side_time_derivative(bool request_jacobian, libMesh::DiffContext &context)
Boundary contributions to which have time varying components.
virtual void init_context(libMesh::DiffContext &context)
Context initialization. Calls each physics implementation of init_context()
const PhysicsList & get_physics_list() const
virtual void read_input_options(const GetPot &input)
Reads input options for this class and all physics that are enabled.
const GetPot * _input
Cached for helping build boundary conditions.