extract explicit mesh with topology information from implicit surfaces with boolean operations, and do surface/volume integrating on them.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
1.1 KiB

#include <iostream>
#include <any>
#include <Eigen/Core>
#include <environment.h>
#include <execution.h>
#include <io.h>
#include <construct_helper.hpp>
#include "internal_api.hpp"
#include "primitive_descriptor.h"
int main()
{
std::cout << "Setting scene..." << std::endl;
box_descriptor_t box_large{
{500, 50, 50},
{500, 50, 50}
};
box_descriptor_t box_small{
{45, 50, 50},
{5, 50, 50}
};
auto tree_root = make_primitive_node_by_move(box_large);
auto tree_small = make_primitive_node_by_move(box_small);
virtual_node_boolean_difference(&tree_root, &tree_small);
std::cout << "Setting environments..." << std::endl;
setting_descriptor setting_desc{21, 1e-5};
update_setting(setting_desc);
update_environment(&tree_root);
std::cout << "Executing solver..." << std::endl;
auto result = execute_solver(&tree_root);
std::cout << "Surface integral result: " << result.surf_int_result << std::endl;
std::cout << "Volume integral result: " << result.vol_int_result << std::endl;
std::cout << "Time statistics: " << std::endl;
print_statistics();
return 0;
}