mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-12 16:26:23 +00:00
geometryPhasicFlow-pass1 and triSurface and multiTriSurface tested
This commit is contained in:
@ -2,6 +2,6 @@
|
||||
set(source_files
|
||||
geometryPhasicFlow.cpp
|
||||
)
|
||||
set(link_lib phasicFlow Geometry Kokkos::kokkos Utilities)
|
||||
set(link_lib phasicFlow Kokkos::kokkos Utilities)
|
||||
|
||||
pFlow_make_executable_install(geometryPhasicFlow source_files link_lib)
|
||||
|
@ -18,26 +18,19 @@ Licence:
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "vocabs.hpp"
|
||||
#include "systemControl.hpp"
|
||||
#include "fileDictionary.hpp"
|
||||
#include "Wall.hpp"
|
||||
#include "Vectors.hpp"
|
||||
#include "VectorSingles.hpp"
|
||||
#include "multiTriSurface.hpp"
|
||||
#include "geometryMotion.hpp"
|
||||
//#include "geometryMotion.hpp"
|
||||
#include "commandLine.hpp"
|
||||
#include "readControlDict.hpp"
|
||||
//#include "readControlDict.hpp"
|
||||
|
||||
using pFlow::output;
|
||||
using pFlow::endl;
|
||||
using pFlow::IOobject;
|
||||
using pFlow::dictionary;
|
||||
using pFlow::objectFile;
|
||||
using pFlow::wordVector;
|
||||
using pFlow::Wall;
|
||||
using pFlow::geometry;
|
||||
using pFlow::realx3x3Vector;
|
||||
using pFlow::multiTriSurface;
|
||||
using pFlow::commandLine;
|
||||
|
||||
using namespace pFlow;
|
||||
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
@ -59,11 +52,10 @@ int main( int argc, char* argv[] )
|
||||
// this should be palced in each main
|
||||
#include "initialize_Control.hpp"
|
||||
|
||||
#include "setProperty.hpp"
|
||||
//#include "setProperty.hpp"
|
||||
|
||||
REPORT(0)<<"\nReading "<<"createGeometryDict"<<" . . ."<<endREPORT;
|
||||
auto objDict = IOobject::make<dictionary>
|
||||
(
|
||||
REPORT(0)<<"\nReading "<<"geometryDict"<<" . . ."<<END_REPORT;
|
||||
auto geometryDict = fileDictionary(
|
||||
objectFile
|
||||
(
|
||||
"geometryDict",
|
||||
@ -71,46 +63,55 @@ int main( int argc, char* argv[] )
|
||||
objectFile::READ_ALWAYS,
|
||||
objectFile::WRITE_NEVER
|
||||
),
|
||||
"geometryDict",
|
||||
true
|
||||
nullptr
|
||||
);
|
||||
|
||||
auto& geometryDict = objDict().getObject<dictionary>();
|
||||
|
||||
|
||||
auto& surfacesDict = geometryDict.subDict("surfaces");
|
||||
|
||||
auto wallsDictName = surfacesDict.dictionaryKeywords();
|
||||
|
||||
|
||||
|
||||
multiTriSurface surface;
|
||||
wordVector materials;
|
||||
wordVector motion;
|
||||
multiTriSurface surface
|
||||
(
|
||||
objectFile
|
||||
(
|
||||
triSurfaceFile__,
|
||||
"",
|
||||
objectFile::READ_NEVER,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
&Control.geometry()
|
||||
);
|
||||
|
||||
//wordVector materials;
|
||||
//wordVector motion;
|
||||
|
||||
for(auto& name:wallsDictName)
|
||||
{
|
||||
REPORT(1)<<"Creating wall "<<greenText(name)<<" from file dictionary . . . "<<endREPORT;
|
||||
REPORT(1)<<"Creating wall "<<Green_Text(name)<<" from dictionary "<<surfacesDict.globalName() <<END_REPORT;
|
||||
auto wallPtr = Wall::create( surfacesDict.subDict(name));
|
||||
auto& wall = wallPtr();
|
||||
REPORT(1)<<"wall type is "<<greenText(wall.typeName())<<'\n'<<endREPORT;
|
||||
REPORT(1)<<"wall type is "<<Green_Text(wall.typeName())<<'\n'<<END_REPORT;
|
||||
|
||||
realx3x3Vector trinalges(wall.name());
|
||||
trinalges = wall.triangles();
|
||||
surface.addTriSurface(wall.name(), trinalges);
|
||||
materials.push_back(wall.materialName());
|
||||
motion.push_back(wall.motionName());
|
||||
realx3x3Vector trinalges(wall.name(), wall.triangles());
|
||||
|
||||
surface.appendTriSurface(wall.name(), trinalges);
|
||||
/*materials.push_back(wall.materialName());
|
||||
motion.push_back(wall.motionName());*/
|
||||
}
|
||||
|
||||
REPORT(1)<<"Selected wall materials are "<<cyanText(materials)<<'\n'<<endREPORT;
|
||||
output<<surface<<endl;
|
||||
//REPORT(1)<<"Selected wall materials are "<<cyanText(materials)<<'\n'<<endREPORT;
|
||||
|
||||
REPORT(0)<< "\nCreating geometry . . ."<<endREPORT;
|
||||
/*REPORT(0)<< "\nCreating geometry . . ."<<endREPORT;
|
||||
auto geomPtr = geometry::create(Control, proprties, geometryDict, surface, motion, materials);
|
||||
REPORT(1)<< "geometry type is "<< greenText(geomPtr().typeName())<<endREPORT;
|
||||
|
||||
REPORT(1)<< "Writing geometry to folder "<< geomPtr().path()<<endREPORT;
|
||||
geomPtr().write();
|
||||
geomPtr().write();*/
|
||||
|
||||
REPORT(0)<< greenText("\nFinished successfully.\n");
|
||||
REPORT(0)<< Green_Text("\nFinished successfully.\n")<<END_REPORT;
|
||||
|
||||
// this should be palced in each main
|
||||
#include "finalize.hpp"
|
||||
|
Reference in New Issue
Block a user