void create_system_matrix
(const DoFHandler<dim> &dof_handler,
const QGauss<dim> &quad,
- const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+ const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
const CDR::Parameters ¶meters,
const double time_step,
MatrixType &system_matrix);
void create_system_matrix
(const DoFHandler<dim> &dof_handler,
const QGauss<dim> &quad,
- const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+ const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
const ConstraintMatrix &constraints,
MatrixType &system_matrix);
}
void internal_create_system_matrix
(const DoFHandler<dim> &dof_handler,
const QGauss<dim> &quad,
- const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+ const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
- UpdateFunction update_system_matrix)
+ const double time_step,
+ UpdateFunction update_system_matrix)
{
auto &fe = dof_handler.get_fe();
const auto dofs_per_cell = fe.dofs_per_cell;
void create_system_matrix
(const DoFHandler<dim> &dof_handler,
const QGauss<dim> &quad,
- const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+ const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
const ConstraintMatrix &constraints,
MatrixType &system_matrix)
{
void create_system_matrix
(const DoFHandler<dim> &dof_handler,
const QGauss<dim> &quad,
- const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+ const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
MatrixType &system_matrix)
{
internal_create_system_matrix<dim>
void create_system_rhs
(const DoFHandler<dim> &dof_handler,
const QGauss<dim> &quad,
- const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
- const std::function<double(double, const Point<dim>)> forcing_function,
+ const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+ const std::function<double(double, const Point<dim>)> forcing_function,
const CDR::Parameters ¶meters,
const VectorType &previous_solution,
const ConstraintMatrix &constraints,
- const double current_time,
+ const double current_time,
VectorType &system_rhs);
}
#endif
void create_system_rhs
(const DoFHandler<dim> &dof_handler,
const QGauss<dim> &quad,
- const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
- const std::function<double(double, const Point<dim>)> forcing_function,
+ const std::function<Tensor<1, dim>(const Point<dim>)> convection_function,
+ const std::function<double(double, const Point<dim>)> forcing_function,
const CDR::Parameters ¶meters,
const VectorType &previous_solution,
const ConstraintMatrix &constraints,
- const double current_time,
+ const double current_time,
VectorType &system_rhs)
{
auto &fe = dof_handler.get_fe();
template<int dim, typename VectorType>
void write_output(const DoFHandler<dim> &dof_handler,
const VectorType &solution,
- const unsigned int time_step_n,
- const double current_time);
+ const unsigned int time_step_n,
+ const double current_time);
private:
const unsigned int patch_level;
const unsigned int this_mpi_process;
template<int dim, typename VectorType>
void WritePVTUOutput::write_output(const DoFHandler<dim> &dof_handler,
const VectorType &solution,
- const unsigned int time_step_n,
- const double current_time)
+ const unsigned int time_step_n,
+ const double current_time)
{
DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
void create_system_matrix<2, SparseMatrix<double>>
(const DoFHandler<2> &dof_handler,
const QGauss<2> &quad,
- const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+ const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
SparseMatrix<double> &system_matrix);
template
void create_system_matrix<3, SparseMatrix<double>>
(const DoFHandler<3> &dof_handler,
const QGauss<3> &quad,
- const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+ const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
SparseMatrix<double> &system_matrix);
template
void create_system_matrix<2, SparseMatrix<double>>
(const DoFHandler<2> &dof_handler,
const QGauss<2> &quad,
- const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+ const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
const ConstraintMatrix &constraints,
SparseMatrix<double> &system_matrix);
void create_system_matrix<3, SparseMatrix<double>>
(const DoFHandler<3> &dof_handler,
const QGauss<3> &quad,
- const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+ const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
const ConstraintMatrix &constraints,
SparseMatrix<double> &system_matrix);
void create_system_matrix<2, TrilinosWrappers::SparseMatrix>
(const DoFHandler<2> &dof_handler,
const QGauss<2> &quad,
- const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+ const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
TrilinosWrappers::SparseMatrix &system_matrix);
template
void create_system_matrix<3, TrilinosWrappers::SparseMatrix>
(const DoFHandler<3> &dof_handler,
const QGauss<3> &quad,
- const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+ const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
TrilinosWrappers::SparseMatrix &system_matrix);
template
void create_system_matrix<2, TrilinosWrappers::SparseMatrix>
(const DoFHandler<2> &dof_handler,
const QGauss<2> &quad,
- const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+ const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
const ConstraintMatrix &constraints,
TrilinosWrappers::SparseMatrix &system_matrix);
void create_system_matrix<3, TrilinosWrappers::SparseMatrix>
(const DoFHandler<3> &dof_handler,
const QGauss<3> &quad,
- const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+ const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
const CDR::Parameters ¶meters,
- const double time_step,
+ const double time_step,
const ConstraintMatrix &constraints,
TrilinosWrappers::SparseMatrix &system_matrix);
}
void create_system_rhs<2, Vector<double>>
(const DoFHandler<2> &dof_handler,
const QGauss<2> &quad,
- const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
- const std::function<double(double, const Point<2>)> forcing_function,
+ const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+ const std::function<double(double, const Point<2>)> forcing_function,
const CDR::Parameters ¶meters,
const Vector<double> &previous_solution,
const ConstraintMatrix &constraints,
- const double current_time,
+ const double current_time,
Vector<double> &system_rhs);
template
void create_system_rhs<3, Vector<double>>
(const DoFHandler<3> &dof_handler,
const QGauss<3> &quad,
- const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
- const std::function<double(double, const Point<3>)> forcing_function,
+ const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+ const std::function<double(double, const Point<3>)> forcing_function,
const CDR::Parameters ¶meters,
const Vector<double> &previous_solution,
const ConstraintMatrix &constraints,
- const double current_time,
+ const double current_time,
Vector<double> &system_rhs);
template
void create_system_rhs<2, TrilinosWrappers::MPI::Vector>
(const DoFHandler<2> &dof_handler,
const QGauss<2> &quad,
- const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
- const std::function<double(double, const Point<2>)> forcing_function,
+ const std::function<Tensor<1, 2>(const Point<2>)> convection_function,
+ const std::function<double(double, const Point<2>)> forcing_function,
const CDR::Parameters ¶meters,
const TrilinosWrappers::MPI::Vector &previous_solution,
const ConstraintMatrix &constraints,
- const double current_time,
+ const double current_time,
TrilinosWrappers::MPI::Vector &system_rhs);
template
void create_system_rhs<3, TrilinosWrappers::MPI::Vector>
(const DoFHandler<3> &dof_handler,
const QGauss<3> &quad,
- const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
- const std::function<double(double, const Point<3>)> forcing_function,
+ const std::function<Tensor<1, 3>(const Point<3>)> convection_function,
+ const std::function<double(double, const Point<3>)> forcing_function,
const CDR::Parameters ¶meters,
const TrilinosWrappers::MPI::Vector &previous_solution,
const ConstraintMatrix &constraints,
- const double current_time,
+ const double current_time,
TrilinosWrappers::MPI::Vector &system_rhs);
}
template
void WritePVTUOutput::write_output(const DoFHandler<2> &dof_handler,
const Vector<double> &solution,
- const unsigned int time_step_n,
- const double current_time);
+ const unsigned int time_step_n,
+ const double current_time);
template
void WritePVTUOutput::write_output(const DoFHandler<3> &dof_handler,
const Vector<double> &solution,
- const unsigned int time_step_n,
- const double current_time);
+ const unsigned int time_step_n,
+ const double current_time);
template
void WritePVTUOutput::write_output(const DoFHandler<2> &dof_handler,
const TrilinosWrappers::MPI::Vector &solution,
- const unsigned int time_step_n,
- const double current_time);
+ const unsigned int time_step_n,
+ const double current_time);
template
void WritePVTUOutput::write_output(const DoFHandler<3> &dof_handler,
const TrilinosWrappers::MPI::Vector &solution,
- const unsigned int time_step_n,
- const double current_time);
+ const unsigned int time_step_n,
+ const double current_time);
}
Triangulation<dim>::smoothing_on_coarsening)),
dof_handler(triangulation),
convection_function
-{
- [](const Point<dim> p) -> Tensor<1, dim>
- {Tensor<1, dim> v; v[0] = -p[1]; v[1] = p[0]; return v;}},
-forcing_function
-{
- [](double t, const Point<dim> p) -> double
{
- return std::exp(-8*t)*std::exp(-40*Utilities::fixed_power<6>(p[0] - 1.5))
- *std::exp(-40*Utilities::fixed_power<6>(p[1]));
- }},
-first_run {true},
- pcout (std::cout,
- (Utilities::MPI::this_mpi_process(mpi_communicator)
- == 0))
+ [](const Point<dim> p) -> Tensor<1, dim>
+ {Tensor<1, dim> v; v[0] = -p[1]; v[1] = p[0]; return v;}
+ },
+ forcing_function
+ {
+ [](double t, const Point<dim> p) -> double
+ {
+ return std::exp(-8*t)*std::exp(-40*Utilities::fixed_power<6>(p[0] - 1.5))
+ *std::exp(-40*Utilities::fixed_power<6>(p[1]));
+ }
+ },
+ first_run {true},
+ pcout (std::cout, this_mpi_process == 0)
{
Assert(dim == 2, ExcNotImplemented());
}