MFEM
v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
miniapps
hooke
operators
elasticity_gradient_operator.cpp
Go to the documentation of this file.
1
// Copyright (c) 2010-2024, Lawrence Livermore National Security, LLC. Produced
2
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
3
// LICENSE and NOTICE for details. LLNL-CODE-806117.
4
//
5
// This file is part of the MFEM library. For more information and source code
6
// availability visit https://mfem.org.
7
//
8
// MFEM is free software; you can redistribute it and/or modify it under the
9
// terms of the BSD-3 license. We welcome feedback and contributions, see file
10
// CONTRIBUTING.md for details.
11
12
#include "
elasticity_gradient_operator.hpp
"
13
#include "
elasticity_operator.hpp
"
14
15
namespace
mfem
16
{
17
ElasticityGradientOperator::ElasticityGradientOperator
(
ElasticityOperator
&op)
18
:
Operator
(op.Height()), elasticity_op_(op) {}
19
20
void
ElasticityGradientOperator::Mult
(
const
Vector
&x,
Vector
&y)
const
21
{
22
elasticity_op_
.
GradientMult
(x, y);
23
}
24
25
void
ElasticityGradientOperator::AssembleGradientDiagonal
(
26
Vector
&Ke_diag,
Vector
&K_diag_local,
Vector
&K_diag)
const
27
{
28
static_cast<
ElasticityOperator
&
>
(
elasticity_op_
)
29
.
AssembleGradientDiagonal
(Ke_diag, K_diag_local, K_diag);
30
}
31
32
}
// namespace mfem
mfem::ElasticityGradientOperator::AssembleGradientDiagonal
void AssembleGradientDiagonal(Vector &Ke_diag, Vector &K_diag_local, Vector &K_diag) const
Definition
elasticity_gradient_operator.cpp:25
mfem::ElasticityGradientOperator::ElasticityGradientOperator
ElasticityGradientOperator(ElasticityOperator &op)
Definition
elasticity_gradient_operator.cpp:17
mfem::ElasticityGradientOperator::elasticity_op_
ElasticityOperator & elasticity_op_
Definition
elasticity_gradient_operator.hpp:35
mfem::ElasticityGradientOperator::Mult
void Mult(const Vector &x, Vector &y) const override
Operator application: y=A(x).
Definition
elasticity_gradient_operator.cpp:20
mfem::ElasticityOperator
Definition
elasticity_operator.hpp:21
mfem::ElasticityOperator::GradientMult
void GradientMult(const Vector &dX, Vector &Y) const
Multiply the linearization of the residual R(U) wrt to the current state U by a perturbation dX.
Definition
elasticity_operator.cpp:110
mfem::Operator
Abstract operator.
Definition
operator.hpp:25
mfem::Vector
Vector data type.
Definition
vector.hpp:80
elasticity_gradient_operator.hpp
elasticity_operator.hpp
mfem
Definition
CodeDocumentation.dox:1
1.11.0