IncompressibleNonlinearElasticitySolver.hpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef INCOMPRESSIBLENONLINEARELASTICITYSOLVER_HPP_
00029 #define INCOMPRESSIBLENONLINEARELASTICITYSOLVER_HPP_
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include "AbstractNonlinearElasticitySolver.hpp"
00042 #include "AbstractIncompressibleMaterialLaw.hpp"
00043
00044
00052 template<size_t DIM>
00053 class IncompressibleNonlinearElasticitySolver : public AbstractNonlinearElasticitySolver<DIM>
00054 {
00055 friend class TestIncompressibleNonlinearElasticitySolver;
00056 friend class TestCompressibleNonlinearElasticitySolver;
00057 friend class TestNonlinearElasticityAdjointSolver;
00058 friend class AdaptiveNonlinearElasticityProblem;
00059
00060 protected:
00061
00063 static const size_t NUM_NODES_PER_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_NODES_PER_ELEMENT;
00064
00066 static const size_t NUM_VERTICES_PER_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_VERTICES_PER_ELEMENT;
00067
00069 static const size_t NUM_NODES_PER_BOUNDARY_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_NODES_PER_BOUNDARY_ELEMENT;
00070
00075 static const size_t STENCIL_SIZE = DIM*NUM_NODES_PER_ELEMENT + NUM_VERTICES_PER_ELEMENT;
00076
00078 static const size_t BOUNDARY_STENCIL_SIZE = DIM*NUM_NODES_PER_BOUNDARY_ELEMENT + DIM;
00079
00083 std::vector<double> mPressures;
00084
00102 virtual void AssembleOnElement(Element<DIM, DIM>& rElement,
00103 c_matrix<double, STENCIL_SIZE, STENCIL_SIZE >& rAElem,
00104 c_matrix<double, STENCIL_SIZE, STENCIL_SIZE >& rAElemPrecond,
00105 c_vector<double, STENCIL_SIZE>& rBElem,
00106 bool assembleResidual,
00107 bool assembleJacobian);
00108
00127 virtual void AssembleOnBoundaryElement(BoundaryElement<DIM-1, DIM>& rBoundaryElement,
00128 c_matrix<double, BOUNDARY_STENCIL_SIZE, BOUNDARY_STENCIL_SIZE>& rAelem,
00129 c_vector<double, BOUNDARY_STENCIL_SIZE>& rBelem,
00130 bool assembleResidual,
00131 bool assembleJacobian,
00132 unsigned boundaryConditionIndex);
00133
00150 void FormInitialGuess();
00151
00161 void AssembleSystem(bool assembleResidual, bool assembleJacobian);
00162
00163 public:
00164
00172 IncompressibleNonlinearElasticitySolver(QuadraticMesh<DIM>& rQuadMesh,
00173 SolidMechanicsProblemDefinition<DIM>& rProblemDefinition,
00174 std::string outputDirectory);
00175
00176
00178 ~IncompressibleNonlinearElasticitySolver()
00179 {
00180 }
00181
00185 std::vector<double>& rGetPressures();
00186 };
00187
00188 #endif