[P]arallel [Hi]gh-order [Li]brary for [P]DEs
Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
|
#include <meshmover_linear_elasticity.hpp>
Public Member Functions | |
LinearElasticity (const Triangulation &_triangulation, const std::shared_ptr< dealii::MappingFEField< dim, dim, VectorType, DoFHandlerType >> mapping_fe_field, const DoFHandlerType &_dof_handler, const dealii::LinearAlgebra::distributed::Vector< int > &_boundary_ids_vector, const dealii::LinearAlgebra::distributed::Vector< double > &_boundary_displacements_vector) | |
Constructor. | |
LinearElasticity (const HighOrderGrid< dim, real > &high_order_grid, const dealii::LinearAlgebra::distributed::Vector< double > &boundary_displacements_vector) | |
Constructor that uses information from HighOrderGrid and uses current volume_nodes from HighOrderGrid. | |
VectorType | get_volume_displacements () |
void | evaluate_dXvdXs () |
void | apply_dXvdXvs (std::vector< dealii::LinearAlgebra::distributed::Vector< double >> &list_of_vectors, dealii::TrilinosWrappers::SparseMatrix &output_matrix) |
void | apply_dXvdXvs (const dealii::LinearAlgebra::distributed::Vector< double > &input_vector, dealii::LinearAlgebra::distributed::Vector< double > &output_vector) |
void | apply_dXvdXvs_transpose (const dealii::LinearAlgebra::distributed::Vector< double > &input_vector, dealii::LinearAlgebra::distributed::Vector< double > &output_vector) |
Public Attributes | |
VectorType | displacement_solution |
dealii::AffineConstraints< double > | hanging_node_constraints |
std::vector< dealii::LinearAlgebra::distributed::Vector< double > > | dXvdXs |
Private Types | |
using | VectorType = dealii::LinearAlgebra::distributed::Vector< real > |
Distributed vector of double. | |
using | DoFHandlerType = dealii::DoFHandler< dim > |
DoFHandler. | |
using | Triangulation = dealii::parallel::distributed::Triangulation< dim > |
Private Member Functions | |
void | setup_system () |
Allocation and boundary condition setup. More... | |
void | assemble_system () |
Assemble the system and its right-hand side. | |
void | solve_timestep () |
unsigned int | solve_linear_problem () |
dealii::LinearAlgebra::distributed::Vector< double > | tensor_to_vector (const std::vector< dealii::Tensor< 1, dim, real >> &boundary_displacements_tensors) const |
Private Attributes | |
const Triangulation & | triangulation |
const std::shared_ptr< dealii::MappingFEField< dim, dim, VectorType, DoFHandlerType > > | mapping_fe_field |
MappingFEField corresponding to curved mesh. | |
const DoFHandlerType & | dof_handler |
Same DoFHandler as the HighOrderGrid. | |
const dealii::QGauss< dim > | quadrature_formula |
Integration strength of the mesh order plus one. | |
dealii::TrilinosWrappers::SparseMatrix | system_matrix_unconstrained |
dealii::LinearAlgebra::distributed::Vector< double > | system_rhs_unconstrained |
dealii::TrilinosWrappers::SparseMatrix | system_matrix |
System matrix corresponding to linearized elasticity problem. | |
dealii::LinearAlgebra::distributed::Vector< double > | system_rhs |
dealii::AffineConstraints< double > | all_constraints |
dealii::AffineConstraints< double > | dirichlet_boundary_constraints |
MPI_Comm | mpi_communicator |
MPI communicator. | |
const unsigned int | n_mpi_processes |
Number of MPI processes. | |
const unsigned int | this_mpi_process |
MPI rank. | |
dealii::ConditionalOStream | pcout |
ConditionalOStream for output. | |
std::vector< dealii::types::global_dof_index > | local_dofs_per_process |
List of number of DoFs per process. | |
dealii::IndexSet | locally_owned_dofs |
Locally owned DoFs. | |
dealii::IndexSet | locally_relevant_dofs |
Locally relevant DoFs. | |
const dealii::LinearAlgebra::distributed::Vector< int > & | boundary_ids_vector |
const dealii::LinearAlgebra::distributed::Vector< double > & | boundary_displacements_vector |
Linear elasticity mesh movement based on the deal.II example step-8 and step-42.
Definition at line 17 of file meshmover_linear_elasticity.hpp.
|
private |
Triangulation to store the grid. In 1D, dealii::Triangulation<dim> is used. In 2D, 3D, dealii::parallel::distributed::Triangulation<dim> is used.
Definition at line 34 of file meshmover_linear_elasticity.hpp.
void PHiLiP::MeshMover::LinearElasticity< dim, real >::apply_dXvdXvs | ( | std::vector< dealii::LinearAlgebra::distributed::Vector< double >> & | list_of_vectors, |
dealii::TrilinosWrappers::SparseMatrix & | output_matrix | ||
) |
Apply the analytical derivatives of volume displacements with respect to surface displacements onto a set of various right-hand sides. Note that the right-hand-side is of size n_volume_nodes. If the right-hand-side are the surface node displacements indexed in a volume node vector, the result is a displacement vector of the volume volume_nodes (which include the prescribed surface nodes).
Definition at line 445 of file meshmover_linear_elasticity.cpp.
void PHiLiP::MeshMover::LinearElasticity< dim, real >::apply_dXvdXvs | ( | const dealii::LinearAlgebra::distributed::Vector< double > & | input_vector, |
dealii::LinearAlgebra::distributed::Vector< double > & | output_vector | ||
) |
Apply the analytical derivatives of volume displacements with respect to surface displacements onto a set of various right-hand sides. Note that the right-hand-side is of size n_volume_nodes. If the right-hand-side are the surface node displacements indexed in a volume node vector, the result is a displacement vector of the volume volume_nodes (which include the prescribed surface nodes).
Definition at line 361 of file meshmover_linear_elasticity.cpp.
void PHiLiP::MeshMover::LinearElasticity< dim, real >::apply_dXvdXvs_transpose | ( | const dealii::LinearAlgebra::distributed::Vector< double > & | input_vector, |
dealii::LinearAlgebra::distributed::Vector< double > & | output_vector | ||
) |
Apply the transposed analytical derivatives of volume displacements with respect to surface displacements onto a right-hand sides. Note that the right-hand side and solution is of size n_volume_nodes. If the right-hand-side are the surface node displacements indexed in a volume node vector, the result is a displacement vector of the volume volume_nodes (which include the prescribed surface nodes).
Definition at line 559 of file meshmover_linear_elasticity.cpp.
void PHiLiP::MeshMover::LinearElasticity< dim, real >::evaluate_dXvdXs | ( | ) |
Evaluates the analytical derivatives of volume displacements with respect to surface displacements.
Definition at line 881 of file meshmover_linear_elasticity.cpp.
dealii::LinearAlgebra::distributed::Vector< real > PHiLiP::MeshMover::LinearElasticity< dim, real >::get_volume_displacements | ( | ) |
Evaluate and return volume displacements given boundary displacements.
Definition at line 99 of file meshmover_linear_elasticity.cpp.
|
private |
Allocation and boundary condition setup.
Sparse matrix containing the dXvdXs sensititivies.
Definition at line 109 of file meshmover_linear_elasticity.cpp.
|
private |
Linear solver for the mesh mover. Currently uses CG with a Jacobi preconditioner.
|
private |
Solve the current time step. Currently only 1 time step since it is a linear mesh mover. However, future changes will allow this to be done iteratively to obtain a nonlinear mesh mover.
Definition at line 350 of file meshmover_linear_elasticity.cpp.
|
private |
Transforms a std::vector<Tensor> into the corresponding distributed vector.
Definition at line 87 of file meshmover_linear_elasticity.cpp.
|
private |
AffineConstraints containing boundary and hanging node constraints.
Definition at line 156 of file meshmover_linear_elasticity.hpp.
|
private |
Displacement of boundary volume_nodes corresponding to boundary_ids_vector.
Definition at line 175 of file meshmover_linear_elasticity.hpp.
|
private |
Global index of boundary volume_nodes that need to be constrained. Note that typically all surface boundaries "need" to be constrained.
Definition at line 172 of file meshmover_linear_elasticity.hpp.
|
private |
AffineConstraints containing Dirichlet boundary conditions.
Definition at line 159 of file meshmover_linear_elasticity.hpp.
VectorType PHiLiP::MeshMover::LinearElasticity< dim, real >::displacement_solution |
Current displacement solution
Definition at line 93 of file meshmover_linear_elasticity.hpp.
std::vector<dealii::LinearAlgebra::distributed::Vector<double> > PHiLiP::MeshMover::LinearElasticity< dim, real >::dXvdXs |
Vector of vectors containing the dXvdXs sensititivies. The outer vector represents the current surface index, while the inner vectors is the size of the volume mesh. Those sensitivities are distributed among the processors the same way the volume mesh volume_nodes are distributed among the processors.
Definition at line 104 of file meshmover_linear_elasticity.hpp.
dealii::AffineConstraints<double> PHiLiP::MeshMover::LinearElasticity< dim, real >::hanging_node_constraints |
Hanging node constraints
Definition at line 96 of file meshmover_linear_elasticity.hpp.
|
private |
System matrix corresponding to the unconstrained linearized elasticity problem.
Definition at line 139 of file meshmover_linear_elasticity.hpp.
|
private |
System right-hand side corresponding to linearized elasticity problem. Note that no body forces are present and the right-hand side is therefore zero. However, Dirichlet boundary conditions may make some RHS entries non-zero, depending on the method used to impose them.
Definition at line 152 of file meshmover_linear_elasticity.hpp.
|
private |
System right-hand side corresponding to the unconstrained linearized elasticity problem. Note that no body forces are present and the right-hand side is therefore zero.
Definition at line 143 of file meshmover_linear_elasticity.hpp.
|
private |
Triangulation on which this acts.
Definition at line 129 of file meshmover_linear_elasticity.hpp.