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
00036 #ifndef tetDecompositionMotionSolver_H
00037 #define tetDecompositionMotionSolver_H
00038
00039 #include "motionSolver.H"
00040 #include "polyMesh.H"
00041 #include "tetPolyMesh.H"
00042 #include "tetPointFields.H"
00043 #include "elementFields.H"
00044
00045
00046
00047 namespace Foam
00048 {
00049
00050
00051 class twoDPointCorrector;
00052
00053
00054
00055
00056
00057 class tetDecompositionMotionSolver
00058 :
00059 public motionSolver
00060 {
00061
00062
00063
00064 tetPolyMesh tetMesh_;
00065
00066
00067 tetPointVectorField motionU_;
00068
00069
00070 mutable tetPointVectorField* totDisplacementPtr_;
00071
00072
00073 public:
00074
00075
00076 TypeName("tetDecompositionMotionSolver");
00077
00078
00079
00080
00081
00082 tetDecompositionMotionSolver(const polyMesh& mesh);
00083
00084
00085
00086
00087 virtual ~tetDecompositionMotionSolver();
00088
00089
00090
00091
00092
00093 const tetPolyMesh& tetMesh() const
00094 {
00095 return tetMesh_;
00096 }
00097
00098
00099 tetPointVectorField& motionU()
00100 {
00101 return motionU_;
00102 }
00103
00104
00105 void storeTotDisplacement() const
00106 {
00107 if(!totDisplacementPtr_)
00108 {
00109 totDisplacementPtr_ =
00110 new tetPointVectorField
00111 (
00112 IOobject
00113 (
00114 "totalMotionU",
00115 mesh().time().timeName(),
00116 mesh(),
00117 IOobject::NO_READ,
00118 IOobject::NO_WRITE
00119 ),
00120 tetMesh(),
00121 dimensionedVector("zero", dimLength, vector::zero)
00122 );
00123 }
00124 }
00125
00126 bool needTotDisplacement() const
00127 {
00128 return totDisplacementPtr_;
00129 }
00130
00131
00132
00133 tetPointVectorField& totDisplacement()
00134 {
00135 return *totDisplacementPtr_;
00136 }
00137
00138 const tetPointVectorField& totDisplacement() const
00139 {
00140 return *totDisplacementPtr_;
00141 }
00142
00143
00144 virtual tmp<pointField> curPoints() const;
00145
00146
00147 virtual void solve() = 0;
00148
00149
00150
00151 virtual void updateMesh();
00152
00153
00154 virtual void updateTetTopology(const tetPolyMeshMapperFaceDecomp&);
00155
00156
00157
00158 tmp<elementScalarField> distortionEnergy() const;
00159
00160
00161 tmp<elementScalarField> deformationEnergy() const;
00162
00163
00164 tmp<elementScalarField> totDistortionEnergy() const;
00165
00166
00167 tmp<elementScalarField> totDeformationEnergy() const;
00168
00169
00170 tmp<scalarField> nonOrthogonality() const;
00171
00172
00173 tmp<Foam::scalarField> cellSkewness() const;
00174 };
00175
00176
00177
00178
00179 }
00180
00181
00182
00183 #endif
00184
00185