Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
heat_transfer_scratch_data.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2021-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_heat_transfer_scratch_data_h
5#define lethe_heat_transfer_scratch_data_h
6
8#include <core/vector.h>
9
10#include <solvers/cls_filter.h>
13
14#include <deal.II/base/exceptions.h>
15
16#include <deal.II/fe/fe_system.h>
17
18using namespace dealii;
19
20/**
21 * @brief Class that stores the information required by the assembly procedure
22 * for a heat transfer advection-diffusion equation. Consequently, this class
23 * calculates the heat transfer (values, gradients, laplacians) and the shape
24 * function (values, gradients, laplacians) at all the gauss points for all
25 * degrees of freedom and stores it into arrays. Additionally, the user can
26 * request that this class gathers additional fields for physics which are
27 * coupled to the heat transfer equation, such as the velocity which is
28 * required. This class serves as a separation between the evaluation at the
29 * gauss point of the variables of interest and their use in the assembly, which
30 * is carried out by the assembler methods. For more information on this
31 * design, the reader can consult deal.II step-9
32 * "https://www.dealii.org/current/doxygen/deal.II/step_9.html". In this latter
33 * example, the scratch is a struct instead of a templated class because of the
34 * simplicity of step-9.
35 *
36 * @tparam dim An integer that denotes the dimension of the space in which
37 * the flow is solved
38 *
39 * @ingroup solvers
40 **/
41
42template <int dim>
44{
45public:
46 /**
47 * @brief Constructor. The constructor creates the fe_values that will be used
48 * to fill the member variables of the scratch. It also allocated the
49 * necessary memory for all member variables. However, it does not do any
50 * evaluation, since this needs to be done at the cell level.
51 *
52 * @param properties_manager The physical properties Manager (see physical_properties_manager.h)
53 *
54 * @param fe_ht The FESystem used to solve the Heat Transfer equations
55 *
56 * @param quadrature The quadrature to use for the assembly
57 *
58 * @param mapping The mapping of the domain in which the Navier-Stokes equations are solved
59 *
60 * @param fe_fd The FESystem used to solve the Fluid Dynamics equations
61 *
62 * @param face_quadrature_formula The face quadrature formula
63 *
64 */
66 const FiniteElement<dim> &fe_ht,
67 const Quadrature<dim> &quadrature,
68 const Mapping<dim> &mapping,
69 const FiniteElement<dim> &fe_fd,
70 const Quadrature<dim - 1> &face_quadrature,
71 const double delta_T_ref)
73 , fe_values_T(mapping,
74 fe_ht,
75 quadrature,
76 update_values | update_quadrature_points | update_JxW_values |
77 update_gradients | update_hessians)
78 , global_delta_T_ref(delta_T_ref)
79 , velocities(0)
80 , pressure(dim)
81 , fe_values_fd(mapping, fe_fd, quadrature, update_values | update_gradients)
82 , fe_face_values_ht(mapping,
83 fe_ht,
84 face_quadrature,
85 update_values | update_quadrature_points |
86 update_JxW_values)
87 {
88 // Check if value is positive.
89 AssertThrow(delta_T_ref > 0,
90 ExcMessage("Reference temperature is invalid (< 0)."));
91
92 gather_cls = false;
94
95 allocate();
96 }
97
98 /**
99 * @brief Copy Constructor. Same as the main constructor.
100 * This constructor only uses the other scratch to build the FeValues, it
101 * does not copy the content of the other scratch into itself since, by
102 * definition of the WorkStream mechanism, it is assumed that the content of
103 * the scratch will be reset on a cell basis.
104 *
105 * @param sd The scratch data
106 */
109 , fe_values_T(sd.fe_values_T.get_mapping(),
110 sd.fe_values_T.get_fe(),
111 sd.fe_values_T.get_quadrature(),
112 update_values | update_quadrature_points | update_JxW_values |
113 update_gradients | update_hessians)
115 , velocities(0)
116 , pressure(dim)
117 , fe_values_fd(sd.fe_values_fd.get_mapping(),
118 sd.fe_values_fd.get_fe(),
119 sd.fe_values_fd.get_quadrature(),
120 update_values | update_gradients)
121 , fe_face_values_ht(sd.fe_face_values_ht.get_mapping(),
122 sd.fe_face_values_ht.get_fe(),
123 sd.fe_face_values_ht.get_quadrature(),
124 update_values | update_quadrature_points |
125 update_JxW_values)
126 {
127 // Check if value is positive.
128 AssertThrow(sd.global_delta_T_ref > 0,
129 ExcMessage("Reference temperature is invalid (< 0)."));
130
133 allocate();
134 if (gather_cls)
135 enable_cls(sd.fe_values_cls->get_fe(),
136 sd.fe_values_cls->get_quadrature(),
137 sd.fe_values_cls->get_mapping(),
138 sd.filter);
139
143 sd.fe_values_time_harmonic_maxwell->get_quadrature(),
144 sd.fe_values_time_harmonic_maxwell->get_mapping());
145 }
146
147 /** @brief Allocates the memory for the scratch
148 *
149 * This method allocates the necessary memory for all members of the scratch
150 *
151 */
152 void
153 allocate() override;
154
155 /** @brief Reinitializes the content of the scratch.
156 *
157 * Using the FeValues and the content of the solutions, previous solutions,
158 * fills all of the class member of the scratch.
159 *
160 * @tparam VectorType The Vector type used for the solvers.
161 *
162 * @param[in] cell The cell over which the assembly is being carried.
163 * This cell must be compatible with the FE which is used to fill the
164 * FeValues.
165 *
166 * @param[in] current_solution The present value of the solution for the Heat
167 * Transfer.
168 *
169 * @param[in] previous_solutions The solutions at the previous time steps.
170 *
171 * @param[in] source_function The function describing the Heat Transfer source
172 * term.
173 */
174
175 template <typename VectorType>
176 void
177 reinit(const typename DoFHandler<dim>::active_cell_iterator &cell,
178 const VectorType &current_solution,
179 const std::vector<GlobalVectorType> &previous_solutions,
180 Function<dim> *source_function)
181 {
182 material_id = cell->material_id();
183 this->fe_values_T.reinit(cell);
184
185 quadrature_points = this->fe_values_T.get_quadrature_points();
186 auto &fe_T = this->fe_values_T.get_fe();
187
188 source_function->value_list(quadrature_points, source);
189
190 // Compute cell diameter
191 double cell_measure =
192 compute_cell_measure_with_JxW(this->fe_values_T.get_JxW_values());
193 this->cell_size = compute_cell_diameter<dim>(cell_measure, fe_T.degree);
194
195 // Gather temperature (values, gradient and laplacian)
196 this->fe_values_T.get_function_values(current_solution,
198 this->fe_values_T.get_function_gradients(current_solution,
200 this->fe_values_T.get_function_laplacians(
201 current_solution, this->present_temperature_laplacians);
202
203 // Gather previous temperature values
204 for (unsigned int p = 0; p < previous_solutions.size(); ++p)
205 {
206 this->fe_values_T.get_function_values(previous_solutions[p],
208
209 this->fe_values_T.get_function_gradients(
210 previous_solutions[p], previous_temperature_gradients[p]);
211 }
212
213 for (unsigned int q = 0; q < n_q_points; ++q)
214 {
215 this->JxW[q] = this->fe_values_T.JxW(q);
216
217 for (unsigned int k = 0; k < n_dofs; ++k)
218 {
219 // Shape function
220 this->phi_T[q][k] = this->fe_values_T.shape_value(k, q);
221 this->grad_phi_T[q][k] = this->fe_values_T.shape_grad(k, q);
222 this->hess_phi_T[q][k] = this->fe_values_T.shape_hessian(k, q);
223 this->laplacian_phi_T[q][k] = trace(this->hess_phi_T[q][k]);
224 }
225 }
226
227 // Arrays related to faces must be re-initialized for each cell, since they
228 // might depend on reference cell
229 // Only carry out this initialization if the cell is a boundary cell,
230 // otherwise these are wasted calculations
231 this->is_boundary_cell = cell->at_boundary();
232 if (cell->at_boundary())
233 {
234 n_faces = cell->n_faces();
235 is_boundary_face = std::vector<bool>(n_faces, false);
236 n_faces_q_points = fe_face_values_ht.get_quadrature().size();
237 boundary_face_id = std::vector<unsigned int>(n_faces);
238
239 face_JxW.reinit(TableIndices<2>(n_faces, n_faces_q_points));
240
241 this->phi_face_T.reinit(
242 TableIndices<3>(n_faces, n_faces_q_points, n_dofs));
243
244 this->temperature_face_value = std::vector<std::vector<double>>(
245 n_faces, std::vector<double>(n_faces_q_points));
246
247 for (const auto face : cell->face_indices())
248 {
249 this->is_boundary_face[face] = cell->face(face)->at_boundary();
250 if (this->is_boundary_face[face])
251 {
252 fe_face_values_ht.reinit(cell, face);
253 boundary_face_id[face] = cell->face(face)->boundary_id();
254 this->fe_face_values_ht.get_function_values(
255 current_solution, this->temperature_face_value[face]);
256
257 for (unsigned int q = 0; q < n_faces_q_points; ++q)
258 {
259 face_JxW[face][q] = fe_face_values_ht.JxW(q);
260 for (const unsigned int k : fe_face_values_ht.dof_indices())
261 {
262 this->phi_face_T[face][q][k] =
263 this->fe_face_values_ht.shape_value(k, q);
264 }
265 }
266 }
267 }
268 }
269 }
270
271 /**
272 * @brief Reinitialize cell's velocity and pressure values with values
273 * calculated in the Fluid Dynamics (FD) physic while also taking into account
274 * ALE for the velocity.
275 *
276 * @tparam VectorType Type of vector used for storing fluid dynamics
277 * solutions.
278 *
279 * @param[in] cell Pointer to an active cell for which the velocity and
280 * pressure are reinitialized.This cell must be compatible with the FD
281 * FiniteElement.
282 *
283 * @param[in] current_solution Solution vector from FD containing velocity
284 * components and pressure values.
285 *
286 * @param[in] ale The ALE parameters which include the ALE function
287 *
288 */
289
290 template <typename VectorType>
291 void
293 const typename DoFHandler<dim>::active_cell_iterator &cell,
294 const VectorType &current_solution,
295 const Parameters::ALE<dim> &ale)
296 {
297 this->fe_values_fd.reinit(cell);
298
299 this->fe_values_fd[velocities].get_function_values(current_solution,
301 if (!this->properties_manager.density_is_constant())
302 this->fe_values_fd[pressure].get_function_values(current_solution,
304
305 if (!ale.enabled())
306 return;
307
308 // ALE enabled, so extract the ALE velocity and subtract it from the
309 // velocity obtained from the fluid dynamics
310 Tensor<1, dim> velocity_ale;
311 std::shared_ptr<Functions::ParsedFunction<dim>> velocity_ale_function =
312 ale.velocity;
313 Vector<double> velocity_ale_vector(dim);
314
315 for (unsigned int q = 0; q < n_q_points; ++q)
316 {
317 velocity_ale_function->vector_value(quadrature_points[q],
318 velocity_ale_vector);
319 for (int d = 0; d < dim; ++d)
320 velocity_ale[d] = velocity_ale_vector[d];
321
322 velocity_values[q] -= velocity_ale;
323 }
324 }
325
326 /** @brief Reinitialize the velocity gradient, calculated by the Fluid Dynamics
327 *
328 * @tparam VectorType The Vector type used for the solvers
329 *
330 * @param current_solution The present value of the solution for [u,p]
331 *
332 */
333
334 template <typename VectorType>
335 void
336 reinit_velocity_gradient(const VectorType &current_solution)
337 {
338 this->fe_values_fd[velocities].get_function_gradients(
339 current_solution, velocity_gradient_values);
340 }
341
342 /**
343 * @brief enable_cls Enables the collection of the CLS data by the scratch.
344 *
345 * @param fe FiniteElement associated with the CLS.
346 *
347 * @param quadrature Quadrature rule of the Navier-Stokes problem assembly.
348 *
349 * @param mapping Mapping used for the Navier-Stokes problem assembly
350 *
351 * @param phase_filter_parameters Parameters for phase indicator filtering.
352 */
353
354 void
355 enable_cls(const FiniteElement<dim> &fe,
356 const Quadrature<dim> &quadrature,
357 const Mapping<dim> &mapping,
358 const Parameters::CLS_PhaseFilter &phase_filter_parameters);
359
360 /**
361 * @brief enable_cls Enables the collection of the CLS data by the scratch - function overload used in the copy constructor of HeatTransferScratchData
362 *
363 * @param fe FiniteElement associated with the CLS.
364 *
365 * @param quadrature Quadrature rule of the Navier-Stokes problem assembly
366 *
367 * @param mapping Mapping used for the Navier-Stokes problem assembly
368 *
369 * @param filter Filter that is applied on the phase indicator
370 */
371
372 void
373 enable_cls(const FiniteElement<dim> &fe,
374 const Quadrature<dim> &quadrature,
375 const Mapping<dim> &mapping,
376 const std::shared_ptr<ConservativeLevelSetFilterBase> &filter);
377
378 /** @brief Reinitialize the content of the scratch for CLS.
379 *
380 * @tparam VectorType The Vector type used for the solvers
381 *
382 * @param cell The cell over which the assembly is being carried.
383 * This cell must be compatible with the CLS FE and not the
384 * Fluid Dynamics FE
385 *
386 * @param current_solution The present solution for the phase value
387 *
388 * NB: the previous_solutions are not used in heat_transfer_assemblers,
389 * contrary to navier_stokes_assemblers
390 */
391
392 template <typename VectorType>
393 void
394 reinit_cls(const typename DoFHandler<dim>::active_cell_iterator &cell,
395 const VectorType &current_solution,
396 const VectorType &current_filtered_solution)
397 {
398 this->fe_values_cls->reinit(cell);
399 // Gather phase indicator (values, gradient)
400 this->fe_values_cls->get_function_values(current_filtered_solution,
402 this->fe_values_cls->get_function_gradients(
403 current_filtered_solution, this->filtered_phase_gradient_values);
404
405 this->fe_values_cls->get_function_gradients(current_solution,
407 }
408
409 /**
410 * @brief enable_time_harmonic_maxwell Enables the collection of the
411 * time-harmonic Maxwell data by the scratch - function overload used in the
412 * copy constructor of HeatTransferScratchData
413 *
414 * @param fe FiniteElement associated with the time-harmonic Maxwell problem.
415 *
416 * @param quadrature Quadrature rule of the time-harmonic Maxwell problem
417 * assembly
418 *
419 * @param mapping Mapping used for the time-harmonic Maxwell problem assembly
420 */
421
422 void
423 enable_time_harmonic_maxwell(const FiniteElement<dim> &fe,
424 const Quadrature<dim> &quadrature,
425 const Mapping<dim> &mapping);
426
427 /** @brief Reinitialize the content of the scratch for the time-harmonic
428 * Maxwell problem.
429 *
430 * @tparam VectorType The Vector type used for the solvers
431 *
432 * @param cell The cell over which the assembly is being carried.
433 * This cell must be compatible with the time-harmonic Maxwell FE and not the
434 * Fluid Dynamics FE
435 *
436 * @param current_solution The present solution for the electromagnetic field
437 * values
438 */
439
440 template <typename VectorType>
441 void
443 const typename DoFHandler<dim>::active_cell_iterator &cell,
444 const VectorType &current_solution)
445 {
446 this->fe_values_time_harmonic_maxwell->reinit(cell);
448 .get_function_values(current_solution, this->electric_field_real_values);
450 .get_function_values(current_solution, this->electric_field_imag_values);
452 .get_function_values(current_solution, this->magnetic_field_real_values);
454 .get_function_values(current_solution, this->magnetic_field_imag_values);
455 }
456
457 /** @brief Calculates the physical properties. This method calculates the
458 * physical properties that may be required by the heat transfer problem.
459 * Namely the density, specific heat, thermal conductivity and viscosity (for
460 * viscous dissipation).
461 *
462 */
463 void
465
466
467 // Physical properties
469 std::map<field, std::vector<double>> fields;
470 dealii::types::material_id material_id;
471 std::vector<double> specific_heat;
472 std::vector<double> thermal_conductivity;
473 std::vector<double> density;
474 std::vector<double> dynamic_viscosity;
475 // Gradient of the specific heat with respect to the temperature
476 // This is calculated by deriving the specific heat by the temperature
477 // (dCp/dT)
479
480 // Auxiliary property vector for CLS simulations
481 std::vector<double> specific_heat_0;
482 std::vector<double> thermal_conductivity_0;
483 std::vector<double> density_0;
484 std::vector<double> dynamic_viscosity_0;
486
487 std::vector<double> specific_heat_1;
488 std::vector<double> thermal_conductivity_1;
489 std::vector<double> density_1;
490 std::vector<double> dynamic_viscosity_1;
492
493 // Physical properties for time-harmonic Maxwell's equations. Note that only
494 // the imaginary part of the electric permittivity and magnetic permeability
495 // are responsible for the heat generation, so only these are stored here (and
496 // conductivity is always real).
497 std::vector<double> electric_conductivity;
498 std::vector<double> magnetic_permeability_imag;
499 std::vector<double> electric_permittivity_imag;
500
501 // FEValues for the HT problem
502 FEValues<dim> fe_values_T;
503 unsigned int n_dofs;
504 unsigned int n_q_points;
505 double cell_size;
506
507
508 // Quadrature
509 Table<1, double> JxW;
510 std::vector<Point<dim>> quadrature_points;
511
512 // Temperature values
513 std::vector<double> present_temperature_values;
514 std::vector<Tensor<1, dim>> temperature_gradients;
517 std::vector<std::vector<double>> previous_temperature_values;
518 std::vector<std::vector<Tensor<1, dim>>> previous_temperature_gradients;
520
521 // Shape functions and gradients
522 Table<2, double> phi_T;
523 Table<2, Tensor<1, dim>> grad_phi_T;
524 Table<2, Tensor<2, dim>> hess_phi_T;
525 Table<2, double> laplacian_phi_T;
526
527 // Source term
528 std::vector<double> source;
529
530 /**
531 * Scratch component for the CLS auxiliary physics
532 */
534 unsigned int n_dofs_cls;
535 std::vector<double> filtered_phase_values;
536 std::vector<Tensor<1, dim>> filtered_phase_gradient_values;
537 std::vector<Tensor<1, dim>> phase_gradient_values;
538
539 // This is stored as a shared_ptr because it is only instantiated when needed
540 std::shared_ptr<FEValues<dim>> fe_values_cls;
541 std::shared_ptr<ConservativeLevelSetFilterBase>
542 filter; // Phase indicator filter
543
544 /**
545 * Scratch component for the time-harmonic Maxwell auxiliary physics
546 */
548 FEValuesExtractors::Vector extractor_E_real;
549 FEValuesExtractors::Vector extractor_E_imag;
550 FEValuesExtractors::Vector extractor_H_real;
551 FEValuesExtractors::Vector extractor_H_imag;
552 std::vector<Tensor<1, dim>> electric_field_real_values;
553 std::vector<Tensor<1, dim>> electric_field_imag_values;
554 std::vector<Tensor<1, dim>> magnetic_field_real_values;
555 std::vector<Tensor<1, dim>> magnetic_field_imag_values;
556
557 // Stored as shared_ptr because only instantiated when EM is active
558 std::shared_ptr<FEValues<dim>> fe_values_time_harmonic_maxwell;
559
560 /**
561 * Scratch component for the Navier-Stokes components
562 */
563 const FEValuesExtractors::Vector velocities;
564 const FEValuesExtractors::Scalar pressure;
565 // This FEValues must be instantiated for the velocity
566 FEValues<dim> fe_values_fd;
567 std::vector<Tensor<1, dim>> velocity_values;
568 std::vector<Tensor<2, dim>> velocity_gradient_values;
569 std::vector<double> shear_rate_values;
570 /// Pressure field for physical property models requiring them
571 std::vector<double> pressure_values;
572
573 // Scratch for the face boundary condition
574 FEFaceValues<dim> fe_face_values_ht;
575 Table<2, double> face_JxW;
576
577 unsigned int n_faces;
578 unsigned int n_faces_q_points;
579
580 // Is boundary cell indicator
582 std::vector<bool> is_boundary_face;
583 std::vector<unsigned int> boundary_face_id;
584
585
586 // First is face number, second quadrature point, third DOF
587 Table<3, double> phi_face_T;
588 // First vector is face number, second quadrature point
589 std::vector<std::vector<double>> temperature_face_value;
590};
591
592#endif
std::vector< double > filtered_phase_values
const FEValuesExtractors::Scalar pressure
std::vector< double > thermal_conductivity_1
std::vector< Tensor< 1, dim > > electric_field_real_values
std::vector< Tensor< 1, dim > > temperature_gradients
void reinit_cls(const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType &current_solution, const VectorType &current_filtered_solution)
Reinitialize the content of the scratch for CLS.
std::vector< double > grad_specific_heat_temperature_0
FEValuesExtractors::Vector extractor_H_imag
std::vector< Tensor< 2, dim > > velocity_gradient_values
std::vector< unsigned int > boundary_face_id
std::vector< double > grad_specific_heat_temperature
std::shared_ptr< ConservativeLevelSetFilterBase > filter
std::map< field, std::vector< double > > fields
std::vector< double > grad_specific_heat_temperature_1
void reinit_fluid_dynamics(const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType &current_solution, const Parameters::ALE< dim > &ale)
Reinitialize cell's velocity and pressure values with values calculated in the Fluid Dynamics (FD) ph...
FEValuesExtractors::Vector extractor_E_imag
void enable_cls(const FiniteElement< dim > &fe, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping, const Parameters::CLS_PhaseFilter &phase_filter_parameters)
enable_cls Enables the collection of the CLS data by the scratch.
std::vector< Tensor< 1, dim > > magnetic_field_real_values
void calculate_physical_properties()
Calculates the physical properties. This method calculates the physical properties that may be requir...
std::vector< double > pressure_values
Pressure field for physical property models requiring them.
std::vector< double > electric_conductivity
std::vector< double > thermal_conductivity_0
std::vector< double > dynamic_viscosity_0
std::vector< double > present_temperature_values
std::vector< std::vector< double > > temperature_face_value
std::vector< double > shear_rate_values
std::vector< double > dynamic_viscosity
void enable_time_harmonic_maxwell(const FiniteElement< dim > &fe, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping)
enable_time_harmonic_maxwell Enables the collection of the time-harmonic Maxwell data by the scratch ...
std::vector< Tensor< 1, dim > > filtered_phase_gradient_values
std::vector< Tensor< 1, dim > > electric_field_imag_values
PhysicalPropertiesManager properties_manager
HeatTransferScratchData(const PhysicalPropertiesManager &properties_manager, const FiniteElement< dim > &fe_ht, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping, const FiniteElement< dim > &fe_fd, const Quadrature< dim - 1 > &face_quadrature, const double delta_T_ref)
Constructor. The constructor creates the fe_values that will be used to fill the member variables of ...
Table< 2, Tensor< 2, dim > > hess_phi_T
dealii::types::material_id material_id
std::vector< double > present_temperature_laplacians
std::vector< double > specific_heat_1
HeatTransferScratchData(const HeatTransferScratchData< dim > &sd)
Copy Constructor. Same as the main constructor. This constructor only uses the other scratch to build...
FEValuesExtractors::Vector extractor_H_real
const FEValuesExtractors::Vector velocities
std::vector< Tensor< 1, dim > > phase_gradient_values
void reinit_velocity_gradient(const VectorType &current_solution)
Reinitialize the velocity gradient, calculated by the Fluid Dynamics.
void reinit_time_harmonic_maxwell(const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType &current_solution)
Reinitialize the content of the scratch for the time-harmonic Maxwell problem.
std::vector< double > electric_permittivity_imag
std::vector< double > dynamic_viscosity_1
Table< 2, Tensor< 1, dim > > grad_phi_T
std::vector< double > thermal_conductivity
std::shared_ptr< FEValues< dim > > fe_values_cls
std::vector< Tensor< 1, dim > > velocity_values
std::shared_ptr< FEValues< dim > > fe_values_time_harmonic_maxwell
FEValuesExtractors::Vector extractor_E_real
std::vector< Tensor< 1, dim > > magnetic_field_imag_values
std::vector< double > specific_heat_0
std::vector< double > present_face_temperature_values
std::vector< std::vector< Tensor< 1, dim > > > previous_temperature_gradients
std::vector< double > magnetic_permeability_imag
void reinit(const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType &current_solution, const std::vector< GlobalVectorType > &previous_solutions, Function< dim > *source_function)
Reinitializes the content of the scratch.
void allocate() override
Allocates the memory for the scratch.
std::vector< Point< dim > > quadrature_points
std::vector< std::vector< double > > previous_temperature_values
An interface for all the common parameters required to consider a moving frame of reference in a simp...
Definition ale.h:25
bool enabled() const
Return if the ALE module is enabled.
Definition ale.h:64
std::shared_ptr< Functions::ParsedFunction< dim > > velocity
ALE velocity function.
Definition ale.h:56
Class that manages the physical properties model which are required to calculate the various physical...
Base class for scratch data objects of physics and subequations.
double compute_cell_measure_with_JxW(const std::vector< double > &JxW_values)
Computes the area (2D) or volume (3D) of the cell by integrating 1 over the cell, by summing JxW valu...
Definition utilities.h:1017
double compute_cell_diameter(const double cell_measure, const unsigned int fe_degree)
Computes equivalent cell diameter by comparing the area to a disk (2D) or the volume to a sphere (3D)...
Definition utilities.h:989
Parameters for the phase filtration.
GlobalVectorType VectorType