gm_meshgen.cpp
来自「算断裂的」· C++ 代码 · 共 99 行
CPP
99 行
// ------------------------------------------------------------------// gm_meshgen.cpp//// This file contains the driver function for mesh generation.// Arguments are parsed, then meshgen is called.// ------------------------------------------------------------------// Author: Stephen A. Vavasis// Copyright (c) 1999 by Cornell University. All rights reserved.// // See the accompanying file 'Copyright' for authorship information,// the terms of the license governing this software, and disclaimers// concerning this software.// ------------------------------------------------------------------// This file is part of the QMG software. // Version 2.0 of QMG, release date September 3, 1999.// ------------------------------------------------------------------#include "qfrontend.h"#include "qsimpcomp.h"#define GM_ROUTINE_NAME gm_meshgen#define GM_ROUTINE_NAME_Q "gm_meshgen"namespace QMG { namespace MG { using namespace QMG; SimpComplex_Under_Construction meshgen(const Brep& g, const string& default_size_control, const string& default_curv_control, const string& user_data, const vector<Real>& expa, const vector<Real>& asp_degrade, ostream& logfile, int verbosity1, QMG::FrontEnd::Interpreter& interp, bool gui_active, double tol, int ori); }#ifdef NSF_DEMO namespace Nsf_Demo { using namespace QMG; extern void begin_demo(const QMG::FrontEnd::ArgValType& argvalhandle, int whicharg, const string& user_data, QMG::FrontEnd::Interpreter& interp); extern void end_demo(); }#endif}namespace { static void worker(const QMG::FrontEnd::ArgValType& argvalhandle, QMG::FrontEnd::ReturnValType& returnvalhandle, QMG::FrontEnd::Interpreter& interp) { using namespace QMG; using namespace QMG::MG; using namespace QMG::FrontEnd; using std::ofstream; argvalhandle.verify_nargin(11, 11, GM_ROUTINE_NAME_Q); returnvalhandle.verify_nargout(1, 1, GM_ROUTINE_NAME_Q); ofstream logfile(argvalhandle.get_string(6).c_str()); if (!logfile) throw_error("Unable to open log file in gm_meshgen"); string user_data = argvalhandle.get_string(3);#ifdef NSF_DEMO QMG::Nsf_Demo::begin_demo(argvalhandle, 0, user_data, interp);#endif SimpComplex_Under_Construction sc = meshgen(argvalhandle.get_brep(0), argvalhandle.get_string(1), argvalhandle.get_string(2), user_data, argvalhandle.get_vector_double(4), argvalhandle.get_vector_double(5), logfile, argvalhandle.get_int(7), interp, argvalhandle.get_bool(8), argvalhandle.get_double(9), argvalhandle.get_int(10));#ifdef NSF_DEMO QMG::Nsf_Demo::end_demo();#endif returnvalhandle.put_simpcomp(0, sc); return; }}#include "gm_entrypoint.cpp"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?