コード例 #1
0
	Integrate(	array_type 			& arg_output , 
				const array_type	& arg_left ,
				const array_type	& arg_right  ) : output(arg_output) , left(arg_left) , right(arg_right)
	{
		numLeft = left.dimension(1);
		numRight = right.dimension(1);
		numPoints = left.dimension(2);
		dim = left.dimension(3);
		if(output.rank() == 2) numLeft = 1;
	}
コード例 #2
0
	Transform(	array_type 			& arg_output , 
				const array_type	& arg_input ,
				const array_type	& arg_fields  ) : output(arg_output) , input(arg_input) , fields(arg_fields)
	{
		data_rank = input.rank();
		numDataPts = input.dimension(1);
		in_rank = fields.rank();
		numCells = output.dimension(0);
		numFields = output.dimension(1);
		numPoints = output.dimension(2);
		dim = output.dimension(3);		
	}
コード例 #3
0
    Jacobian( 	array_type &	arg_jacobian ,
                const host_array &	arg_points_host ,
                const array_type &	arg_cellcoords )
        : jacobian(arg_jacobian) , cellcoords(arg_cellcoords)
    {

        spaceDim = shards::Hexahedron<8>::dimension;
        numCells = cellcoords.dimension(0);
        numPoints = arg_points_host.dimension(0);


        //Specialized for hexahedron<8>
        Intrepid::Basis_HGRAD_HEX_C1_FEM<Scalar, host_array > HGRAD_Basis;

        basisCardinality = HGRAD_Basis.getCardinality();

        //Create local temporary host MDArray to get basisGrad on host
        host_array basisGrads = KokkosArray::create_mdarray<host_array>(basisCardinality, numPoints , spaceDim);

        //Data shared among all calls
        basisGrads_device = KokkosArray::create_mdarray<array_type>(basisCardinality, numPoints , spaceDim);

        HGRAD_Basis.getValues(basisGrads, arg_points_host, Intrepid::OPERATOR_GRAD);

        //Copy basisGrads onto device
        KokkosArray::deep_copy(basisGrads_device , basisGrads);

    }
コード例 #4
0
ファイル: simpleFill.hpp プロジェクト: 00liujj/trilinos
	KOKKOS_MACRO_DEVICE_FUNCTION
  	void operator()( int ielem )const {

		for(unsigned int i = 0; i < data.dimension(1); i++){

			data(ielem, i) = 1.0;

		}

	}
コード例 #5
0
	KOKKOS_MACRO_DEVICE_FUNCTION
  	void operator()( int ielem )const {

		for(unsigned int point = 0; point < outVals.dimension(1); point++){

			outVals(ielem, point) = inDet(ielem, point) * inWeights(point);
			
		}// for, cubature

		if(inDet(ielem, 0) < 0.0){			

			for(unsigned int point = 0; point < outVals.dimension(1); point++){

				outVals(ielem, point) *= -1;
		
			}// for, point

		}// if

	}
コード例 #6
0
ファイル: TransformValue.hpp プロジェクト: 00liujj/trilinos
	TransformValue(	array_type 			& arg_output , 
				const array_type	& arg_input ) : output(arg_output) , input(arg_input) 
	{
		numFields = output.dimension(1);
		numPoints = output.dimension(2);
	}