4#ifndef lethe_fluid_dynamics_nitsche_h
5#define lethe_fluid_dynamics_nitsche_h
24template <
int dim,
int spacedim = dim>
38 template <
bool assemble_matrix>
83 bool first_solid_torques);
151 std::vector<OutputStructTableHandler>
168 std::shared_ptr<std::vector<std::shared_ptr<SolidBase<dim, spacedim>>>>
FluidDynamicsMatrixBased(SimulationParameters< dim > &nsparam, const FluidDynamicsFormulation fluid_dynamics_formulation=FluidDynamicsFormulation::standard)
Construct the matrix-based Navier-Stokes solver.
FluidDynamicsNitsche(SimulationParameters< spacedim > &nsparam)
void output_solid_triangulation(const unsigned int i_solid)
Outputs a vtu file for each output frequency of the solid triangulation.
void assemble_nitsche_restriction()
Adds the nitsche restriction to the global matrix and global rhs on the cells surrounding the immerse...
void postprocess_solid_torques(const unsigned int i_solid, bool first_solid_torques)
Post-process for torques on solid after an iteration.
std::vector< PVDHandler > pvdhandler_solid_triangulation
std::vector< OutputStructTableHandler > gather_tables() override
Returns a vector of references to TableHandler objects that needs to be serialized/deserialized for a...
Tensor< 1, 3 > calculate_torque_on_solid()
Calculates the torque due to the fluid motion on the solid.
virtual void read_checkpoint() override
Read a gls_nitsche simulation checkpoint and initiate simulation restart.
void output_solid_particles(const unsigned int i_solid)
Outputs a vtu file for each output frequency of the particles.
std::vector< TableHandler > solid_forces_table
void assemble_matrix_and_rhs()
Same as in fluid_dynamics_matrix_based, but calls assemble_nitsche_restriction() when global matrix a...
virtual void assemble_system_matrix() override
Call for the assembly of the matrix.
Tensor< 1, spacedim > calculate_forces_on_solid(const unsigned int i_solid)
Calculates the force due to the fluid motion on the solid.
std::shared_ptr< std::vector< std::shared_ptr< SolidBase< dim, spacedim > > > > solids
virtual void solve() override
solve Solves the Navier-Stokes problem
std::vector< PVDHandler > pvdhandler_solid_particles
virtual void refine_mesh() override
Allow the refinement of the mesh according to one of the 2 methods proposed. Overrides the regular me...
virtual void assemble_system_rhs() override
Call for the assembly of the right-hand side.
virtual void write_checkpoint() override
Write a gls_nitsche simulation checkpointing to allow for gls_nitsche simulation restart.
void postprocess_solid_forces(const unsigned int i_solid, bool first_solid_forces)
Post-process for forces on solid after an iteration.
void assemble_rhs()
Same as in fluid_dynamics_matrix_based, but calls assemble_nitsche_restriction() when rhs is assemble...
std::vector< TableHandler > solid_torques_table