Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef ALBANY_ABSTRACTSTKFIELDCONT_HPP
00009 #define ALBANY_ABSTRACTSTKFIELDCONT_HPP
00010
00011 #include "Teuchos_RCP.hpp"
00012 #include "Teuchos_ParameterList.hpp"
00013 #include "Epetra_Map.h"
00014 #include "Epetra_Vector.h"
00015
00016 #include "Albany_StateInfoStruct.hpp"
00017 #include "Albany_AbstractFieldContainer.hpp"
00018
00019 #include <stk_mesh/base/Field.hpp>
00020 #include <stk_mesh/base/FieldTraits.hpp>
00021 #include <stk_mesh/fem/CoordinateSystems.hpp>
00022
00023 namespace Albany {
00024
00029 class AbstractSTKFieldContainer : public AbstractFieldContainer {
00030
00031 public:
00032
00033
00034
00035 typedef stk::mesh::Field<double, stk::mesh::Cartesian, stk::mesh::Cartesian> TensorFieldType ;
00036
00037 typedef stk::mesh::Field<double, stk::mesh::Cartesian> VectorFieldType ;
00038
00039 typedef stk::mesh::Field<double> ScalarFieldType ;
00040
00041 typedef stk::mesh::Field<int> IntScalarFieldType ;
00042
00043 typedef stk::mesh::Cartesian QPTag;
00044
00045 typedef stk::mesh::Field<double, QPTag, stk::mesh::Cartesian, stk::mesh::Cartesian> QPTensorFieldType ;
00046
00047 typedef stk::mesh::Field<double, QPTag, stk::mesh::Cartesian > QPVectorFieldType ;
00048
00049 typedef stk::mesh::Field<double, QPTag> QPScalarFieldType ;
00050
00051 typedef std::vector<std::string> ScalarValueState;
00052 typedef std::vector<QPScalarFieldType*> QPScalarState;
00053 typedef std::vector<QPVectorFieldType*> QPVectorState;
00054 typedef std::vector<QPTensorFieldType*> QPTensorState;
00055
00056 typedef std::vector<ScalarFieldType*> ScalarState;
00057 typedef std::vector<VectorFieldType*> VectorState;
00058 typedef std::vector<TensorFieldType*> TensorState;
00059
00061 virtual ~AbstractSTKFieldContainer() {};
00062
00063 VectorFieldType* getCoordinatesField(){ return coordinates_field; }
00064 IntScalarFieldType* getProcRankField(){ return proc_rank_field; }
00065 IntScalarFieldType* getRefineField(){ return refine_field; }
00066 #ifdef ALBANY_LCM
00067 IntScalarFieldType* getFractureState(){ return fracture_state; }
00068 #endif // ALBANY_LCM
00069 ScalarFieldType* getSurfaceHeightField(){ return surfaceHeight_field; }
00070 ScalarFieldType* getTemperatureField(){ return temperature_field; }
00071 ScalarFieldType* getBasalFrictionField(){ return basalFriction_field; }
00072 ScalarFieldType* getThicknessField(){ return thickness_field; }
00073 ScalarFieldType* getFlowFactorField(){ return flowFactor_field; }
00074 VectorFieldType* getSurfaceVelocityField(){ return surfaceVelocity_field; }
00075 VectorFieldType* getVelocityRMSField(){ return velocityRMS_field; }
00076
00077 ScalarValueState getScalarValueStates(){ return scalarValue_states;}
00078 QPScalarState getQPScalarStates(){return qpscalar_states;}
00079 QPVectorState getQPVectorStates(){return qpvector_states;}
00080 QPTensorState getQPTensorStates(){return qptensor_states;}
00081
00082 virtual bool hasResidualField() = 0;
00083 virtual bool hasSurfaceHeightField() = 0;
00084 virtual bool hasTemperatureField() = 0;
00085 virtual bool hasBasalFrictionField() = 0;
00086 virtual bool hasThicknessField() = 0;
00087 virtual bool hasFlowFactorField() = 0;
00088 virtual bool hasSurfaceVelocityField() = 0;
00089 virtual bool hasVelocityRMSField() = 0;
00090
00091 double& getTime() {
00092 return time;
00093 }
00094
00095 virtual void fillSolnVector(Epetra_Vector& soln, stk::mesh::Selector& sel, const Teuchos::RCP<Epetra_Map>& node_map) = 0;
00096 virtual void saveSolnVector(const Epetra_Vector& soln, stk::mesh::Selector& sel, const Teuchos::RCP<Epetra_Map>& node_map) = 0;
00097 virtual void saveResVector(const Epetra_Vector& res, stk::mesh::Selector& sel, const Teuchos::RCP<Epetra_Map>& node_map) = 0;
00098
00099 virtual void transferSolutionToCoords() = 0;
00100
00101 protected:
00102
00103 VectorFieldType* coordinates_field;
00104 IntScalarFieldType* proc_rank_field;
00105 IntScalarFieldType* refine_field;
00106 #ifdef ALBANY_LCM
00107 IntScalarFieldType* fracture_state;
00108 #endif // ALBANY_LCM
00109 ScalarFieldType* surfaceHeight_field;
00110 ScalarFieldType* temperature_field;
00111 ScalarFieldType* basalFriction_field;
00112 ScalarFieldType* thickness_field;
00113 ScalarFieldType* flowFactor_field;
00114 VectorFieldType* surfaceVelocity_field;
00115 VectorFieldType* velocityRMS_field;
00116
00117 ScalarValueState scalarValue_states;
00118 QPScalarState qpscalar_states;
00119 QPVectorState qpvector_states;
00120 QPTensorState qptensor_states;
00121
00122 double time;
00123
00124 };
00125
00126 }
00127
00128 #endif // ALBANY_ABSTRACTSTKFIELDCONT_HPP