4 namespace GridConversion{
namespace DriverProgram{
7 SolverUtils::Mesh::Connectivity nodesToDomains){
9 std::ostringstream Ostr;
12 FunctionEntry(
"HigherOrderTets");
18 std::vector<unsigned int> newElems(
numElems*newNumNPE,0);
22 std::cout <<
"elem " <<
i+1 << std::endl;
26 newElems[
i*newNumNPE +
j] =
elems[
i*numNodesPerElem +
j];
36 std::cout <<
"edge " <<
i+1 << std::endl;
50 std::cout <<
" new node " <<
numNodes <<
": "
51 << x <<
" " << y <<
" " << z << std::endl;
56 for(
int j=0;
j < nodesToDomains[n1].size();
j++){
58 for(
int k=0;
k < nodesToDomains[n2].size();
k++){
60 if(nodesToDomains[n1][
j] == nodesToDomains[n2][
k]){
61 int domain = nodesToDomains[n1][
j]-1;
71 for(
int j=0;
j < elemEdgeToElems[
i].size();
j++){
72 int elem = elemEdgeToElems[
i][
j];
73 std::cout <<
" element " << elem << std::endl;
78 std::cout <<
" edge " <<
elemToElemEdges[numEdgesPerElem*(elem-1) +
k] << std::endl;
86 if(newElems[newNumNPE*(elem-1) + 4] == 0){
87 newElems[newNumNPE*(elem-1) + 4] =
numNodes;
92 if(newElems[newNumNPE*(elem-1) + 6] == 0){
93 newElems[newNumNPE*(elem-1) + 6] =
numNodes;
98 if(newElems[newNumNPE*(elem-1) + 7] == 0){
99 newElems[newNumNPE*(elem-1) + 7] =
numNodes;
104 if(newElems[newNumNPE*(elem-1) + 5] == 0){
105 newElems[newNumNPE*(elem-1) + 5] =
numNodes;
110 if(newElems[newNumNPE*(elem-1) + 8] == 0){
111 newElems[newNumNPE*(elem-1) + 8] =
numNodes;
116 if(newElems[newNumNPE*(elem-1) + 9] == 0){
117 newElems[newNumNPE*(elem-1) + 9] =
numNodes;
126 std::cout <<
"line " << __LINE__ << std::endl;
130 Ostr <<
"new elements: " << std::endl;
132 Ostr <<
i+1 <<
":" << std::endl;
133 for(
int j=0;
j < newNumNPE;
j++){
134 Ostr << newElems[
i*newNumNPE +
j] <<
" ";
142 std::cout <<
"line " << __LINE__ << std::endl;
144 elems.resize(numElems*newNumNPE);
151 std::cout <<
"line " << __LINE__ << std::endl;
152 FunctionExit(
"HigherOrderTets");
154 std::cout <<
"line " << __LINE__ << std::endl;
virtual int HigherOrderTets(SolverUtils::Mesh::Connectivity elemEdgeToElems, SolverUtils::Mesh::Connectivity nodesToDomains)
This function creates higher order tets from linear tets.
void int int REAL REAL * y
std::vector< std::vector< unsigned int > > domains
vector of vectors to hold the domains
int numElemEdges
number of element edges in mesh
std::vector< unsigned int > elemToElemEdges
map of elements to element edges
GridConversion interface.
std::vector< unsigned int > elems
vector for holding element connectivies read from input
int numElems
number of elements in mesh
int verblevel
Verbosity level.
int numNodesPerElemEdge
number of nodes per element edge
void int int int REAL REAL REAL * z
int numNodesPerElem
number of nodes per element
std::vector< unsigned int > elemEdges
vector for holding element edges
int numNodes
number of nodes in mesh
std::vector< double > nodes
vector for holding nodal coordinates read from input