ExaDG
Loading...
Searching...
No Matches
elasticity_operator_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 INCLUDE_EXADG_STRUCTURE_SPATIAL_DISCRETIZATION_OPERATORS_ELASTICITY_OPERATOR_BASE_H_
23#define INCLUDE_EXADG_STRUCTURE_SPATIAL_DISCRETIZATION_OPERATORS_ELASTICITY_OPERATOR_BASE_H_
24
25#include <exadg/operators/operator_base.h>
26#include <exadg/structure/material/material_handler.h>
27#include <exadg/structure/user_interface/boundary_descriptor.h>
28#include <exadg/structure/user_interface/material_descriptor.h>
29
30namespace ExaDG
31{
32namespace Structure
33{
34template<int dim>
36{
39 large_deformation(false),
40 pull_back_traction(false),
41 unsteady(false),
42 density(1.0),
43 quad_index_gauss_lobatto(0)
44 {
45 }
46
47 std::shared_ptr<BoundaryDescriptor<dim> const> bc;
48 std::shared_ptr<MaterialDescriptor const> material_descriptor;
49
50 // Boolean parameter differentiating between linear elasticity and finite strain theory
51 bool large_deformation;
52
53 // This parameter is only relevant for nonlinear operator
54 // with large deformations. When set to true, the traction t
55 // is pulled back to the reference configuration, t_0 = da/dA t.
56 bool pull_back_traction;
57
58 // activates mass operator in operator evaluation for unsteady problems
59 bool unsteady;
60
61 // density
62 double density;
63
64 // for DirichletCached boundary conditions, another quadrature rule
65 // is needed to set the constrained DoFs.
66 unsigned int quad_index_gauss_lobatto;
67};
68
69template<int dim, typename Number>
70class ElasticityOperatorBase : public OperatorBase<dim, Number, dim>
71{
72public:
73 typedef Number value_type;
74
75protected:
77 typedef typename Base::IntegratorCell IntegratorCell;
78 typedef typename Base::VectorType VectorType;
79 typedef typename Base::IntegratorFace IntegratorFace;
80
81public:
83
85 {
86 }
87
89 get_integrator_flags(bool const unsteady) const;
90
91 static MappingFlags
92 get_mapping_flags();
93
94 virtual void
95 initialize(dealii::MatrixFree<dim, Number> const & matrix_free,
96 dealii::AffineConstraints<Number> const & affine_constraints,
97 OperatorData<dim> const & data);
98
99 OperatorData<dim> const &
100 get_data() const;
101
102 void
103 set_scaling_factor_mass_operator(double const scaling_factor) const;
104
105 double
106 get_scaling_factor_mass_operator() const;
107
108 void
109 set_inhomogeneous_boundary_values(VectorType & dst) const final;
110
111protected:
112 void
113 reinit_cell_derived(IntegratorCell & integrator, unsigned int const cell) const override;
114
115 OperatorData<dim> operator_data;
116
117 mutable MaterialHandler<dim, Number> material_handler;
118
119 mutable double scaling_factor_mass;
120};
121
122} // namespace Structure
123} // namespace ExaDG
124
125
126#endif /* INCLUDE_EXADG_STRUCTURE_SPATIAL_DISCRETIZATION_OPERATORS_ELASTICITY_OPERATOR_BASE_H_ */
Definition operator_base.h:98
Definition elasticity_operator_base.h:71
Definition material_handler.h:39
Definition driver.cpp:33
Definition integrator_flags.h:30
Definition mapping_flags.h:31
Definition operator_base.h:59
Definition elasticity_operator_base.h:36