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