void* OPS_ForceBeamColumn()
{
    int ndm = OPS_GetNDM();
    if(ndm == 2) {
	return OPS_ForceBeamColumn2d();
    } else {
	return OPS_ForceBeamColumn3d();
    }
}
Ejemplo n.º 2
0
int
Mesh::setEleArgs()
{
    // no elements
    if (OPS_GetNumRemainingInputArgs() < 1) {
        eleType = 0;
        return 0;
    }

    // get type and set info
    const char* type = OPS_GetString();
    int ndm = OPS_GetNDM();
    ID info(2);
    info(0) = 1; //save data
    info(1) = this->getTag();

    if (strcmp(type, "elasticBeamColumn") == 0) {
        if (ndm == 2) {
            eleType = ELE_TAG_ElasticBeam2d;
            if (OPS_ElasticBeam2d(info) == 0) {
                opserr << "WARNING: failed to read eleArgs\n";
                return -1;
            }
	    numelenodes = 2;
        }

    } else if(strcmp(type, "forceBeamColumn") == 0) {
        if (ndm == 2) {
            eleType = ELE_TAG_ForceBeamColumn2d;
            if (OPS_ForceBeamColumn2d(info) == 0) {
                opserr << "WARNING: failed to read eleArgs\n";
                return -1;
            }
	    numelenodes = 2;
        }

    } else if(strcmp(type, "dispBeamColumn") == 0) {
        if (ndm == 2) {
            eleType = ELE_TAG_DispBeamColumn2d;
            if (OPS_DispBeamColumn2d(info) == 0) {
                opserr << "WARNING: failed to read eleArgs\n";
                return -1;
            }
	    numelenodes = 2;
        }

    } else if(strcmp(type, "PFEMElementBubble") == 0) {
        if (ndm == 2) {
            eleType = ELE_TAG_PFEMElement2DBubble;
            if (OPS_PFEMElement2DBubble(info) == 0) {
                opserr << "WARNING: failed to read eleArgs\n";
                return -1;
            }
            fluid = true;
	    numelenodes = 3;
	    
        } else {
	    eleType = ELE_TAG_PFEMElement3DBubble;
            if (OPS_PFEMElement3DBubble(info) == 0) {
                opserr << "WARNING: failed to read eleArgs\n";
                return -1;
            }
            fluid = true;
	    numelenodes = 4;
	}

    } else if(strcmp(type, "MINI") == 0) {
        if (ndm == 2) {
            eleType = ELE_TAG_PFEMElement2Dmini;
            if (OPS_PFEMElement2Dmini(info) == 0) {
                opserr << "WARNING: failed to read eleArgs\n";
                return -1;
            }
            fluid = true;
	    numelenodes = 3;
        }

    } else if(strcmp(type, "PFEMElementCompressible") == 0) {
        if (ndm == 2) {
            eleType = ELE_TAG_PFEMElement2DCompressible;
            if (OPS_PFEMElement2DCompressible(info) == 0) {
                opserr << "WARNING: failed to read eleArgs\n";
                return -1;
            }
            fluid = true;
	    numelenodes = 3;
        }

    } else if(strcmp(type, "tri31") == 0) {
        eleType = ELE_TAG_Tri31;
        if (OPS_Tri31(info) == 0) {
            opserr << "WARNING: failed to read eleArgs\n";
            return -1;
        }
	numelenodes = 3;

    } else if(strcmp(type, "FourNodeTetrahedron") == 0) {
        eleType = ELE_TAG_FourNodeTetrahedron;
        if (OPS_FourNodeTetrahedron(info) == 0) {
            opserr << "WARNING: failed to read eleArgs\n";
            return -1;
        }
	numelenodes = 4;
    } else if (strcmp(type, "ShellMITC4") == 0) {
	eleType = ELE_TAG_ShellMITC4;
        if (OPS_ShellMITC4(info) == 0) {
            opserr << "WARNING: failed to read eleArgs\n";
            return -1;
        }
	numelenodes = 4;
	
    } else {
        opserr << "WARNING: element "<<type<<" is not currently supported in mesh\n";
        return -1;
    }

    return 0;
}