ExaDG
Toggle main menu visibility
Loading...
Searching...
No Matches
include
exadg
grid
mapping_deformation_base.h
1
/* ______________________________________________________________________
2
*
3
* ExaDG - High-Order Discontinuous Galerkin for the Exa-Scale
4
*
5
* Copyright (C) 2021 by the ExaDG authors
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19
* ______________________________________________________________________
20
*/
21
22
#ifndef EXADG_GRID_MAPPING_DEFORMATION_BASE_H_
23
#define EXADG_GRID_MAPPING_DEFORMATION_BASE_H_
24
25
// deal.II
26
#include <deal.II/dofs/dof_handler.h>
27
#include <deal.II/fe/mapping.h>
28
#include <deal.II/lac/la_parallel_vector.h>
29
30
// ExaDG
31
#include <exadg/grid/mapping_dof_vector.h>
32
#include <exadg/utilities/numbers.h>
33
34
namespace
ExaDG
35
{
47
template
<
int
dim,
typename
Number>
48
class
DeformedMappingBase
:
public
MappingDoFVector
<dim, Number>
49
{
50
public
:
51
typedef
dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
52
60
DeformedMappingBase
(std::shared_ptr<dealii::Mapping<dim>
const
>
mapping_undeformed
,
61
unsigned
int
const
mapping_degree_deformed,
62
dealii::Triangulation<dim>
const
& triangulation)
63
:
MappingDoFVector
<dim, Number>(mapping_degree_deformed),
mapping_undeformed
(
mapping_undeformed
)
64
{
65
// Make sure that dealii::MappingQCache is initialized correctly. We use an empty
66
// dof-vector so that no displacements are added to the reference configuration
67
// described by mapping_undeformed.
68
dealii::DoFHandler<dim> dof_handler(triangulation);
69
VectorType displacement_vector;
70
this->
initialize_mapping_from_dof_vector
(
mapping_undeformed
, displacement_vector, dof_handler);
71
}
72
76
virtual
~DeformedMappingBase
()
77
{
78
}
79
87
virtual
void
88
update
(
double
const
time,
bool
const
print_solver_info, types::time_step time_step_number) = 0;
89
96
virtual
void
97
print_iterations
()
const
98
{
99
AssertThrow(
false
, dealii::ExcMessage(
"Has to be overwritten by derived classes."
));
100
}
101
102
protected
:
106
std::shared_ptr<dealii::Mapping<dim>
const
>
mapping_undeformed
;
107
};
108
109
}
// namespace ExaDG
110
111
#endif
/* EXADG_GRID_MAPPING_DEFORMATION_BASE_H_ */
ExaDG::DeformedMappingBase::mapping_undeformed
std::shared_ptr< dealii::Mapping< dim > const > mapping_undeformed
Definition
mapping_deformation_base.h:106
ExaDG::DeformedMappingBase::~DeformedMappingBase
virtual ~DeformedMappingBase()
Definition
mapping_deformation_base.h:76
ExaDG::DeformedMappingBase::print_iterations
virtual void print_iterations() const
Definition
mapping_deformation_base.h:97
ExaDG::DeformedMappingBase::DeformedMappingBase
DeformedMappingBase(std::shared_ptr< dealii::Mapping< dim > const > mapping_undeformed, unsigned int const mapping_degree_deformed, dealii::Triangulation< dim > const &triangulation)
Definition
mapping_deformation_base.h:60
ExaDG::DeformedMappingBase::update
virtual void update(double const time, bool const print_solver_info, types::time_step time_step_number)=0
ExaDG::MappingDoFVector::MappingDoFVector
MappingDoFVector(unsigned int const mapping_degree)
Definition
mapping_dof_vector.h:62
ExaDG::MappingDoFVector::initialize_mapping_from_dof_vector
void initialize_mapping_from_dof_vector(std::shared_ptr< dealii::Mapping< dim > const > mapping, VectorType const &displacement_vector, dealii::DoFHandler< dim > const &dof_handler)
Definition
mapping_dof_vector.h:213
ExaDG
Definition
driver.cpp:33
Generated by
1.17.0