这个补丁怎么用?

为当前最终发行版之前的所有版本提供支持
回复
wattwang
帖子: 97
注册时间: 2006-10-30 17:10
送出感谢: 0
接收感谢: 0

这个补丁怎么用?

#1

帖子 wattwang » 2007-04-06 0:37

For now you can apply the patch attached to this message.

diff -rN -u old-meep/src/h5fields.cpp new-meep/src/h5fields.cpp
--- old-meep/src/h5fields.cpp 2007-04-05 12:07:34.220578947 -0400
+++ new-meep/src/h5fields.cpp 2007-01-02 21:25:08.000000000 -0500
<at> <at> -399,7 +399,7 <at> <at>
if (coordinate_mismatch(v.dim, c)) return;

int nfields;
- component cs[6];
+ component cs[12];
field_rfunction fun = derived_component_func(c, v, nfields, cs);

output_hdf5(component_name(c), nfields, cs, fun, &nfields, where,
diff -rN -u old-meep/src/integrate.cpp new-meep/src/integrate.cpp
--- old-meep/src/integrate.cpp 2007-04-05 12:07:34.224578361 -0400
+++ new-meep/src/integrate.cpp 2007-01-02 21:25:21.000000000 -0500
<at> <at> -241,7 +241,7 <at> <at>
if (!is_derived(int(c)))
return max_abs(component(c), where);
int nfields;
- component cs[6];
+ component cs[12];
field_rfunction fun = derived_component_func(c, v, nfields, cs);
return max_abs(nfields, cs, fun, &nfields, where);
}
diff -rN -u old-meep/src/meep.hpp new-meep/src/meep.hpp
--- old-meep/src/meep.hpp 2007-04-05 12:07:34.223578508 -0400
+++ new-meep/src/meep.hpp 2007-01-02 21:24:49.000000000 -0500
<at> <at> -749,7 +749,7 <at> <at>
void *integrand_data_);

field_rfunction derived_component_func(derived_component c, const volume &v,
- int &nfields, component cs[6]);
+ int &nfields, component cs[12]);

class fields {
public:
diff -rN -u old-meep/src/vec.cpp new-meep/src/vec.cpp
--- old-meep/src/vec.cpp 2007-04-05 12:07:34.226578068 -0400
+++ new-meep/src/vec.cpp 2007-01-02 21:25:45.000000000 -0500
<at> <at> -1403,7 +1403,7 <at> <at>
}

field_rfunction derived_component_func(derived_component c, const volume &v,
- int &nfields, component cs[6]) {
+ int &nfields, component cs[12]) {
switch (c) {
case Sx: case Sy: case Sz: case Sr: case Sp:
switch (c) {
<at> <at> -1431,7 +1431,7 <at> <at>
cs[nfields++] = c0;
cs[nfields++] = c0;
}
- if (nfields > 6) abort("too many field components");
+ if (nfields > 12) abort("too many field components");
return energy_fun;

default:
f0rrest
帖子: 133
注册时间: 2006-09-27 20:49
送出感谢: 0
接收感谢: 4 次

#2

帖子 f0rrest » 2007-04-06 1:42

什么软件的?
你把补丁用“code”记号引起来。
回复

回到 “老旧版本支持”