read the arguments of problem ex: problem a(u,v) or a([u1,u2], [v1,v2]) First Argument: samedim If return true if all argument are in the same type of FESpace : pfes, pfes3, ... else return false Second Argument : complextype Remark: This function check that all FEbase are complex or real;
| 12974 | // |
| 12975 | // Remark: This function check that all FEbase are complex or real; |
| 12976 | std::pair< bool,bool> isSameDimAndComplexTypeProblem(const ListOfId &l){ |
| 12977 | bool return_samedim=true; |
| 12978 | bool complextype = false; |
| 12979 | bool realtype = false; |
| 12980 | int dim=0; |
| 12981 | int nb=l.size();//,nbarray=0;//,n=0, |
| 12982 | //const UnId *p1; |
| 12983 | for(int i=0; i<nb; ++i) |
| 12984 | { |
| 12985 | if(l[i].e ==0)// to miss name parameter solver=ddd |
| 12986 | { |
| 12987 | if (l[i].array) |
| 12988 | { |
| 12989 | ListOfId * array=l[i].array; |
| 12990 | for(int j=0; j<array->size(); ++j) |
| 12991 | { |
| 12992 | const UnId & idi( (*array)[j]); |
| 12993 | if (idi.r == 0 && idi.re == 0 && idi.array==0 ) |
| 12994 | { |
| 12995 | C_F0 c=::Find( idi.id); |
| 12996 | // mesh |
| 12997 | if(BCastTo<pfec>(c) ){ |
| 12998 | complextype = true; |
| 12999 | if(dim==0 || dim==2){ dim=2;} |
| 13000 | else{ return_samedim = false; } |
| 13001 | } |
| 13002 | if(BCastTo<pfer>(c) ){ |
| 13003 | realtype = true; |
| 13004 | if(dim==0 || dim==2){ dim=2;} |
| 13005 | else{ return_samedim = false; } |
| 13006 | } |
| 13007 | // mesh3 |
| 13008 | if(BCastTo<pf3c>(c) ){ |
| 13009 | complextype = true; |
| 13010 | if(dim==0 || dim==3){ dim=3;} |
| 13011 | else{ return_samedim = false; } |
| 13012 | } |
| 13013 | if(BCastTo<pf3r>(c) ){ |
| 13014 | realtype = true; |
| 13015 | if(dim==0 || dim==3){ dim=3;} |
| 13016 | else{ return_samedim = false; } |
| 13017 | } |
| 13018 | // meshS |
| 13019 | if(BCastTo<pfSc>(c) ){ |
| 13020 | complextype = true; |
| 13021 | if(dim==0 || dim==4){ dim=4;} |
| 13022 | else{ return_samedim = false; } |
| 13023 | } |
| 13024 | if(BCastTo<pfSr>(c) ){ |
| 13025 | realtype = true; |
| 13026 | if(dim==0 || dim==4){ dim=4;} |
| 13027 | else{ return_samedim = false; } |
| 13028 | } |
| 13029 | // meshL |
| 13030 | if(BCastTo<pfLc>(c) ){ |
| 13031 | complextype = true; |
| 13032 | if(dim==0 || dim==5){ dim=5;} |
| 13033 | else{ return_samedim = false; } |
no test coverage detected