MCPcopy Create free account
hub / github.com/FreeFem/FreeFem-sources / Problem

Method Problem

src/fflib/problem.cpp:13642–13773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13640
13641
13642Problem::Problem(const C_args * ca,const ListOfId &l,size_t & top) :
13643op(new C_args(*ca)),
13644var(l.size()),
13645type_var(),
13646VF(false),
13647offset(align8(top)),
13648dim( isCompositeProblem(l) ? 6 : ( isSameDimAndComplexTypeProblem(l).first ? dimProblem(l) : 6 ) )
13649{
13650 if( verbosity > 999) cout << "Problem : ----------------------------- " << top << " dim = " << dim<<" " << nargs << endl;
13651
13652 if(dim==6){
13653 top = offset + sizeof( DataComposite );
13654 }
13655 else{
13656 top = offset + max(sizeof(Data<FESpace>),sizeof(Data<FESpace>));
13657 }
13658 bool iscomplex=isSameDimAndComplexTypeProblem(l).second; // iscomplex of the type of argument u1,u2, ... of : problem myproblem([u1,u2],[v1,v2]), ...
13659
13660 if(dim==2)
13661 iscomplex=GetBilinearParam<pfer,pfec>(l,name_param,n_name_param,nargs, Nitem,Mitem,var);
13662 else if (dim==3)
13663 iscomplex=GetBilinearParam<pf3r,pf3c>(l,name_param,n_name_param,nargs, Nitem,Mitem,var);
13664 else if (dim==4) // dim = 4 for a 3D surface problem
13665 iscomplex=GetBilinearParam<pfSr,pfSc>(l,name_param,n_name_param,nargs, Nitem,Mitem,var);
13666 else if (dim==5) // dim = 5 for a 3D curve problem
13667 iscomplex=GetBilinearParam<pfLr,pfLc>(l,name_param,n_name_param,nargs, Nitem,Mitem,var);
13668 else if (dim==6){
13669 if(! isCompositeProblem(l) ){
13670 cerr << "write our problem/solve in composite form." << endl;
13671 cerr << "problem pb(<[u1,u2],[u3]>,<[v1,v2],[v3]>) = " << endl;
13672 ffassert(0);
13673 }
13674 ffassert( (isCompositeProblem(l) == true) ); // ???
13675 Nitem = 0; // initialize value to zero
13676 Mitem = 0; // initialize value
13677
13678 KN<size_t> UhNbItem;
13679 KN<size_t> VhNbItem;
13680 GetBilinearParamCompositeFESpace(l,name_param,n_name_param,nargs, Nitem,Mitem,var,type_var,UhNbItem,VhNbItem);
13681
13682 // recuperation de la taille des FESpaces
13683 int NpUh = (int) UhNbItem.size();
13684 int NpVh = (int) VhNbItem.size();
13685
13686 KN<int> indexBlockUh(Nitem);
13687 KN<int> indexBlockVh(Mitem);
13688 KN<int> localIndexInTheBlockUh(Nitem);
13689 KN<int> localIndexInTheBlockVh(Mitem);
13690
13691 // index for the construction of the block of Uh
13692 {
13693 // ===========================================
13694 //
13695 // varf([u0,u1,...,u4], ... )
13696 // varf([ [u0_blk1,u1_blk1],[u0_blk2,u1_blk2,u2_blk2] ], ... )
13697
13698 // u4 correspond to u2_blk2 in the block varf
13699 // ============================================

Callers

nothing calls this directly

Calls 15

align8Function · 0.85
isCompositeProblemFunction · 0.85
dimProblemFunction · 0.85
computeBlockLargsFunction · 0.85
FieldOfFormFunction · 0.85
CompileErrorFunction · 0.85
ArrayOfaTypeClass · 0.85
isVFFunction · 0.85

Tested by

no test coverage detected