Classes | Defines | Typedefs | Functions | Variables

InterfaceTry.cpp File Reference

#include "Interface.hpp"
#include "Albany_MpasSTKMeshStruct.hpp"
#include "Teuchos_ParameterList.hpp"
#include "Teuchos_RCP.hpp"
#include "Albany_Utils.hpp"
#include "Albany_SolverFactory.hpp"
#include "Teuchos_XMLParameterListHelpers.hpp"
#include <stk_mesh/base/FieldData.hpp>
#include "Piro_PerformSolve.hpp"
#include "Thyra_EpetraThyraWrappers.hpp"
#include <stk_io/IossBridge.hpp>
#include <stk_io/MeshReadWriteUtils.hpp>
Include dependency graph for InterfaceTry.cpp:

Go to the source code of this file.

Classes

struct  TET_

Defines

#define GET_HERE   printf("get %25s, line: %d\n", __FILE__, __LINE__);

Typedefs

typedef struct TET_ TET

Functions

Teuchos::RCP< const Epetra_Vector > epetraVectorFromThyra (const Teuchos::RCP< const Epetra_Comm > &comm, const Teuchos::RCP< const Thyra::VectorBase< double > > &thyra)
Teuchos::RCP< const
Epetra_MultiVector > 
epetraMultiVectorFromThyra (const Teuchos::RCP< const Epetra_Comm > &comm, const Teuchos::RCP< const Thyra::MultiVectorBase< double > > &thyra)
void epetraFromThyra (const Teuchos::RCP< const Epetra_Comm > &comm, const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< double > > > &thyraResponses, const Teuchos::Array< Teuchos::Array< Teuchos::RCP< const Thyra::MultiVectorBase< double > > > > &thyraSensitivities, Teuchos::Array< Teuchos::RCP< const Epetra_Vector > > &responses, Teuchos::Array< Teuchos::Array< Teuchos::RCP< const Epetra_MultiVector > > > &sensitivities)
int velocity_solver_init_mpi_ (int *fComm)
 Interface functions.
void velocity_solver_set_grid_data_ (int const *_nCells_F, int const *_nEdges_F, int const *_nVertices_F, int const *_nLayers, int const *_nCellsSolve_F, int const *_nEdgesSolve_F, int const *_nVerticesSolve_F, int const *_maxNEdgesOnCell_F, double const *radius_F, int const *_cellsOnEdge_F, int const *_cellsOnVertex_F, int const *_verticesOnCell_F, int const *_verticesOnEdge_F, int const *_edgesOnCell_F, int const *_nEdgesOnCells_F, int const *_indexToCellID_F, double const *_xCell_F, double const *_yCell_F, double const *_zCell_F, double const *_areaTriangle_F, int const *sendCellsArray_F, int const *recvCellsArray_F, int const *sendEdgesArray_F, int const *recvEdgesArray_F, int const *sendVerticesArray_F, int const *recvVerticesArray_F)
void velocity_solver_init_l1l2_ (double const *levelsRatio_F)
void velocity_solver_export_2d_data_ (double const *lowerSurface_F, double const *thickness_F, double const *beta_F)
void velocity_solver_solve_l1l2_ (double const *lowerSurface_F, double const *thickness_F, double const *beta_F, double const *temperature_F, double *u_normal_F, double *, double *)
void velocity_solver_export_l1l2_velocity_ ()
void velocity_solver_init_fo_ (double const *levelsRatio_F)
void velocity_solver_solve_fo_ (double const *lowerSurface_F, double const *thickness_F, double const *beta_F, double const *temperature_F, double *u_normal_F, double *, double *)
void velocity_solver_export_fo_velocity_ ()
void velocity_solver_finalize_ ()
void velocity_solver_compute_2d_grid_ (int const *verticesMask_F)
void velocity_solver_extrude_3d_grid_ (double const *levelsRatio_F, double const *lowerSurface_F, double const *thickness_F)
void get_tetraP1_velocity_on_FEdges (double *uNormal, const std::vector< double > &velocityOnVertices, const std::vector< int > &edgeToFEdge, const std::vector< int > &mpasIndexToVertexID)
void get_prism_velocity_on_FEdges (double *uNormal, const std::vector< double > &velocityOnVertices, const std::vector< int > &edgeToFEdge)
void mapVerticesToCells (const std::vector< double > &velocityOnVertices, double *velocityOnCells, int fieldDim, int numLayers, int ordering)
void createReverseCellsExchangeLists (exchangeList_Type &sendListReverse_F, exchangeList_Type &receiveListReverse_F, const std::vector< int > &fVertexToTriangleID, const std::vector< int > &fCellToVertexID)
void createReverseEdgesExchangeLists (exchangeList_Type &sendListReverse_F, exchangeList_Type &receiveListReverse_F, const std::vector< int > &fVertexToTriangleID, const std::vector< int > &fEdgeToEdgeID)
void mapCellsToVertices (const std::vector< double > &velocityOnCells, std::vector< double > &velocityOnVertices, int fieldDim, int numLayers, int ordering)
bool isGhostTriangle (int i, double relTol)
double signedTriangleArea (const double *x, const double *y)
double signedTriangleAreaOnSphere (const double *x, const double *y, const double *z)
void extendMaskByOneLayer (int const *verticesMask_F, std::vector< int > &extendedFVerticesMask)
void import2DFields (double const *lowerSurface_F, double const *thickness_F, double const *beta_F, double eps)
void importP0Temperature (double const *temperature_F)
void createReducedMPI (int nLocalEntities, MPI_Comm &reduced_comm_id)
void computeLocalOffset (int nLocalEntities, int &localOffset, int &nGlobalEntities)
void getProcIds (std::vector< int > &field, int const *recvArray)
void getProcIds (std::vector< int > &field, exchangeList_Type const *recvList)
exchangeList_Type unpackMpiArray (int const *array)
void allToAll (std::vector< int > &field, int const *sendArray, int const *recvArray, int fieldDim)
void allToAll (std::vector< int > &field, exchangeList_Type const *sendList, exchangeList_Type const *recvList, int fieldDim)
void allToAll (double *field, exchangeList_Type const *sendList, exchangeList_Type const *recvList, int fieldDim)
int initialize_iceProblem (int nTriangles)

Variables

Teuchos::RCP
< Albany::MpasSTKMeshStruct
meshStruct2D
 Includes.
Teuchos::RCP
< Albany::MpasSTKMeshStruct
meshStruct
Teuchos::RCP< const Epetra_Comm > mpiComm
Teuchos::RCP
< Teuchos::ParameterList > 
appParams
Teuchos::RCP
< Albany::AbstractSTKMeshStruct
stkMeshStruct
Teuchos::RCP
< Albany::SolverFactory
slvrfctryPtr
Teuchos::RCP
< Thyra::ModelEvaluator
< double > > 
solver
Teuchos::RCP
< Teuchos::ParameterList > 
discParams
Teuchos::RCP
< Albany::StateInfoStruct
sis
Teuchos::RCP< Albany::Applicationapp
int Ordering = 1
MPI_Comm comm
MPI_Comm reducedComm
bool isDomainEmpty = true
bool initialize_velocity = true
int nCells_F
int nEdges_F
int nVertices_F
int nCellsSolve_F
int nEdgesSolve_F
int nVerticesSolve_F
int nVertices
int nEdges
int nTriangles
int nGlobalVertices
int nGlobalEdges
int nGlobalTriangles
int maxNEdgesOnCell_F
int const * cellsOnEdge_F
int const * cellsOnVertex_F
int const * verticesOnCell_F
int const * verticesOnEdge_F
int const * edgesOnCell_F
int const * indexToCellID_F
int const * nEdgesOnCells_F
std::vector< double > layersRatio
std::vector< double > levelsNormalizedThickness
int nLayers
double const * xCell_F
double const * yCell_F
double const * zCell_F
double const * areaTriangle_F
std::vector< double > xCellProjected
std::vector< double > yCellProjected
std::vector< double > zCellProjected
const double unit_length = 1000
const double T0 = 273.15
void * phgGrid = 0
std::vector< int > edgesToReceive
std::vector< int > fCellsToReceive
std::vector< int > indexToTriangleID
std::vector< int > verticesOnTria
std::vector< int > trianglesOnEdge
std::vector< int > trianglesPositionsOnEdge
std::vector< int > verticesOnEdge
std::vector< int > indexToVertexID
std::vector< int > vertexToFCell
std::vector< int > indexToEdgeID
std::vector< int > edgeToFEdge
std::vector< int > mask
std::vector< int > fVertexToTriangleID
std::vector< int > fCellToVertex
std::vector< double > temperatureOnTetra
std::vector< double > velocityOnVertices
std::vector< double > velocityOnCells
std::vector< double > elevationData
std::vector< double > thicknessData
std::vector< double > betaData
std::vector< double > smb_F
std::vector< double > thicknessOnCells
std::vector< bool > isVertexBoundary
std::vector< bool > isBoundaryEdge
int numBoundaryEdges
double radius
exchangeList_Type const * sendCellsList_F = 0
exchangeList_Type const * recvCellsList_F = 0
exchangeList_Type const * sendEdgesList_F = 0
exchangeList_Type const * recvEdgesList_F = 0
exchangeList_Type const * sendVerticesList_F = 0
exchangeList_Type const * recvVerticesList_F = 0
exchangeList_Type sendCellsListReversed
exchangeList_Type recvCellsListReversed
exchangeList_Type sendEdgesListReversed
exchangeList_Type recvEdgesListReversed

Define Documentation

#define GET_HERE   printf("get %25s, line: %d\n", __FILE__, __LINE__);

Definition at line 269 of file InterfaceTry.cpp.


Typedef Documentation

typedef struct TET_ TET

Function Documentation

Teuchos::RCP<const Epetra_Vector> epetraVectorFromThyra ( const Teuchos::RCP< const Epetra_Comm > &  comm,
const Teuchos::RCP< const Thyra::VectorBase< double > > &  thyra 
)

Definition at line 88 of file InterfaceTry.cpp.

Teuchos::RCP<const Epetra_MultiVector> epetraMultiVectorFromThyra ( const Teuchos::RCP< const Epetra_Comm > &  comm,
const Teuchos::RCP< const Thyra::MultiVectorBase< double > > &  thyra 
)

Definition at line 101 of file InterfaceTry.cpp.

void epetraFromThyra ( const Teuchos::RCP< const Epetra_Comm > &  comm,
const Teuchos::Array< Teuchos::RCP< const Thyra::VectorBase< double > > > &  thyraResponses,
const Teuchos::Array< Teuchos::Array< Teuchos::RCP< const Thyra::MultiVectorBase< double > > > > &  thyraSensitivities,
Teuchos::Array< Teuchos::RCP< const Epetra_Vector > > &  responses,
Teuchos::Array< Teuchos::Array< Teuchos::RCP< const Epetra_MultiVector > > > &  sensitivities 
)

Definition at line 113 of file InterfaceTry.cpp.

int velocity_solver_init_mpi_ ( int *  fComm  ) 

Interface functions.

Interface function.

Definition at line 180 of file InterfaceTry.cpp.

void velocity_solver_set_grid_data_ ( int const *  _nCells_F,
int const *  _nEdges_F,
int const *  _nVertices_F,
int const *  _nLayers,
int const *  _nCellsSolve_F,
int const *  _nEdgesSolve_F,
int const *  _nVerticesSolve_F,
int const *  _maxNEdgesOnCell_F,
double const *  radius_F,
int const *  _cellsOnEdge_F,
int const *  _cellsOnVertex_F,
int const *  _verticesOnCell_F,
int const *  _verticesOnEdge_F,
int const *  _edgesOnCell_F,
int const *  _nEdgesOnCells_F,
int const *  _indexToCellID_F,
double const *  _xCell_F,
double const *  _yCell_F,
double const *  _zCell_F,
double const *  _areaTriangle_F,
int const *  sendCellsArray_F,
int const *  recvCellsArray_F,
int const *  sendEdgesArray_F,
int const *  recvEdgesArray_F,
int const *  sendVerticesArray_F,
int const *  recvVerticesArray_F 
)

Definition at line 190 of file InterfaceTry.cpp.

void velocity_solver_init_l1l2_ ( double const *  levelsRatio_F  ) 

Definition at line 248 of file InterfaceTry.cpp.

void velocity_solver_export_2d_data_ ( double const *  lowerSurface_F,
double const *  thickness_F,
double const *  beta_F 
)

Definition at line 275 of file InterfaceTry.cpp.

void velocity_solver_solve_l1l2_ ( double const *  lowerSurface_F,
double const *  thickness_F,
double const *  beta_F,
double const *  temperature_F,
double *  u_normal_F,
double *  ,
double *   
)

Definition at line 292 of file InterfaceTry.cpp.

void velocity_solver_export_l1l2_velocity_ (  ) 

Definition at line 300 of file InterfaceTry.cpp.

void velocity_solver_init_fo_ ( double const *  levelsRatio_F  ) 

Definition at line 333 of file InterfaceTry.cpp.

void velocity_solver_solve_fo_ ( double const *  lowerSurface_F,
double const *  thickness_F,
double const *  beta_F,
double const *  temperature_F,
double *  u_normal_F,
double *  ,
double *   
)

Definition at line 353 of file InterfaceTry.cpp.

void velocity_solver_export_fo_velocity_ (  ) 

Definition at line 378 of file InterfaceTry.cpp.

void velocity_solver_finalize_ (  ) 

Definition at line 391 of file InterfaceTry.cpp.

void velocity_solver_compute_2d_grid_ ( int const *  verticesMask_F  ) 

Definition at line 414 of file InterfaceTry.cpp.

void velocity_solver_extrude_3d_grid_ ( double const *  levelsRatio_F,
double const *  lowerSurface_F,
double const *  thickness_F 
)

Definition at line 811 of file InterfaceTry.cpp.

void get_tetraP1_velocity_on_FEdges ( double *  uNormal,
const std::vector< double > &  velocityOnVertices,
const std::vector< int > &  edgeToFEdge,
const std::vector< int > &  mpasIndexToVertexID 
)

Definition at line 894 of file InterfaceTry.cpp.

void get_prism_velocity_on_FEdges ( double *  uNormal,
const std::vector< double > &  velocityOnVertices,
const std::vector< int > &  edgeToFEdge 
)

Definition at line 940 of file InterfaceTry.cpp.

void mapVerticesToCells ( const std::vector< double > &  velocityOnVertices,
double *  velocityOnCells,
int  fieldDim,
int  numLayers,
int  ordering 
)

Definition at line 981 of file InterfaceTry.cpp.

void createReverseCellsExchangeLists ( exchangeList_Type sendListReverse_F,
exchangeList_Type receiveListReverse_F,
const std::vector< int > &  fVertexToTriangleID,
const std::vector< int > &  fCellToVertexID 
)

Definition at line 1010 of file InterfaceTry.cpp.

void createReverseEdgesExchangeLists ( exchangeList_Type sendListReverse_F,
exchangeList_Type receiveListReverse_F,
const std::vector< int > &  fVertexToTriangleID,
const std::vector< int > &  fEdgeToEdgeID 
)

Definition at line 1080 of file InterfaceTry.cpp.

void mapCellsToVertices ( const std::vector< double > &  velocityOnCells,
std::vector< double > &  velocityOnVertices,
int  fieldDim,
int  numLayers,
int  ordering 
)

Definition at line 1274 of file InterfaceTry.cpp.

bool isGhostTriangle ( int  i,
double  relTol 
)

Definition at line 1296 of file InterfaceTry.cpp.

double signedTriangleArea ( const double *  x,
const double *  y 
)

Definition at line 1311 of file InterfaceTry.cpp.

double signedTriangleAreaOnSphere ( const double *  x,
const double *  y,
const double *  z 
)

Definition at line 1319 of file InterfaceTry.cpp.

void extendMaskByOneLayer ( int const *  verticesMask_F,
std::vector< int > &  extendedFVerticesMask 
)

Definition at line 1331 of file InterfaceTry.cpp.

void import2DFields ( double const *  lowerSurface_F,
double const *  thickness_F,
double const *  beta_F,
double  eps 
)

Definition at line 1351 of file InterfaceTry.cpp.

void importP0Temperature ( double const *  temperature_F  ) 

Definition at line 1457 of file InterfaceTry.cpp.

void createReducedMPI ( int  nLocalEntities,
MPI_Comm &  reduced_comm_id 
)

Definition at line 1493 of file InterfaceTry.cpp.

void computeLocalOffset ( int  nLocalEntities,
int &  localOffset,
int &  nGlobalEntities 
)

Definition at line 1515 of file InterfaceTry.cpp.

void getProcIds ( std::vector< int > &  field,
int const *  recvArray 
)

Definition at line 1534 of file InterfaceTry.cpp.

void getProcIds ( std::vector< int > &  field,
exchangeList_Type const *  recvList 
)

Definition at line 1551 of file InterfaceTry.cpp.

exchangeList_Type unpackMpiArray ( int const *  array  ) 

Definition at line 1567 of file InterfaceTry.cpp.

void allToAll ( std::vector< int > &  field,
int const *  sendArray,
int const *  recvArray,
int  fieldDim 
)

Definition at line 1580 of file InterfaceTry.cpp.

void allToAll ( std::vector< int > &  field,
exchangeList_Type const *  sendList,
exchangeList_Type const *  recvList,
int  fieldDim 
)

Definition at line 1637 of file InterfaceTry.cpp.

void allToAll ( double *  field,
exchangeList_Type const *  sendList,
exchangeList_Type const *  recvList,
int  fieldDim 
)

Definition at line 1678 of file InterfaceTry.cpp.

int initialize_iceProblem ( int  nTriangles  ) 

Definition at line 1719 of file InterfaceTry.cpp.


Variable Documentation

Includes.

Namespaces

Definition at line 30 of file InterfaceTry.cpp.

Definition at line 31 of file InterfaceTry.cpp.

Teuchos::RCP<const Epetra_Comm> mpiComm

Definition at line 32 of file InterfaceTry.cpp.

Teuchos::RCP<Teuchos::ParameterList> appParams

Definition at line 33 of file InterfaceTry.cpp.

Definition at line 34 of file InterfaceTry.cpp.

Definition at line 35 of file InterfaceTry.cpp.

Teuchos::RCP<Thyra::ModelEvaluator<double> > solver

Definition at line 36 of file InterfaceTry.cpp.

Teuchos::RCP<Teuchos::ParameterList> discParams

Definition at line 37 of file InterfaceTry.cpp.

Definition at line 38 of file InterfaceTry.cpp.

Teuchos::RCP<Albany::Application> app

Definition at line 39 of file InterfaceTry.cpp.

int Ordering = 1

Definition at line 41 of file InterfaceTry.cpp.

MPI_Comm comm

Definition at line 42 of file InterfaceTry.cpp.

MPI_Comm reducedComm

Definition at line 42 of file InterfaceTry.cpp.

bool isDomainEmpty = true

Definition at line 43 of file InterfaceTry.cpp.

bool initialize_velocity = true

Definition at line 44 of file InterfaceTry.cpp.

int nCells_F

Definition at line 45 of file InterfaceTry.cpp.

int nEdges_F

Definition at line 45 of file InterfaceTry.cpp.

Definition at line 45 of file InterfaceTry.cpp.

Definition at line 46 of file InterfaceTry.cpp.

Definition at line 46 of file InterfaceTry.cpp.

Definition at line 46 of file InterfaceTry.cpp.

int nVertices

Definition at line 47 of file InterfaceTry.cpp.

int nEdges

Definition at line 47 of file InterfaceTry.cpp.

Definition at line 47 of file InterfaceTry.cpp.

Definition at line 47 of file InterfaceTry.cpp.

Definition at line 47 of file InterfaceTry.cpp.

Definition at line 47 of file InterfaceTry.cpp.

Definition at line 48 of file InterfaceTry.cpp.

int const* cellsOnEdge_F

Definition at line 49 of file InterfaceTry.cpp.

int const * cellsOnVertex_F

Definition at line 49 of file InterfaceTry.cpp.

int const * verticesOnCell_F

Definition at line 49 of file InterfaceTry.cpp.

int const * verticesOnEdge_F

Definition at line 49 of file InterfaceTry.cpp.

int const * edgesOnCell_F

Definition at line 49 of file InterfaceTry.cpp.

int const * indexToCellID_F

Definition at line 49 of file InterfaceTry.cpp.

int const * nEdgesOnCells_F

Definition at line 49 of file InterfaceTry.cpp.

std::vector<double> layersRatio

Definition at line 50 of file InterfaceTry.cpp.

std::vector<double> levelsNormalizedThickness

Definition at line 50 of file InterfaceTry.cpp.

int nLayers

Definition at line 51 of file InterfaceTry.cpp.

double const* xCell_F

Definition at line 52 of file InterfaceTry.cpp.

double const * yCell_F

Definition at line 52 of file InterfaceTry.cpp.

double const * zCell_F

Definition at line 52 of file InterfaceTry.cpp.

double const * areaTriangle_F

Definition at line 52 of file InterfaceTry.cpp.

std::vector<double> xCellProjected

Definition at line 53 of file InterfaceTry.cpp.

std::vector<double> yCellProjected

Definition at line 53 of file InterfaceTry.cpp.

std::vector<double> zCellProjected

Definition at line 53 of file InterfaceTry.cpp.

const double unit_length = 1000

Definition at line 54 of file InterfaceTry.cpp.

const double T0 = 273.15

Definition at line 55 of file InterfaceTry.cpp.

void* phgGrid = 0

Definition at line 56 of file InterfaceTry.cpp.

std::vector<int> edgesToReceive

Definition at line 57 of file InterfaceTry.cpp.

std::vector<int> fCellsToReceive

Definition at line 57 of file InterfaceTry.cpp.

std::vector<int> indexToTriangleID

Definition at line 57 of file InterfaceTry.cpp.

std::vector<int> verticesOnTria

Definition at line 57 of file InterfaceTry.cpp.

std::vector<int> trianglesOnEdge

Definition at line 57 of file InterfaceTry.cpp.

std::vector<int> trianglesPositionsOnEdge

Definition at line 57 of file InterfaceTry.cpp.

std::vector<int> verticesOnEdge

Definition at line 57 of file InterfaceTry.cpp.

std::vector<int> indexToVertexID

Definition at line 58 of file InterfaceTry.cpp.

std::vector<int> vertexToFCell

Definition at line 58 of file InterfaceTry.cpp.

std::vector<int> indexToEdgeID

Definition at line 58 of file InterfaceTry.cpp.

std::vector<int> edgeToFEdge

Definition at line 58 of file InterfaceTry.cpp.

std::vector<int> mask

Definition at line 58 of file InterfaceTry.cpp.

std::vector<int> fVertexToTriangleID

Definition at line 58 of file InterfaceTry.cpp.

std::vector<int> fCellToVertex

Definition at line 58 of file InterfaceTry.cpp.

std::vector<double> temperatureOnTetra

Definition at line 59 of file InterfaceTry.cpp.

std::vector<double> velocityOnVertices

Definition at line 59 of file InterfaceTry.cpp.

std::vector<double> velocityOnCells

Definition at line 59 of file InterfaceTry.cpp.

std::vector<double> elevationData

Definition at line 59 of file InterfaceTry.cpp.

std::vector<double> thicknessData

Definition at line 59 of file InterfaceTry.cpp.

std::vector<double> betaData

Definition at line 59 of file InterfaceTry.cpp.

std::vector<double> smb_F

Definition at line 59 of file InterfaceTry.cpp.

std::vector<double> thicknessOnCells

Definition at line 59 of file InterfaceTry.cpp.

std::vector<bool> isVertexBoundary

Definition at line 60 of file InterfaceTry.cpp.

std::vector<bool> isBoundaryEdge

Definition at line 60 of file InterfaceTry.cpp.

Definition at line 61 of file InterfaceTry.cpp.

double radius

Definition at line 63 of file InterfaceTry.cpp.

Definition at line 65 of file InterfaceTry.cpp.

Definition at line 65 of file InterfaceTry.cpp.

Definition at line 66 of file InterfaceTry.cpp.

Definition at line 66 of file InterfaceTry.cpp.

Definition at line 67 of file InterfaceTry.cpp.

Definition at line 67 of file InterfaceTry.cpp.

Definition at line 68 of file InterfaceTry.cpp.

Definition at line 68 of file InterfaceTry.cpp.

Definition at line 68 of file InterfaceTry.cpp.

Definition at line 68 of file InterfaceTry.cpp.