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
00029
00030
00031
00032
00033
00034
00035 #ifndef INCOMPRESSIBLENONLINEARELASTICITYSOLVER_HPP_
00036 #define INCOMPRESSIBLENONLINEARELASTICITYSOLVER_HPP_
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #include "AbstractNonlinearElasticitySolver.hpp"
00049 #include "AbstractIncompressibleMaterialLaw.hpp"
00050
00051
00059 template<size_t DIM>
00060 class IncompressibleNonlinearElasticitySolver : public AbstractNonlinearElasticitySolver<DIM>
00061 {
00062 friend class TestIncompressibleNonlinearElasticitySolver;
00063 friend class TestCompressibleNonlinearElasticitySolver;
00064 friend class TestNonlinearElasticityAdjointSolver;
00065 friend class AdaptiveNonlinearElasticityProblem;
00066
00067 protected:
00068
00070 static const size_t NUM_NODES_PER_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_NODES_PER_ELEMENT;
00071
00073 static const size_t NUM_VERTICES_PER_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_VERTICES_PER_ELEMENT;
00074
00076 static const size_t NUM_NODES_PER_BOUNDARY_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_NODES_PER_BOUNDARY_ELEMENT;
00077
00082 static const size_t STENCIL_SIZE = DIM*NUM_NODES_PER_ELEMENT + NUM_VERTICES_PER_ELEMENT;
00083
00085 static const size_t BOUNDARY_STENCIL_SIZE = DIM*NUM_NODES_PER_BOUNDARY_ELEMENT;
00086
00087
00106 virtual void AssembleOnElement(Element<DIM, DIM>& rElement,
00107 c_matrix<double, STENCIL_SIZE, STENCIL_SIZE >& rAElem,
00108 c_matrix<double, STENCIL_SIZE, STENCIL_SIZE >& rAElemPrecond,
00109 c_vector<double, STENCIL_SIZE>& rBElem,
00110 bool assembleResidual,
00111 bool assembleJacobian);
00112
00127 void FormInitialGuess();
00128
00138 void AssembleSystem(bool assembleResidual, bool assembleJacobian);
00139
00140 public:
00141
00149 IncompressibleNonlinearElasticitySolver(AbstractTetrahedralMesh<DIM,DIM>& rQuadMesh,
00150 SolidMechanicsProblemDefinition<DIM>& rProblemDefinition,
00151 std::string outputDirectory);
00152
00153
00155 virtual ~IncompressibleNonlinearElasticitySolver()
00156 {
00157 }
00158 };
00159
00160 #endif