Commit 1bea063b authored by Dave Moxey's avatar Dave Moxey

Fix a few cosmetic things

parent c3ae0ad6
////////////////////////////////////////////////////////////////////////////////
//
// File: SurfaceMeshing.cpp
// File: ProcessLoadCAD.cpp
//
// For more information, please see: http://www.nektar.info/
//
......@@ -29,7 +29,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: surfacemeshing object methods.
// Description: Load CAD module
//
////////////////////////////////////////////////////////////////////////////////
......
////////////////////////////////////////////////////////////////////////////////
//
// File: ProcessBL.h
// File: ProcessLoadCAD.h
//
// For more information, please see: http://www.nektar.info/
//
......@@ -29,7 +29,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Refine boundary layer of elements.
// Description: Load CAD module
//
////////////////////////////////////////////////////////////////////////////////
......
......@@ -53,7 +53,9 @@ void Octree::Process()
CompileSourcePointList();
if (m_mesh->m_verbose)
{
cout << "\tCurvature samples: " << m_SPList.size() << endl;
}
// make master octant based on the bounding box of the domain
m_dim = max((boundingBox[1] - boundingBox[0]) / 2.0,
......@@ -1021,14 +1023,15 @@ void Octree::CompileSourcePointList()
{
Array<OneD, NekDouble> x1(3), x2(3);
NekDouble r, d;
s >> x1[0] >> x1[1] >> x1[2] >> x2[0] >> x2[1] >> x2[2] >> r >> d;
s >> x1[0] >> x1[1] >> x1[2] >> x2[0] >> x2[1] >> x2[2]
>> r >> d;
lsources.push_back(linesource(x1, x2, r, d));
}
}
fle.close();
//this takes any existing sourcepoints within the influence range
//and modifys them
// this takes any existing sourcepoints within the influence range
// and modifies them
for (int i = 0; i < m_SPList.size(); i++)
{
for (int j = 0; j < lsources.size(); j++)
......
......@@ -65,7 +65,7 @@ public:
: m_id(id), m_mesh(m)
{
m_cadcurve = m_mesh->m_cad->GetCurve(m_id);
};
}
/**
* @brief alternative constructor with mesh points already created
......@@ -74,7 +74,7 @@ public:
: m_id(id), m_mesh(m), m_meshpoints(n)
{
m_cadcurve = m_mesh->m_cad->GetCurve(m_id);
};
}
/**
* @brief execute meshing
......
......@@ -29,7 +29,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// Description: Calculate jacobians of elements.
// Description: Process volume meshing.
//
////////////////////////////////////////////////////////////////////////////////
......
......@@ -48,8 +48,7 @@ namespace Utilities
{
ModuleKey InputCAD::className = GetModuleFactory().RegisterCreatorFunction(
ModuleKey(eInputModule, "mcf"),
InputCAD::create,
ModuleKey(eInputModule, "mcf"), InputCAD::create,
"Reads CAD geometry and will generate the mesh file.");
/**
......@@ -70,101 +69,111 @@ void InputCAD::ParseFile(string nm)
LibUtilities::SessionReaderSharedPtr pSession =
LibUtilities::SessionReader::CreateInstance(0, NULL, filename);
ASSERTL0(pSession->DefinesElement("NEKTAR/MESHING"),"no meshing tag");
ASSERTL0(pSession->DefinesElement("NEKTAR/MESHING/INFORMATION"),"no information tag");
ASSERTL0(pSession->DefinesElement("NEKTAR/MESHING/PARAMETERS"),"no parameters tag");
ASSERTL0(pSession->DefinesElement("NEKTAR/MESHING"), "no meshing tag");
ASSERTL0(pSession->DefinesElement("NEKTAR/MESHING/INFORMATION"),
"no information tag");
ASSERTL0(pSession->DefinesElement("NEKTAR/MESHING/PARAMETERS"),
"no parameters tag");
TiXmlElement *mcf = pSession->GetElement("NEKTAR/MESHING");
TiXmlElement *info = mcf->FirstChildElement("INFORMATION");
TiXmlElement *I = info->FirstChildElement("I");
map<string,string> information;
while(I)
TiXmlElement *I = info->FirstChildElement("I");
map<string, string> information;
while (I)
{
string tmp1,tmp2;
I->QueryStringAttribute("PROPERTY",&tmp1);
I->QueryStringAttribute("VALUE",&tmp2);
string tmp1, tmp2;
I->QueryStringAttribute("PROPERTY", &tmp1);
I->QueryStringAttribute("VALUE", &tmp2);
information[tmp1] = tmp2;
I = I->NextSiblingElement("I");
I = I->NextSiblingElement("I");
}
TiXmlElement *param = mcf->FirstChildElement("PARAMETERS");
TiXmlElement *P = param->FirstChildElement("P");
map<string,string> parameters;
while(P)
TiXmlElement *P = param->FirstChildElement("P");
map<string, string> parameters;
while (P)
{
string tmp1,tmp2;
P->QueryStringAttribute("PARAM",&tmp1);
P->QueryStringAttribute("VALUE",&tmp2);
string tmp1, tmp2;
P->QueryStringAttribute("PARAM", &tmp1);
P->QueryStringAttribute("VALUE", &tmp2);
parameters[tmp1] = tmp2;
P = P->NextSiblingElement("P");
P = P->NextSiblingElement("P");
}
set<string> boolparameters;
if(pSession->DefinesElement("NEKTAR/MESHING/BOOLPARAMETERS"))
if (pSession->DefinesElement("NEKTAR/MESHING/BOOLPARAMETERS"))
{
TiXmlElement *bparam = mcf->FirstChildElement("BOOLPARAMETERS");
TiXmlElement *BP = bparam->FirstChildElement("P");
TiXmlElement *BP = bparam->FirstChildElement("P");
while(BP)
while (BP)
{
string tmp;
BP->QueryStringAttribute("VALUE",&tmp);
BP->QueryStringAttribute("VALUE", &tmp);
boolparameters.insert(tmp);
BP = BP->NextSiblingElement("P");
}
}
map<string,string>::iterator it;
map<string, string>::iterator it;
it = information.find("CADFile");
ASSERTL0(it != information.end(),"no cadfile defined");
ASSERTL0(it != information.end(), "no cadfile defined");
m_cadfile = it->second;
it = information.find("MeshType");
ASSERTL0(it != information.end(),"no meshtype defined");
ASSERTL0(it != information.end(), "no meshtype defined");
m_makeBL = it->second == "BL";
it = information.find("UDSFile");
if(it != information.end())
if (it != information.end())
{
m_udsfile = it->second;
m_uds = true;
m_uds = true;
}
it = parameters.find("MinDelta");
ASSERTL0(it != parameters.end(),"no mindelta defined");
ASSERTL0(it != parameters.end(), "no mindelta defined");
m_minDelta = it->second;
it = parameters.find("MaxDelta");
ASSERTL0(it != parameters.end(),"no maxdelta defined");
ASSERTL0(it != parameters.end(), "no maxdelta defined");
m_maxDelta = it->second;
it = parameters.find("EPS");
ASSERTL0(it != parameters.end(),"no eps defined");
ASSERTL0(it != parameters.end(), "no eps defined");
m_eps = it->second;
it = parameters.find("Order");
ASSERTL0(it != parameters.end(),"no order defined");
ASSERTL0(it != parameters.end(), "no order defined");
m_order = it->second;
if(m_makeBL)
if (m_makeBL)
{
it = parameters.find("BLSurfs");
ASSERTL0(it != parameters.end(), "no blsurfs defined");
m_blsurfs = it->second;
it = parameters.find("BLThick");
ASSERTL0(it != parameters.end(), "no blthick defined");
m_blthick = it->second;
it = parameters.find("BLLayers");
ASSERTL0(it != parameters.end(), "no bllayer defined");
m_bllayers = it->second;
it = parameters.find("BLProg");
ASSERTL0(it != parameters.end(), "no blprog defined");
m_blprog = it->second;
}
set<string>::iterator sit;
sit = boolparameters.find("SurfOpti");
sit = boolparameters.find("SurfOpti");
m_surfopti = sit != boolparameters.end();
sit = boolparameters.find("WriteOctree");
m_woct = sit != boolparameters.end();
sit = boolparameters.find("WriteOctree");
m_woct = sit != boolparameters.end();
}
void InputCAD::Process()
......@@ -173,7 +182,7 @@ void InputCAD::Process()
m_mesh->m_expDim = 3;
m_mesh->m_spaceDim = 3;
m_mesh->m_nummode = boost::lexical_cast<int>(m_order) + 1;
m_mesh->m_nummode = boost::lexical_cast<int>(m_order) + 1;
vector<ModuleSharedPtr> mods;
......@@ -188,11 +197,11 @@ void InputCAD::Process()
mods.back()->RegisterConfig("mindel", m_minDelta);
mods.back()->RegisterConfig("maxdel", m_maxDelta);
mods.back()->RegisterConfig("eps", m_eps);
if(m_uds)
if (m_uds)
{
mods.back()->RegisterConfig("udsfile", m_udsfile);
}
if(m_woct)
if (m_woct)
{
mods.back()->RegisterConfig("writeoctree", "");
}
......@@ -204,23 +213,23 @@ void InputCAD::Process()
////**** VolumeMesh ****////
mods.push_back(GetModuleFactory().CreateInstance(
ModuleKey(eProcessModule, "volumemesh"), m_mesh));
if(m_makeBL)
if (m_makeBL)
{
mods.back()->RegisterConfig("blsurfs",m_blsurfs);
mods.back()->RegisterConfig("blthick",m_blthick);
mods.back()->RegisterConfig("bllayers",m_bllayers);
mods.back()->RegisterConfig("blprog",m_blprog);
mods.back()->RegisterConfig("blsurfs", m_blsurfs);
mods.back()->RegisterConfig("blthick", m_blthick);
mods.back()->RegisterConfig("bllayers", m_bllayers);
mods.back()->RegisterConfig("blprog", m_blprog);
}
////**** HOSurface ****////
mods.push_back(GetModuleFactory().CreateInstance(
ModuleKey(eProcessModule, "hosurface"), m_mesh));
if(m_surfopti)
if (m_surfopti)
{
mods.back()->RegisterConfig("opti","");
mods.back()->RegisterConfig("opti", "");
}
for(int i = 0; i < mods.size(); i++)
for (int i = 0; i < mods.size(); i++)
{
mods[i]->Process();
}
......
......@@ -70,11 +70,11 @@ public:
private:
int GetNnodes(unsigned int InputGmshEntity);
static std::vector<int> TriReordering( NekMeshUtils::ElmtConfig conf);
static std::vector<int> QuadReordering( NekMeshUtils::ElmtConfig conf);
static std::vector<int> HexReordering( NekMeshUtils::ElmtConfig conf);
static std::vector<int> TriReordering (NekMeshUtils::ElmtConfig conf);
static std::vector<int> QuadReordering (NekMeshUtils::ElmtConfig conf);
static std::vector<int> HexReordering (NekMeshUtils::ElmtConfig conf);
static std::vector<int> PrismReordering(NekMeshUtils::ElmtConfig conf);
static std::vector<int> TetReordering( NekMeshUtils::ElmtConfig conf);
static std::vector<int> TetReordering (NekMeshUtils::ElmtConfig conf);
};
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment