{"action":"created","comment":{"url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/comments/61025644","id":61025644,"diff_hunk":"@@ -145,7 +145,109 @@ TEUCHOS_UNIT_TEST( MovingLeastSquareReconstructionOperator, mls_test )\n     cloud_list.set<std::string>(\"Basis Type\", \"Wu\");\n     cloud_list.set<int>(\"Basis Order\",2);\n     cloud_list.set<int>(\"Spatial Dimension\",space_dim);\n-    cloud_list.set<double>(\"RBF Radius\", 2.0);\n+    cloud_list.set<bool>(\"Use kNN Support\",false);\n+    cloud_list.set<double>(\"RBF Radius\", 0.25);\n+    DataTransferKit::MapOperatorFactory factory;\n+    Teuchos::RCP<DataTransferKit::MapOperator> mls_op =\n+\tfactory.create( domain_vector->getMap(), range_vector->getMap(), *parameters );\n+\n+    // Setup the operator.\n+    mls_op->setup( domain_manager.functionSpace(),\n+\t\t   range_manager.functionSpace() );\n+\n+    // Apply the operator.\n+    mls_op->apply( *domain_vector, *range_vector );\n+\n+    // Check the apply.\n+    for ( int i = 0; i < num_points; ++i )\n+    {\n+\tTEST_FLOATING_EQUALITY( gold_data[i], range_data[i], 1.0e-8 );\n+    }\n+}\n+\n+//---------------------------------------------------------------------------//\n+TEUCHOS_UNIT_TEST( MovingLeastSquareReconstructionOperator, mls_knn_test )\n+{\n+    // Get the communicator.\n+    Teuchos::RCP<const Teuchos::Comm<int> > comm =\n+\tTeuchos::DefaultComm<int>::getComm();\n+    int comm_rank = comm->getRank();\n+    int comm_size = comm->getSize();\n+    int inverse_rank = comm_size - comm_rank - 1;\n+    const int space_dim = 3;\n+    int field_dim = 1;\n+\n+    // Make a set of domain points.\n+    int num_points = 10;\n+    int domain_mult = 100;\n+    int num_domain_points = num_points * domain_mult;\n+    Teuchos::Array<DataTransferKit::Entity> domain_points( num_domain_points );\n+    Teuchos::Array<double> coords( space_dim );\n+    DataTransferKit::EntityId point_id = 0;\n+    Teuchos::ArrayRCP<double> domain_data( field_dim*num_domain_points );\n+    for ( int i = 0; i < num_domain_points; ++i )\n+    {\n+\tpoint_id = num_domain_points*comm_rank + i + 1;\n+\tcoords[0] = (double) std::rand() / (double) RAND_MAX + comm_rank;\n+\tcoords[1] = (double) std::rand() / (double) RAND_MAX;\n+\tcoords[2] = (double) std::rand() / (double) RAND_MAX;\n+\tdomain_points[i] = DataTransferKit::Point( point_id, comm_rank, coords );\n+\tdomain_data[i] = coords[0];\n+    }\n+\n+    // Make a set of range points.\n+    Teuchos::Array<DataTransferKit::Entity> range_points( num_points );\n+    Teuchos::ArrayRCP<double> range_data( field_dim*num_points );\n+    Teuchos::Array<double> gold_data( num_points );\n+    for ( int i = 0; i < num_points; ++i )\n+    {\n+\tpoint_id = num_points*inverse_rank + i + 1;\n+\tcoords[0] = (double) std::rand() / (double) RAND_MAX + inverse_rank;\n+\tcoords[1] = (double) std::rand() / (double) RAND_MAX;\n+\tcoords[2] = (double) std::rand() / (double) RAND_MAX;\n+\trange_points[i] = DataTransferKit::Point( point_id, comm_rank, coords );\n+\trange_data[i] = 0.0;\n+\tgold_data[i] = coords[0];\n+    }\n+\n+    // Make a manager for the domain geometry.\n+    DataTransferKit::BasicGeometryManager domain_manager( \n+\tcomm, space_dim, domain_points() );\n+\t\t\t\t\t   \n+    // Make a manager for the range geometry.\n+    DataTransferKit::BasicGeometryManager range_manager( \n+\tcomm, space_dim, range_points() );\n+\n+    // Make a DOF vector for the domain.\n+    Teuchos::RCP<DataTransferKit::Field> domain_field =\n+\tTeuchos::rcp( new DataTransferKit::EntityCenteredField(\n+\t\t\t  domain_points(), field_dim, domain_data,\n+\t\t\t  DataTransferKit::EntityCenteredField::BLOCKED) );\n+    Teuchos::RCP<Tpetra::MultiVector<double,int,DataTransferKit::SupportId> > domain_vector =\n+\tTeuchos::rcp( new DataTransferKit::FieldMultiVector(\n+\t\t\t  domain_field,\n+\t\t\t  domain_manager.functionSpace()->entitySet()) );\n+\n+    // Make a DOF vector for the range.\n+    Teuchos::RCP<DataTransferKit::Field> range_field =\n+\tTeuchos::rcp( new DataTransferKit::EntityCenteredField(\n+\t\t\t  range_points(), field_dim, range_data,\n+\t\t\t  DataTransferKit::EntityCenteredField::BLOCKED) );\n+    Teuchos::RCP<Tpetra::MultiVector<double,int,DataTransferKit::SupportId> > range_vector =\n+\tTeuchos::rcp( new DataTransferKit::FieldMultiVector(\n+\t\t\t  range_field,\n+\t\t\t  range_manager.functionSpace()->entitySet()) );\n+","path":"packages/Operators/test/tstMovingLeastSquare.cpp","position":132,"original_position":132,"commit_id":"17fabfc15cab66e79f84bf50546272f7b34fd637","original_commit_id":"17fabfc15cab66e79f84bf50546272f7b34fd637","user":{"login":"dalg24-jenkins","id":18244103,"avatar_url":"https://avatars.githubusercontent.com/u/18244103?v=3","gravatar_id":"","url":"https://api.github.com/users/dalg24-jenkins","html_url":"https://github.com/dalg24-jenkins","followers_url":"https://api.github.com/users/dalg24-jenkins/followers","following_url":"https://api.github.com/users/dalg24-jenkins/following{/other_user}","gists_url":"https://api.github.com/users/dalg24-jenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/dalg24-jenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalg24-jenkins/subscriptions","organizations_url":"https://api.github.com/users/dalg24-jenkins/orgs","repos_url":"https://api.github.com/users/dalg24-jenkins/repos","events_url":"https://api.github.com/users/dalg24-jenkins/events{/privacy}","received_events_url":"https://api.github.com/users/dalg24-jenkins/received_events","type":"User","site_admin":false},"body":"looks a lot like ``mls_radius_test``, it would be nice to reuse code between the two.","created_at":"2016-04-26T03:55:31Z","updated_at":"2016-04-26T03:55:31Z","html_url":"https://github.com/ORNL-CEES/DataTransferKit/pull/52#discussion_r61025644","pull_request_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/comments/61025644"},"html":{"href":"https://github.com/ORNL-CEES/DataTransferKit/pull/52#discussion_r61025644"},"pull_request":{"href":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/52","id":67787604,"html_url":"https://github.com/ORNL-CEES/DataTransferKit/pull/52","diff_url":"https://github.com/ORNL-CEES/DataTransferKit/pull/52.diff","patch_url":"https://github.com/ORNL-CEES/DataTransferKit/pull/52.patch","issue_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/issues/52","number":52,"state":"open","locked":false,"title":"KNN Support for Point Cloud Operators","user":{"login":"sslattery","id":755901,"avatar_url":"https://avatars.githubusercontent.com/u/755901?v=3","gravatar_id":"","url":"https://api.github.com/users/sslattery","html_url":"https://github.com/sslattery","followers_url":"https://api.github.com/users/sslattery/followers","following_url":"https://api.github.com/users/sslattery/following{/other_user}","gists_url":"https://api.github.com/users/sslattery/gists{/gist_id}","starred_url":"https://api.github.com/users/sslattery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sslattery/subscriptions","organizations_url":"https://api.github.com/users/sslattery/orgs","repos_url":"https://api.github.com/users/sslattery/repos","events_url":"https://api.github.com/users/sslattery/events{/privacy}","received_events_url":"https://api.github.com/users/sslattery/received_events","type":"User","site_admin":false},"body":"This pull request is for adding KNN support to the point cloud operators in addition to the already existing fixed-radius support. This work is for issue #38 and #53","created_at":"2016-04-25T21:01:17Z","updated_at":"2016-04-26T03:55:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8b05ed3f808e151af8ce306be499d52a718be32","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/52/commits","review_comments_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/52/comments","review_comment_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/issues/52/comments","statuses_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/statuses/17fabfc15cab66e79f84bf50546272f7b34fd637","head":{"label":"sslattery:knn_search","ref":"knn_search","sha":"17fabfc15cab66e79f84bf50546272f7b34fd637","user":{"login":"sslattery","id":755901,"avatar_url":"https://avatars.githubusercontent.com/u/755901?v=3","gravatar_id":"","url":"https://api.github.com/users/sslattery","html_url":"https://github.com/sslattery","followers_url":"https://api.github.com/users/sslattery/followers","following_url":"https://api.github.com/users/sslattery/following{/other_user}","gists_url":"https://api.github.com/users/sslattery/gists{/gist_id}","starred_url":"https://api.github.com/users/sslattery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sslattery/subscriptions","organizations_url":"https://api.github.com/users/sslattery/orgs","repos_url":"https://api.github.com/users/sslattery/repos","events_url":"https://api.github.com/users/sslattery/events{/privacy}","received_events_url":"https://api.github.com/users/sslattery/received_events","type":"User","site_admin":false},"repo":{"id":55519828,"name":"DataTransferKit","full_name":"sslattery/DataTransferKit","owner":{"login":"sslattery","id":755901,"avatar_url":"https://avatars.githubusercontent.com/u/755901?v=3","gravatar_id":"","url":"https://api.github.com/users/sslattery","html_url":"https://github.com/sslattery","followers_url":"https://api.github.com/users/sslattery/followers","following_url":"https://api.github.com/users/sslattery/following{/other_user}","gists_url":"https://api.github.com/users/sslattery/gists{/gist_id}","starred_url":"https://api.github.com/users/sslattery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sslattery/subscriptions","organizations_url":"https://api.github.com/users/sslattery/orgs","repos_url":"https://api.github.com/users/sslattery/repos","events_url":"https://api.github.com/users/sslattery/events{/privacy}","received_events_url":"https://api.github.com/users/sslattery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sslattery/DataTransferKit","description":"A library for multiphysics solution transfer.","fork":true,"url":"https://api.github.com/repos/sslattery/DataTransferKit","forks_url":"https://api.github.com/repos/sslattery/DataTransferKit/forks","keys_url":"https://api.github.com/repos/sslattery/DataTransferKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sslattery/DataTransferKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sslattery/DataTransferKit/teams","hooks_url":"https://api.github.com/repos/sslattery/DataTransferKit/hooks","issue_events_url":"https://api.github.com/repos/sslattery/DataTransferKit/issues/events{/number}","events_url":"https://api.github.com/repos/sslattery/DataTransferKit/events","assignees_url":"https://api.github.com/repos/sslattery/DataTransferKit/assignees{/user}","branches_url":"https://api.github.com/repos/sslattery/DataTransferKit/branches{/branch}","tags_url":"https://api.github.com/repos/sslattery/DataTransferKit/tags","blobs_url":"https://api.github.com/repos/sslattery/DataTransferKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sslattery/DataTransferKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sslattery/DataTransferKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/sslattery/DataTransferKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sslattery/DataTransferKit/statuses/{sha}","languages_url":"https://api.github.com/repos/sslattery/DataTransferKit/languages","stargazers_url":"https://api.github.com/repos/sslattery/DataTransferKit/stargazers","contributors_url":"https://api.github.com/repos/sslattery/DataTransferKit/contributors","subscribers_url":"https://api.github.com/repos/sslattery/DataTransferKit/subscribers","subscription_url":"https://api.github.com/repos/sslattery/DataTransferKit/subscription","commits_url":"https://api.github.com/repos/sslattery/DataTransferKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/sslattery/DataTransferKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/sslattery/DataTransferKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/sslattery/DataTransferKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/sslattery/DataTransferKit/contents/{+path}","compare_url":"https://api.github.com/repos/sslattery/DataTransferKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sslattery/DataTransferKit/merges","archive_url":"https://api.github.com/repos/sslattery/DataTransferKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sslattery/DataTransferKit/downloads","issues_url":"https://api.github.com/repos/sslattery/DataTransferKit/issues{/number}","pulls_url":"https://api.github.com/repos/sslattery/DataTransferKit/pulls{/number}","milestones_url":"https://api.github.com/repos/sslattery/DataTransferKit/milestones{/number}","notifications_url":"https://api.github.com/repos/sslattery/DataTransferKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sslattery/DataTransferKit/labels{/name}","releases_url":"https://api.github.com/repos/sslattery/DataTransferKit/releases{/id}","deployments_url":"https://api.github.com/repos/sslattery/DataTransferKit/deployments","created_at":"2016-04-05T15:31:13Z","updated_at":"2016-04-05T15:31:15Z","pushed_at":"2016-04-25T22:51:38Z","git_url":"git://github.com/sslattery/DataTransferKit.git","ssh_url":"git@github.com:sslattery/DataTransferKit.git","clone_url":"https://github.com/sslattery/DataTransferKit.git","svn_url":"https://github.com/sslattery/DataTransferKit","homepage":"ORNL-CEES.github.io/DataTransferKit","size":13774,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ORNL-CEES:master","ref":"master","sha":"b40e1cec6f00760efb1107161df5596f6486429f","user":{"login":"ORNL-CEES","id":6653148,"avatar_url":"https://avatars.githubusercontent.com/u/6653148?v=3","gravatar_id":"","url":"https://api.github.com/users/ORNL-CEES","html_url":"https://github.com/ORNL-CEES","followers_url":"https://api.github.com/users/ORNL-CEES/followers","following_url":"https://api.github.com/users/ORNL-CEES/following{/other_user}","gists_url":"https://api.github.com/users/ORNL-CEES/gists{/gist_id}","starred_url":"https://api.github.com/users/ORNL-CEES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ORNL-CEES/subscriptions","organizations_url":"https://api.github.com/users/ORNL-CEES/orgs","repos_url":"https://api.github.com/users/ORNL-CEES/repos","events_url":"https://api.github.com/users/ORNL-CEES/events{/privacy}","received_events_url":"https://api.github.com/users/ORNL-CEES/received_events","type":"Organization","site_admin":false},"repo":{"id":25265743,"name":"DataTransferKit","full_name":"ORNL-CEES/DataTransferKit","owner":{"login":"ORNL-CEES","id":6653148,"avatar_url":"https://avatars.githubusercontent.com/u/6653148?v=3","gravatar_id":"","url":"https://api.github.com/users/ORNL-CEES","html_url":"https://github.com/ORNL-CEES","followers_url":"https://api.github.com/users/ORNL-CEES/followers","following_url":"https://api.github.com/users/ORNL-CEES/following{/other_user}","gists_url":"https://api.github.com/users/ORNL-CEES/gists{/gist_id}","starred_url":"https://api.github.com/users/ORNL-CEES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ORNL-CEES/subscriptions","organizations_url":"https://api.github.com/users/ORNL-CEES/orgs","repos_url":"https://api.github.com/users/ORNL-CEES/repos","events_url":"https://api.github.com/users/ORNL-CEES/events{/privacy}","received_events_url":"https://api.github.com/users/ORNL-CEES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ORNL-CEES/DataTransferKit","description":"A library for multiphysics solution transfer.","fork":false,"url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit","forks_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/forks","keys_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/teams","hooks_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/hooks","issue_events_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/issues/events{/number}","events_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/events","assignees_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/assignees{/user}","branches_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/branches{/branch}","tags_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/tags","blobs_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/statuses/{sha}","languages_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/languages","stargazers_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/stargazers","contributors_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/contributors","subscribers_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/subscribers","subscription_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/subscription","commits_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/contents/{+path}","compare_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/merges","archive_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/downloads","issues_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/issues{/number}","pulls_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls{/number}","milestones_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/milestones{/number}","notifications_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/labels{/name}","releases_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/releases{/id}","deployments_url":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/deployments","created_at":"2014-10-15T17:35:07Z","updated_at":"2016-04-05T17:20:34Z","pushed_at":"2016-04-25T22:51:38Z","git_url":"git://github.com/ORNL-CEES/DataTransferKit.git","ssh_url":"git@github.com:ORNL-CEES/DataTransferKit.git","clone_url":"https://github.com/ORNL-CEES/DataTransferKit.git","svn_url":"https://github.com/ORNL-CEES/DataTransferKit","homepage":"ORNL-CEES.github.io/DataTransferKit","size":13728,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":18,"forks":8,"open_issues":18,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/52"},"html":{"href":"https://github.com/ORNL-CEES/DataTransferKit/pull/52"},"issue":{"href":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/issues/52"},"comments":{"href":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/ORNL-CEES/DataTransferKit/statuses/17fabfc15cab66e79f84bf50546272f7b34fd637"}}}}