270 * <a name=
"Distributed_Moving_Laser_Heating.cc-Includefiles"></a>
485 *
dof_handler.
clear();
491 * <a name=
"Distributed_Moving_Laser_Heating.cc-LaserHeatingmake_grid"></a>
507 *
pcout <<
" Number of active cells: "
510 *
<<
" Total number of cells: "
518 * <a name=
"Distributed_Moving_Laser_Heating.cc-LaserHeatingsetup_system"></a>
529 *
dof_handler.distribute_dofs (fe);
531 *
pcout <<
" Number of degrees of freedom: "
532 *
<< dof_handler.n_dofs()
535 *
locally_owned_dofs = dof_handler.locally_owned_dofs();
552 *
dynamic_rhs_T.reinit (locally_owned_dofs,mpi_communicator);
553 *
system_rhs_T.reinit (locally_owned_dofs,mpi_communicator);
565 *
locally_owned_dofs,
579 * <a name=
"Distributed_Moving_Laser_Heating.cc-LaserHeatingassemble_system_matrix"></a>
606 *
const unsigned int dofs_per_cell = fe.dofs_per_cell;
617 *
std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
625 *
for (
const auto &cell : dof_handler.active_cell_iterators())
626 *
if(cell->is_locally_owned())
629 *
fe_values.
reinit (cell);
637 *
for (
unsigned int q=0;
q<n_q_points; ++
q)
638 *
for (
unsigned int i=0; i<dofs_per_cell; ++i)
641 *
const double phi_i_u = fe_values.shape_value (i,
q);
643 *
for (
unsigned int j=0;
j<dofs_per_cell; ++
j)
647 *
const double phi_j_u = fe_values.shape_value (
j,
q);
651 *
fe_values.JxW (
q));
659 *
(
k_fun_T.value(fe_values.quadrature_point(
q)) *
662 *
fe_values.JxW (
q));
670 *
(
k_fun_T.value(fe_values.quadrature_point(
q)) *
673 *
fe_values.JxW (
q));
679 *
fe_values.JxW (
q));
683 *
cell->get_dof_indices (local_dof_indices);
732 * <a name=
"Distributed_Moving_Laser_Heating.cc-LaserHeatingdynamic_assemble_rhs_T"></a>
758 *
const unsigned int dofs_per_cell = fe.dofs_per_cell;
763 *
std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
771 *
cell = dof_handler.begin_active(),
772 *
endc = dof_handler.end();
774 *
for (; cell!=
endc; ++cell)
775 *
if(cell->is_locally_owned())
777 *
fe_values.reinit (cell);
780 *
for (
unsigned int q=0;
q<n_q_points; ++
q)
781 *
for (
unsigned int i=0; i<dofs_per_cell; ++i)
783 *
const double phi_i_u = fe_values.shape_value (i,
q);
794 *
fe_values.JxW (
q));
797 *
cell->get_dof_indices (local_dof_indices);
815 * <a name=
"Distributed_Moving_Laser_Heating.cc-LaserHeatingsolve"></a>
816 * <
h4>LaserHeating::solve</
h4>
849 *
pcout <<
" " << solver_control.last_step()
850 *
<<
" CG iterations needed to obtain convergence." << std::endl
851 *
<<
"\t initial convergence value = " << solver_control.initial_value() << std::endl
852 *
<<
"\t final convergence value = " << solver_control.last_value() << std::endl
864 * <a name=
"Distributed_Moving_Laser_Heating.cc-LaserHeatingrefine_mesh"></a>
894 *
if(cell->is_locally_owned())
896 *
fe_values.reinit(cell);
899 *
cell->set_refine_flag();
903 *
cell->clear_refine_flag();
914 * <a name=
"Distributed_Moving_Laser_Heating.cc-LaserHeatinghoutput_results"></a>
927 *
data_out.attach_dof_handler (dof_handler);
940 *
data_out.build_patches ();
942 *
const std::string
filename = (
"solution-" +
947 *
std::ofstream output (
filename.c_str());
948 *
data_out.write_vtu (output);
983 * <a name=
"Distributed_Moving_Laser_Heating.cc-LaserHeatingrun"></a>
984 * <
h4>LaserHeating::run</
h4>
996 *
pcout <<
"Solving problem in " << dim <<
" space dimensions." << std::endl;
1049 *
<<
" at t=" << time
1105 *
pcout << std::endl;
1116 * <a name=
"Distributed_Moving_Laser_Heating.cc-Thecodemaincodefunction"></a>
1134 *
catch (std::exception &exc)
1136 *
std::cerr << std::endl
1138 *
<<
"----------------------------------------------------"
1140 *
std::cerr <<
"Exception on processing: " << std::endl
1141 *
<< exc.what() << std::endl
1142 *
<<
"Aborting!" << std::endl
1143 *
<<
"----------------------------------------------------"
1150 *
std::cerr << std::endl
1152 *
<<
"----------------------------------------------------"
1154 *
std::cerr <<
"Unknown exception!" << std::endl
1155 *
<<
"Aborting!" << std::endl
1156 *
<<
"----------------------------------------------------"
1167<a name=
"ann-boundaryInit.h"></a>
1187 * #----------------------------------------------------------
1191 * #----------------------------------------------------------
1204 * #----------------------------------------------------------
1211 *
template <
int dim>
1218 *
const unsigned int component = 0)
const override;
1221 *
template <
int dim>
1228 *
const unsigned int component = 0)
const override;
1234 * #----------------------------------------------------------
1241 *
template <
int dim>
1243 *
const unsigned int )
const
1249 *
template <
int dim>
1251 *
const unsigned int )
const
1262 * #----------------------------------------------------------
1270 *
template <
int dim>
1277 *
const unsigned int component = 0)
const override;
1280 *
template <
int dim>
1282 *
const unsigned int )
const
1303 * #----------------------------------------------------------
1311 *
template <
int dim>
1318 *
const unsigned int component = 0)
const override;
1321 *
template <
int dim>
1323 *
const unsigned int )
const
1342<a name=
"ann-globalPara.h"></a>
1362 * # physics constants
1417<a name=
"ann-rightHandSide.h"></a>
1437 * #----------------------------------------------------------
1441 * #----------------------------------------------------------
1454 * #----------------------------------------------------------
1461 *
template <
int dim>
1472 * #----------------------------------------------------------
1479 *
template <
int dim>
std::conditional_t< rank_==1, std::array< Number, dim >, std::array< Tensor< rank_ - 1, dim, Number >, dim > > values
typename ActiveSelector::active_cell_iterator active_cell_iterator
void make_hanging_node_constraints(const DoFHandler< dim, spacedim > &dof_handler, AffineConstraints< number > &constraints)
void make_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity_pattern, const AffineConstraints< number > &constraints={}, const bool keep_constrained_dofs=true, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id)
@ update_values
Shape function values.
@ update_JxW_values
Transformed quadrature weights.
@ update_gradients
Shape function gradients.
@ update_quadrature_points
Transformed quadrature points.
std::vector< index_type > data
void refine(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold, const unsigned int max_to_mark=numbers::invalid_unsigned_int)
@ matrix
Contents is actually a matrix.
@ general
No special properties.
constexpr types::blas_int one
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
unsigned int n_mpi_processes(const MPI_Comm mpi_communicator)
unsigned int this_mpi_process(const MPI_Comm mpi_communicator)
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
void run(const Iterator &begin, const std_cxx20::type_identity_t< Iterator > &end, Worker worker, Copier copier, const ScratchData &sample_scratch_data, const CopyData &sample_copy_data, const unsigned int queue_length, const unsigned int chunk_size)
void copy(const T *begin, const T *end, U *dest)
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
::VectorizedArray< Number, width > exp(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation