4 #include "../MeshElements.h"
28 "Tag identifying surface to process.");
30 "Radius of cylinder.");
32 "Number of points along edge.");
46 set<pair<int,int> > tmp;
47 int surfTag =
m_config[
"surf"].as<
int>();
48 int prismedge[2][3] = {{0,5,4}, {2,6,7}};
50 int dim =
m_mesh->m_expDim;
52 for (
int i = 0; i <
m_mesh->m_element[dim].size(); ++i)
55 int nSurf = dim == 3 ? el->GetFaceCount() : el->GetEdgeCount();
57 for (
int j = 0; j < nSurf; ++j)
59 int bl = el->GetBoundaryLink(j);
66 vector<int> tags = bEl->GetTagList();
68 if (
find(tags.begin(), tags.end(), surfTag) ==
77 for (
int k = 0; k < 3; ++k)
93 double r =
m_config[
"r"].as<
double>();
94 double t1 = atan2(n1->m_y, n1->m_x);
95 double t2 = atan2(n2->m_y, n2->m_x);
99 if (t1 < -M_PI/2.0 && t2 > 0.0)
103 if (t2 < -M_PI/2.0 && t1 > 0.0)
108 dt = (t2-t1) / (nq-1);
109 dz = (n2->m_z - n1->m_z) / (nq-1);
111 edge->m_edgeNodes.resize(nq-2);
112 Node dx = (*n2-*n1) * (1.0/(nq-1.0));
113 for (
int i = 1; i < nq-1; ++i)
116 new Node(0, r*cos(t1 + i*dt),
#define ASSERTL0(condition, msg)
pair< ModuleType, string > ModuleKey
virtual ~ProcessCyl()
Destructor.
boost::shared_ptr< Edge > EdgeSharedPtr
Shared pointer to an edge.
map< string, ConfigOption > m_config
List of configuration values.
MeshSharedPtr m_mesh
Mesh object.
boost::shared_ptr< Node > NodeSharedPtr
Shared pointer to a Node.
boost::shared_ptr< Element > ElementSharedPtr
Shared pointer to an element.
1D Evenly-spaced points using Lagrange polynomial
boost::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh.
virtual void Process()
Write mesh to output file.
Represents a point in the domain.
Represents a command-line configuration option.
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
void GenerateEdgeNodes(EdgeSharedPtr edge)
ModuleFactory & GetModuleFactory()
Abstract base class for processing modules.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.