| 1 |
// Copyright (c) 2010-2025, 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 |
#ifndef MFEM_ELASTICITY_GRADIENT_OP_HPP |
| 13 |
#define MFEM_ELASTICITY_GRADIENT_OP_HPP |
| 14 |
|
| 15 |
#include "elasticity_operator.hpp" |
| 16 |
#include "../materials/gradient_type.hpp" |
| 17 |
|
| 18 |
namespace mfem |
| 19 |
{ |
| 20 |
/** |
| 21 |
* @brief ElasticityGradientOperator is a wrapper class to pass |
| 22 |
* ElasticityOperator::AssembleGradientDiagonal and |
| 23 |
* ElasticityOperator::GradientMult as a separate object through NewtonSolver. |
| 24 |
*/ |
| 25 |
class ElasticityGradientOperator : public Operator |
| 26 |
{ |
| 27 |
public: |
| 28 |
ElasticityGradientOperator(ElasticityOperator &op); |
| 29 |
|
| 30 |
void AssembleGradientDiagonal(Vector &Ke_diag, Vector &K_diag_local, |
| 31 |
Vector &K_diag) const; |
| 32 |
|
| 33 |
void Mult(const Vector &x, Vector &y) const override; |
| 34 |
|
| 35 |
ElasticityOperator &elasticity_op_; |
| 36 |
}; |
| 37 |
|
| 38 |
} // namespace mfem |
| 39 |
|
| 40 |
#endif |