⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initdata.c

📁 LPARX is a C++ class library for for implementing portable scientific applications on distributed me
💻 C
字号:
#include "redblack2d.h"//// Initialize the boundary region with random data and// the interior with zero//void initData(XArray1(Grid2(double))& solution)  {   /*     The for_all_1 loop is a parallel loop which executes iteration     i on the processor which owns the ith element of an XArray.     There is an implicit barrier synchronization at the end of the     for_all loop. This can be overridden by the macro      end_for_all_no_sync.  This form must be used carefully.  Note     that the for_all loop implicitly extracts the bounding box      of the last argument (the XArray).     The for_2 loop is a serial loop, which also implicitly extracts     the bounding box of the last argument.   */   for_all_1(i, solution)      for_2(j, k, solution(i))         solution(i)(j,k) = drand48();      end_for      Region2 inside = grow(solution(i).region(), -1);      for_2(j, k, inside);         solution(i)(j,k) = 0.0;      end_for   end_for_all  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -